Contribute
Register

[solved] No audio

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,225
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
MacBook Air
Mobile Phone
iOS
There is a script in my hack-tools project on github that will create LiluFriend.kext automatically (and correctly).
Can you tell me what the problem with my script is?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Can you tell me what the problem with my script is?
Maybe nothing... I didn't really look at it as far as this thread (would require more debugging info from the script and some info about what kexts are installed).

This particular user seems to have a botched setup.
 
Joined
Oct 11, 2012
Messages
86
Motherboard
Asus N552VX-FW131T
CPU
i7-6700HQ
Graphics
HD 530 + GT 950m, 1920x1080
The ioreg you attached shows audio working.

Note: You forgot to remove ForceKextsToLoad from your config.plist (as written in the guide).
Ok did it and rebooted, no audio again. (as i said happens 50% of times and not if i inject it with clover)
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Ok did it and rebooted, no audio again. (as i said happens 50% of times and not if i inject it with clover)
It probably is a timing issue in AppleALC.
I think it is trying to scan ioreg for HDA controllers too soon, and sometimes they are not fully populated.
A well placed IOSleep in AppleHDA might help.

For example, right here in kern_alc.cpp:
Code:
void AlcEnabler::updateProperties() {
   IOSleep(250); // patience grasshopper, patience...
   auto devInfo = DeviceInfo::create();
   if (devInfo) {
...
 
Joined
Oct 11, 2012
Messages
86
Motherboard
Asus N552VX-FW131T
CPU
i7-6700HQ
Graphics
HD 530 + GT 950m, 1920x1080
Thanks but i dont know how/where to place the code. Should i download the source from github and edit the kern_alc.cpp?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thanks but i dont know how/where to place the code. Should i download the source from github and edit the kern_alc.cpp?
Clone the repo. Make sure you can build it as is (read the README/wiki). Then make your modification in Xcode. Then build the modified version. Hopefully, you have some programming experience and some knowledge of Xcode.
 
Joined
Oct 11, 2012
Messages
86
Motherboard
Asus N552VX-FW131T
CPU
i7-6700HQ
Graphics
HD 530 + GT 950m, 1920x1080
Did it and right now, in 4 boots, 1 was without audio. Maybe clover injection is a better solution in my case?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Did it and right now, in 4 boots, 1 was without audio. Maybe clover injection is a better solution in my case?
Make sure debug version of Lilu and AppleALC are installed, and -liludbgall kernel flag is used.
Attach PR files from both working and non-working boot.

And... sounds like an improvement with the delay, no? Perhaps a larger delay will help...
 
Last edited:
Joined
Oct 11, 2012
Messages
86
Motherboard
Asus N552VX-FW131T
CPU
i7-6700HQ
Graphics
HD 530 + GT 950m, 1920x1080
Ok here the files. Yeah, maybe next ill try to use a larger delay
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Ok here the files. Yeah, maybe next ill try to use a larger delay
Note different PCI data enumeration in the logs.
Not working:
Code:
2018-10-25 17:48:50.076225+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) creating device info
2018-10-25 17:48:50.076246+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device chosen
2018-10-25 17:48:50.076253+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device efi
2018-10-25 17:48:50.076259+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device cpus
2018-10-25 17:48:50.076265+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device memory
2018-10-25 17:48:50.076270+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device rom
2018-10-25 17:48:50.076276+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found root device PCI0
2018-10-25 17:48:50.076281+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found PCI root PCI0
2018-10-25 17:48:50.076293+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:48:50.076300+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:48:50.076309+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device PEG1 0x0 0x0
2018-10-25 17:48:50.076315+0200 0x165      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:49:23.937492+0200 0x314      Default     0x0                  0      0    kernel: (Lilu) Lilu:    user @ (DBG) caught /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer performing injection
Working finds more:
Code:
2018-10-25 17:43:30.201167+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found PCI root PCI0
2018-10-25 17:43:30.201172+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201175+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201178+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device PEG1 0x0 0x0
2018-10-25 17:43:30.201180+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201182+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201185+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device PEG2 0x0 0x0
2018-10-25 17:43:30.201187+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201189+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201192+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device RP09 0x0 0x0
2018-10-25 17:43:30.201194+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201196+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201198+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device RP10 0x0 0x0
2018-10-25 17:43:30.201201+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201203+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201205+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device RP11 0x0 0x0
2018-10-25 17:43:30.201208+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201210+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201212+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device RP12 0x0 0x0
2018-10-25 17:43:30.201214+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData vendor-id was not found
2018-10-25 17:43:30.201217+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:   iokit @ (DBG) getOSData class-code was not found
2018-10-25 17:43:30.201219+0200 0x164      Default     0x0                  0      0    kernel: (Lilu) Lilu:     dev @ (DBG) found pci device RP13 0x0 0x0
2018-10-25 17:43:54.962391+0200 0x30f      Default     0x0                  0      0    kernel: (Lilu) Lilu:    user @ (DBG) caught /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer performing injection
Something like this in Lilu may help make it easier to try different values of delay after IOPCIConfigured:
Code:
+++ b/Lilu/Sources/kern_devinfo.cpp
@@ -325,6 +325,9 @@ DeviceInfo *DeviceInfo::create() {
                                                IOSleep(1);
                                        }
+                                       uint32_t delay = 0;
+                                       if (PE_parse_boot_argn("lilupcidelay", &delay, sizeof(delay)))
+                                               IOSleep(delay);
                                        list->grabDevicesFromPciRoot(pciRootObj);
                                }
                        }
 
Top