Contribute
Register

<< Solved >> Lenovo Yoga c930-13IKB

Status
Not open for further replies.
PreventUserIdleSystemSleep named: "com.apple.audio.GDAudioDevice_UID.context.preventuseridlesleep"
Oops. This seems to be related to Boom 3D. Will disable and try in a moment.

usb hotplug, make sure you use the correct setting in your SSDT:
If it uses the same SSxx in both orientations, then it has an internal switch (UsbConnector=9).
If it uses a different SSxx in each orientation, then it has no switch (UsbConnector=10).
This is something I couldn't understand from RehabMan's examples, because none of them covered my situation:

USB-C function as USB 2.0 with the HH06 and HH03 values and then as USB 3.1 with added SS01 and SS02 (in this order). So my SSDT says:

"HS03", Package() // USB-C
{
"UsbConnector", 10,
"port", Buffer() { 3, 0, 0, 0 },
},

"HS06", Package() // USB-C
{
"UsbConnector", 10,
"port", Buffer() { 6, 0, 0, 0 },
},

"SS01", Package()
{
"UsbConnector", 10,
"port", Buffer() { 13, 0, 0, 0 },
},

"SS02", Package()
{
"UsbConnector", 10,
"port", Buffer() { 14, 0, 0, 0 },
},

But SS01 also activates in USB-A 3.0 (with the current values it works correctly).

Should I be changing the HS0x values to 10/9 or leave them at 3? (In the meantime I am changing all 10s to 9s since indeed SS0x doesn't change value – I thought it meant that when you turn the cable around the values should change, not the number of SS0x.)

Edit 1: changing 10 to 9 doesn't help.
Edit 2: I enabled all those:

<key>FixTMR</key>
<key>FixRTC</key>
<key>FixIPIC</key>
<key>FixHPET</key>

No change either to hotplug or audio. Let me see sleep... nope, complete crash. (I am able to check this, because my SSD has a diode showing whether the port is powered, and my WiFi dongle blinks when the Wireless Utility auto-loads. Ports are powered, the utility doesn't load, which means the computer is completely out.)

This is ioreg after adding the patches and changing 10 values to 9 in HS03, HS06, SS01, SS02.
 

Attachments

  • ioreg_patches.zip
    835.6 KB · Views: 49
Last edited:
Oops. This seems to be related to Boom 3D. Will disable and try in a moment.


This is something I couldn't understand from RehabMan's examples, because none of them covered my situation:

USB-C function as USB 2.0 with the HH06 and HH03 values and then as USB 3.1 with added SS01 and SS02 (in this order). So my SSDT says:

"HS03", Package() // USB-C
{
"UsbConnector", 10,
"port", Buffer() { 3, 0, 0, 0 },
},

"HS06", Package() // USB-C
{
"UsbConnector", 10,
"port", Buffer() { 6, 0, 0, 0 },
},

"SS01", Package()
{
"UsbConnector", 10,
"port", Buffer() { 13, 0, 0, 0 },
},

"SS02", Package()
{
"UsbConnector", 10,
"port", Buffer() { 14, 0, 0, 0 },
},

But SS01 also activates in USB-A 3.0 (with the current values it works correctly).

Should I be changing the HS0x values to 10/9 or leave them at 3? (In the meantime I am changing all 10s to 9s since indeed SS0x doesn't change value – I thought it meant that when you turn the cable around the values should change, not the number of SS0x.)

Edit 1: changing 10 to 9 doesn't help.
Edit 2: I enabled all those:

<key>FixTMR</key>
<key>FixRTC</key>
<key>FixIPIC</key>
<key>FixHPET</key>

No change either to hotplug or audio. Let me see sleep...
use a usb3.1 stick to test, the HS/SS ports will change

example one way ss02, the other way ss03
 
use a usb3.1 stick to test, the HS/SS ports will change

example one way ss02, the other way ss03
No changes in either USB-C, remains SS02 or SS03. So 9 is correct. Again, as long as something is connected to USB-C at boot, the other one is hotpluggable. Once I remove the first device and keep the second, the first USB-C is still hotpluggable. Once I remove both and try again, no luck – feels as if the laptop goes "meh, I'm sure he won't need anything USB 3.x anymore). (I used USB 3.0 to keep the ports going and USB 3.1 to test the orientation.)

For HS06 and HS03 (USB-C ports in 2.0 mode) – do I leave them at 9 or change back to 3?
 
No changes in either USB-C, remains SS02 or SS03. So 9 is correct. Again, as long as something is connected to USB-C at boot, the other one is hotpluggable. Once I remove the first device and keep the second, the first USB-C is still hotpluggable. Once I remove both and try again, no luck – feels as if the laptop goes "meh, I'm sure he won't need anything USB 3.x anymore). (I used USB 3.0 to keep the ports going and USB 3.1 to test the orientation.)

For HS06 and HS03 (USB-C ports in 2.0 mode) – do I leave them at 9 or change back to 3?
usb2.0 should be set to 0
 
No change :(

So the USB-C ports are:
HS06 set to 0, paired with SS01 set to 9
HS03 set to 0, paired with SS02 set to 9
SS01 and SS02 do not change with orientation, addresses on USB 3.0/3.1 are SS01@00300000 and SS02@00400000

SS01 is also used for USB-A port with 3.0/3.1 devices, but with different address SS01@14900000, it's possible to have devices connected to both USB-A and USB-C, they then just appear twice in IOReg with different addresses

Edit: I removed SS03, HS02 and HS04 – I was a bit afraid to do it, but there's no difference, same situation as before. I still have USR1 and USR2 – should I remove those? I have no idea what they are and whether they do anything. (They're set to 3.)

Edit 2: out of sheer curiosity I checked sleep – closing the lid or using apple > Sleep causes first the screen to switch off, but USB-A is still powered, then once the WiFi dongle stops blinking that's it, no way back except pressing the power button for 10 seconds.
 
Last edited:
No change :(

So the USB-C ports are:
HS06 set to 0, paired with SS01 set to 9
HS03 set to 0, paired with SS02 set to 9
SS01 and SS02 do not change with orientation, addresses on USB 3.0/3.1 are SS01@00300000 and SS02@00400000

SS01 is also used for USB-A port with 3.0/3.1 devices, but with different address SS01@14900000, it's possible to have devices connected to both USB-A and USB-C, they then just appear twice in IOReg with different addresses

Edit: I removed SS03, HS02 and HS04 – I was a bit afraid to do it, but there's no difference, same situation as before. I still have USR1 and USR2 – should I remove those? I have no idea what they are and whether they do anything. (They're set to 3.)

Edit 2: out of sheer curiosity I checked sleep – closing the lid or using apple > Sleep causes first the screen to switch off, but USB-A is still powered, then once the WiFi dongle stops blinking that's it, no way back except pressing the power button for 10 seconds.
usb wifi can cause issues with sleep, not really recommended, best to try and swap out internal wifi for compatible hardware
 
Yup, I'll be getting an internal wifi, waiting for it to arrive. Let me reboot without wifi...

No :(
 
*sigh*

I spent all day trying to get something to work and my only achievement is the discovery that layout-id 3 works a bit better with AppleALC since it doesn't create non-existent line-in microphone. I also found out that this codec, ALC298, with device 10ec:0298 may actually be ALC3266. And! That IOReg didn't work because I had to enable Terminal in Accessibility (which I found out by accident googling something else and bumping into RehabMan's post).

Yeah. That's it.

log show --style syslog --start '2019-01-20 23:09:00' | fgrep "sleep"

2019-01-20 23:10:13.949646+0100 localhost kernel[0]: (AppleACPIPlatform) ACPI: sleep states S3 S4 S5
2019-01-20 23:10:25.954103+0100 localhost powerd[57]: [powerd:sleepWake] vm.darkwake_mode: 0 -> 0
2019-01-20 23:10:25.956858+0100 localhost powerd[57]: [powerd:sleepWake] vm.darkwake_mode: 0 -> 0
2019-01-20 23:10:25.961917+0100 localhost powerd[57]: [powerd:adaptiveDisplay] Proximity monitoring in sleep: Disabled. Run-time proximity notifications: Disabled
2019-01-20 23:10:25.963848+0100 localhost powerd[57]: [powerd:sleepWake] Failed to get sleep type. rc:0xe00002c7
2019-01-20 23:10:27.003861+0100 localhost powerd[57]: [powerd:adaptiveDisplay] Proximity monitoring in sleep: Disabled. Run-time proximity notifications: Enabled
2019-01-20 23:10:27.119765+0100 localhost kernel[0]: (kernel) CodecCommander: Node ID 0x14 supports EAPD, will update state after sleep.
2019-01-20 23:10:27.119897+0100 localhost kernel[0]: (kernel) CodecCommander: Node ID 0x17 supports EAPD, will update state after sleep.
2019-01-20 23:10:27.120024+0100 localhost kernel[0]: (kernel) CodecCommander: Node ID 0x1a supports EAPD, will update state after sleep.
2019-01-20 23:10:27.986040+0100 localhost kernel[0]: (kernel) [IGFB][INFO ] FB0: VSC SDP extention [colorimetry_supported] = 0 VSC Ext VESA SDP support = 0 VSC Ext CEA SDP supported = 0 and Sink sleep to wake timeOut request = 0
2019-01-20 23:10:28.403536+0100 localhost kernel[0]: (IOAudioFamily) + IOAudioDevice[<private>]::setIdleAudioSleepTime: sleepDelay = ffffffffffffffffffffffff
2019-01-20 23:10:28.403537+0100 localhost kernel[0]: (IOAudioFamily) - IOAudioDevice[<private>]::setIdleAudioSleepTime: sleepDelay = ffffffffffffffffffffffff
2019-01-20 23:10:28.752558+0100 localhost kernel[0]: (IOAudioFamily) + IOAudioDevice[<private>]::setIdleAudioSleepTime: sleepDelay = ffffffffffffffffffffffff
2019-01-20 23:10:28.752559+0100 localhost kernel[0]: (IOAudioFamily) - IOAudioDevice[<private>]::setIdleAudioSleepTime: sleepDelay = ffffffffffffffffffffffff
2019-01-20 23:10:28.757028+0100 localhost powerd[57]: [powerd:adaptiveDisplay] Proximity monitoring in sleep: Disabled. Run-time proximity notifications: Disabled
2019-01-20 23:10:29.509137+0100 localhost loginwindow[94]: [com.apple.loginwindow.logging:Standard] -[LoginApp continueSessionStartup] | telling power manager it's ok to sleep the machine now
2019-01-20 23:10:31.062523+0100 localhost powerd[57]: [powerd:adaptiveDisplay] Proximity monitoring in sleep: Disabled. Run-time proximity notifications: Enabled
2019-01-20 23:10:45.103709+0100 localhost sharingd[295]: [com.apple.sharing:Daemon] Clamshell change detected (clamshell closed: NO, clamshell sleep on close: NO)
2019-01-20 23:10:45.103725+0100 localhost sharingd[295]: [com.apple.sharing:Daemon] Clamshell change detected (clamshell closed: NO, clamshell sleep on close: YES)

log show --style syslog --start '2019-01-20 23:09:00' | fgrep "wake"

2019-01-20 23:10:47.059763+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.059788+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.061853+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.061867+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.064012+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.064043+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.065939+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.065955+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.068641+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.068696+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.070728+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.070745+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.072683+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.072701+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.074858+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.074885+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.078865+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.078882+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.080449+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.080463+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.082840+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.082861+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.085675+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set push wake topics without dark wake enabled: <private>
2019-01-20 23:10:47.085687+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] Attempt to set critical wake topics without dark wake enabled: <private>
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
2019-01-20 23:10:48.608786+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:48.609234+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:48.609246+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] <private>: connection set push wake topics from <private> to <private>
2019-01-20 23:10:48.685695+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:10:48.686464+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:48.689430+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:10:48.690091+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:48.694724+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:10:48.695367+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:48.850618+0100 localhost AddressBookSourceSync[412]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
2019-01-20 23:10:48.855954+0100 localhost AddressBookSourceSync[412]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
2019-01-20 23:10:48.859495+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 412
2019-01-20 23:10:48.859902+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 412
2019-01-20 23:10:52.223794+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 493
2019-01-20 23:10:54.927153+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 549
2019-01-20 23:10:55.033544+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:10:55.034185+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:55.036396+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:10:55.036947+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:10:57.904748+0100 localhost apsd[80]: [com.apple.apsd:courier] <private>: Will connect user <private> because in full wake
2019-01-20 23:11:00.021854+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 317
2019-01-20 23:11:00.177954+0100 localhost apsd[80]: [com.apple.apsd:courier] <private>: Will connect user <private> because in full wake
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
2019-01-20 23:11:05.012299+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:11:05.012312+0100 localhost apsd[80]: [com.apple.apsd:connectionServer] <private>: connection set push wake topics from <private> to <private>
2019-01-20 23:11:05.012795+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
2019-01-20 23:11:07.925409+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:11:07.926157+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:11:07.928397+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 258
2019-01-20 23:11:07.928820+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.push-to-wake' for 258
2019-01-20 23:11:39.215761+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 533
2019-01-20 23:11:40.674962+0100 localhost routined[282]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
2019-01-20 23:11:40.679636+0100 localhost routined[282]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
2019-01-20 23:11:49.281840+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 324
2019-01-20 23:11:49.284537+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 324
2019-01-20 23:11:49.292594+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.critical-wake-push' for 324
2019-01-20 23:11:49.293138+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.critical-wake-push' for 324
2019-01-20 23:11:49.751615+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 538
2019-01-20 23:11:50.744927+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 532
2019-01-20 23:11:50.745271+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 532
2019-01-20 23:11:51.676295+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 338
"darkwake_thermal_emergency_count" = 0;
2019-01-20 23:11:51.738378+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 532
2019-01-20 23:11:52.457349+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 338
2019-01-20 23:11:53.048397+0100 localhost AddressBookSourceSync[681]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
2019-01-20 23:11:53.052466+0100 localhost AddressBookSourceSync[681]: (CardDAVPlugin) [com.apple.contacts.carddav:plugin] -awakeFromLoad
2019-01-20 23:11:53.055891+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 681
2019-01-20 23:11:53.056232+0100 localhost apsd[80]: successful entitlement check 'com.apple.private.dark-wake-push' for 681
2019-01-20 23:11:56.672133+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 687
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
2019-01-20 23:12:05.217941+0100 localhost apsd[80]: Failed entitlement check 'com.apple.private.dark-wake-push' for 688
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
{name: PowerNapPolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{(inADarkWake == 0 AND appRefresh == 1) AND wakeState == "0x1f"}]}}
 
Last edited:
Welp. As I was working on codec dump etc. in Ubuntu, I started looking for what to do with the codec dump and found out that Yoga C930 doesn't have correct BIOS support for sound and sleep yet for non-Windows systems. Apparently it's coming. Now I'm about to install Windows to another partition so that I can update to the newest BIOS and see whether anything changes.

I'll be back when, well, something changes... in the meantime InsomniaX, even though it's abandonware, works when I accidentally shut the lid forgetting I'm not allowed to do it. :p

Edit: on layout 3 with AudioALC sound quality drastically improved. It's actually stereo and I don't need Boom 3D. I can't switch the subwoofer on though, neither can I switch on any of the microphones. Even though when I put the jack in/take it out the sound settings show mic input. (?)

External mic: pin 0x18
Soundbar: 0x1A
Subwoofer: 0x17
 
Last edited:
Latest status:

Sound

After the BIOS update subwoofer just works. It just doesn't subwoof as well as with Dolby Atmos. I added Boom 3D again and it sounds really good. Internal microphone doesn't work because of the BIOS limitations based on all I'd read on Linux forums. There is a workaround to enable the subwoofer in Linux, by the way. Headset microphone works (I found out not all headsets were created equal – my AKG doesn't register microphone input, but Samsung does.)

I am using vanilla AppleHDA, AppleALC, layout-id 7 (alc-layout-id = 3).

Triple boot

I have three OSes on the SSD now: macOS, Windows, and Ubuntu. Unfortunately AptioMemoryFix makes it impossible to chainload GRUB from Clover. No matter what teh internetz say, Clover (neither RehabMan's nor latest "official" build) does NOT detect the Ubuntu kernel location, it does not display an entry for the kernel. Linux and Kernel flags are on in the config, etc. AptioMemoryFix causes the boot to remain on the purple screen of death indefinitely. Removing AptioMemoryFix fixes the problem immediately, but – welp – I need to have it, because the OsxAptioFixDrv 1-2 cause immediate reboot, and OsxAptioFix3Drv only works, say, 20% of the time – four times I'll get the stop sign, then it will boot. I suppose it has something to do with the order in which drivers are loaded? I'm looking either for a way to not load AptioMemoryFix when I am booting Ubuntu, or to make OsxAptioFix3Drv work every time. Presence or absence of EmuVariable* doesn't make any difference.

The error caused by OsxAptioFix3Drv is Error loading kernel cache (0x9).

Sleep

On Linux, suspend on closing lid is possible. There is no sleep option in Ubuntu menu. I haven't gotten anywhere myself, it's exactly as it was – closing the lid or sending the computer to sleep means long-press on power button to switch it off.

Hotplugging USB-C

I left this for the end. IT WORKS!!!

I used many threads and posts as base for my research, patched and unpatched DSDT, only to discover this: https://www.tonymacx86.com/threads/usb-c-hotplug-not-working.223534/post-1518130

The patch included refers to RP15, which I replaced with RP01, which is where my USB 3.1 tree is.

The patch I compiled is:

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "TYPC", 0x00000000)
{
    External (_SB_.PCI0.RP01.PXSX, DeviceObj)    // (from opcode)

        Scope (\_SB.PCI0.RP01.PXSX) //UPSB
        {
            // This is the key fix for machines that turn off the Type-C port, right here.
            Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
            {
                Return (One) // Returning 0 means not a removable device. But we want to act like an ExpressCard! (credit dpassmor)
            }

            Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x02)
                {
                    "PCI-Thunderbolt",
                    One
                },
                Local0)
                Return (Local0)
            }

            Device (TBL1) //DSB0
            {
                Name (_ADR, Zero)  // _ADR: Address

                Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                {
                  Return (Zero)
                }
                 //The NHI is here. This gives us a real name for the device instead of just a device ID in IOReg
                  Device (NHI0)
                  {
                      Name (_ADR, Zero)  // _ADR: Address
                      Name (_STR, Unicode ("Thunderbolt"))  // _STR: Description String

                      Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                      {
                          Return (Zero)
                      }

                      Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                      {
                        Local0 = Package (0x03)
                        {
                            "power-save",
                            One,
                            Buffer (One)
                            {
                                 0x00
                            }
                        }
                        Return (Local0)
                      }

                      //TODO: May need more code here (?)

                  }

            }

            Device (TBL2) //DSB1
            {
                Name (_ADR, 0x00010000)  // _ADR: Address

                Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                {
                  Return (Zero)
                }

                //TODO: Gonna need a lot more code here for TB support...

                Device (TBLU) //UPS0 on DSB1
                {
                  Name (_ADR, Zero)

                  Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                  {
                    Return (One)
                  }

                  Device (TB00) //DSB0
                  {
                    Name (_ADR, Zero)

                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                      Return (One)
                    }

                    Device (DEV0) //DEV0
                    {
                      Name (_ADR, Zero)

                      Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                      {
                        Return (One)
                      }
                    }
                  }
                  ///////////////////////////////////////////////
                  Device (TB03) //DSB3
                  {
                    Name (_ADR, 0x00030000)

                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                      Return (One)
                    }
                    Device(TB3U) //UPS0
                    {
                      Name (_ADR, Zero)

                      Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                      {
                        Return (One)
                      }
                      Device(TB30) //DSB0
                      {
                        Name (_ADR, Zero)

                        Device(DEV0) //DEV0
                        {
                          Name (_ADR, Zero)
                        }
                      }
                      Device (TB33) //DSB3
                      {
                        Name (_ADR, 0x00030000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }

                        Device (DEV0) //DEV0
                        {
                          Name (_ADR, Zero)

                          Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                          {
                            Return (One)
                          }
                        }
                      }
                      Device (TB34) //DSB4
                      {
                        Name (_ADR, 0x00040000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }

                        Device (DEV0) //DEV0
                        {
                          Name (_ADR, Zero)

                          Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                          {
                            Return (One)
                          }
                        }
                      }
                      Device (TB35) //DSB5
                      {
                        Name (_ADR, 0x00050000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }
                      }
                      Device (TB36) //DSB6
                      {
                        Name (_ADR, 0x00060000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }
                      }
                    }
                  }
                  ///////////////////////////////////////////////
                  Device (TB04) //DSB4
                  {
                    Name (_ADR, 0x00040000)

                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                      Return (One)
                    }
                    Device(TB4U) //UPS0
                    {
                      Name (_ADR, Zero)

                      Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                      {
                        Return (One)
                      }
                      Device(TB40) //DSB0
                      {
                        Name (_ADR, Zero)

                        Device(DEV0) //DEV0
                        {
                          Name (_ADR, Zero)

                          Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                          {
                            Return (One)
                          }
                        }
                      }
                      Device (TB43) //DSB3
                      {
                        Name (_ADR, 0x00030000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }

                        Device (DEV0) //DEV0
                        {
                          Name (_ADR, Zero)

                          Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                          {
                            Return (One)
                          }
                        }
                      }
                      Device (TB44) //DSB4
                      {
                        Name (_ADR, 0x00040000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }

                        Device (DEV0) //DEV0
                        {
                          Name (_ADR, Zero)

                          Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                          {
                            Return (One)
                          }
                        }
                      }
                      Device (TB45) //DSB5
                      {
                        Name (_ADR, 0x00050000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }
                      }
                      Device (TB46) //DSB6
                      {
                        Name (_ADR, 0x00060000)

                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                          Return (One)
                        }
                      }
                    }
                  }
                  ///////////////////////////////////////////////
                  Device (TB05) //DSB5
                  {
                    Name (_ADR, 0x00050000)

                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                      Return (One)
                    }
                  }
                  Device (TB06) //DSB6
                  {
                    Name (_ADR, 0x00060000)

                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                      Return (One)
                    }
                  }
                }
            }

            Device (TBL3) //DSB2
            //USB port works; we're done here.
            {
                Name (_ADR, 0x00020000)  // _ADR: Address

                Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                {
                    Return (Zero)
                }

                Device (TBTU)
                {
                    Name (_ADR, Zero)  // _ADR: Address

                    Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                    {
                      0x6D,
                      Zero
                    })


                    Device (RHUB)
                    {
                        Name (_ADR, Zero)  // _ADR: Address
                        Method (GPLD, 2, Serialized)
                        {
                            Name (PCKG, Package (0x01)
                            {
                                Buffer (0x10) {}
                            })
                            CreateField (DerefOf (PCKG [Zero]), Zero, 0x07, REV)
                            REV = One
                            CreateField (DerefOf (PCKG [Zero]), 0x40, One, VISI)
                            VISI = Arg0
                            CreateField (DerefOf (PCKG [Zero]), 0x57, 0x08, GPOS)
                            GPOS = Arg1
                            Return (PCKG)
                        }

                        Method (GUPC, 1, Serialized)
                        {
                            Name (PCKG, Package (0x04)
                            {
                                Zero,
                                0xFF,
                                Zero,
                                Zero
                            })
                            PCKG [Zero] = Arg0
                            Return (PCKG)
                        }

                        Method (TPLD, 2, Serialized)
                        {
                            Name (PCKG, Package (0x01)
                            {
                                Buffer (0x10) {}
                            })
                            CreateField (DerefOf (PCKG [Zero]), Zero, 0x07, REV)
                            REV = One
                            CreateField (DerefOf (PCKG [Zero]), 0x40, One, VISI)
                            VISI = Arg0
                            CreateField (DerefOf (PCKG [Zero]), 0x57, 0x08, GPOS)
                            GPOS = Arg1
                            CreateField (DerefOf (PCKG [Zero]), 0x4A, 0x04, SHAP)
                            SHAP = One
                            CreateField (DerefOf (PCKG [Zero]), 0x20, 0x10, WID)
                            WID = 0x08
                            CreateField (DerefOf (PCKG [Zero]), 0x30, 0x10, HGT)
                            HGT = 0x03
                            Return (PCKG)
                        }

                        Method (TUPC, 1, Serialized)
                        {
                            Name (PCKG, Package (0x04)
                            {
                                One,
                                Zero,
                                Zero,
                                Zero
                            })
                            PCKG [One] = Arg0
                            Return (PCKG)
                        }

                        Device (UB21)
                        {
                            Name (_ADR, One)  // _ADR: Address
                            Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
                            {
                                Return (TUPC (0x09))
                            }

                            Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
                            {
                                Return (TPLD (One, One))
                            }
                        }

                        Device (UB22)
                        {
                            Name (_ADR, 0x02)  // _ADR: Address
                            Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
                            {
                                Return (GUPC (Zero))
                            }

                            Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
                            {
                                Return (GPLD (Zero, Zero))
                            }
                        }

                        Device (UB31)
                        {
                            Name (_ADR, 0x03)  // _ADR: Address
                            Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
                            {
                                Return (TUPC (0x09))
                            }

                            Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
                            {
                                Return (TPLD (One, One))
                            }
                        }

                        Device (UB32)
                        {
                            Name (_ADR, 0x04)  // _ADR: Address
                            Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
                            {
                                Return (GUPC (Zero))
                            }

                            Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
                            {
                                Return (GPLD (Zero, Zero))
                            }
                        }
                    }
                }
            }
        }
}
(code by @KNNSpeed)

Replacing RP15 with RP01 = instant success (I found out earlier via IOJones that my USB-C devices attach to RP01@1C)

I'm sitting here with a big grin on my face connecting and disconnecting USB-C devices, 3.0 and 3.1, and my husband thinks I lost my mind. This also confirms my suspicion that there is something going on between my external SSD with USB-C – USB-C cable, for some reason sometimes I have to turn it. The USB sticks work in either direction.

At this point all I need to achieve is for closing the lid not to cause the computer to die and all will be good enough, if perhaps not perfect. I can just about live with using a headset for Skype and starting Ubuntu through the BIOS boot menu, even though I wish I could just use my Clover boot entry.

Edit: My BCM20702A0 card (0489:e07a) arrived, put BrcmFirmwareRepo and BrcmPatchRAM2 in /L/E, Wifi and Bluetooth work. Re-extracted DSDT/SSDT files, re-patched the DSDT, still can't sleep. USB ports are configured, no more dongle. I think the laptop doesn't "fall asleep" at all, actually. The screen goes out...but the power button light doesn't blink, the keyboard backlight stays on, and sometimes the fans stay on even though the laptop is already unable to wake.
 
Last edited:
Status
Not open for further replies.
Back
Top