Giter Club home page Giter Club logo

Comments (111)

zombillano avatar zombillano commented on May 17, 2024 1

I can confirm I also am getting high energy drain while keeping the laptop in sleep mode. I kept it in sleep mode for around 24 hours and the battery went from 100% to 78%, with power nap disabled.

Yeah, I have the same sleep/battery drain ratio: ~1% every 1 hour. I remember it was 1% every 10-12h using release 3.3.6, I think, but I don't have the time to test it and narrow this bug down, mainly because we need to discard every kext and every app we are using.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024 1

I can confirm I also am getting high energy drain while keeping the laptop in sleep mode. I kept it in sleep mode for around 24 hours and the battery went from 100% to 78%, with power nap disabled.

That’s quite normal, try it on Linux or Windows with hibernate disabled and it will be same ( at least for me ). There are dozens reports about 1W per 1h. Disabling always on USB does the trick for many ( I did not test it yet )

You can’t compare S3 Linux/macOS sleep with Windows hibernate as with hibernation, machine is effectively shutdown.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024 1

@EETagent You don't need to. I've tested it with the small efi-driver from here: tylernguyen/x1c6-hackintosh#44 (comment)

I know, but it's better to have mainline support for it. This repo has always been bleeding edge and this is great reason to finally move to new OC version. There is now even Dortania build service for it, so I no longer need to manually compile it. Only thing I need to do is to update config.plist and resign efi files for Secure Boot support.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024 1

hi @benbender the RTC-wakeups are no longer appearing since many days ago. However i'm still facing the issue of power drain of 1% per hour. I'm using BCM94360CS2. This should be the only difference between my machine and others.

Like I sad, try to create Fedora live USB and measure sleep power consumption with it, I bet it would be similar. Did you disabled Always on USB? That consumes lots of power. You may want to try hibernation as per comment @benbender linked ( Without that EFI driver, it´s now included in config.plist since bf6a685 )

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024 1

Yes, but it doesn't work.
Afaik rtc-blacklist only blocks writes from boot.efi where RTCMemoryFixup blocks writes from the darwin kernel.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

It looks like your computer did not enter sleep properly.

sleep prevented by sharingd

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

I've disabled Airdrop/Handoff and there's nothing there under sleep (pmset).
Closed the lid.
Still decreasing 3% in 1 hour.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Does sleep LED blink? I shutdown my computer as a sleep from external drive does not work currently. Maybe @zombillano, @tienhuynh5312 can share their experience here

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Yeah it does blink as per normal sleep.

from t480-opencore-hackintosh.

tienhuynh5312 avatar tienhuynh5312 commented on May 17, 2024

@EETagent i heard that you might encounter some issues if you boot from external drives.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi. I've been monitoring it and I noticed that even during sleep (led blinks), my wifi card is still warm after an hour.

The wifi card i'm using is BCM94360CS2. Any way to better manage this wifi card during sleep?

from t480-opencore-hackintosh.

zombillano avatar zombillano commented on May 17, 2024

Mine has proper power management, using the wifi card that came with my t480 (intel AC8265 I guess)

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Did it happen when you had unmodded UEFI? Did you encountered this before you swapped your network card? Try to test sleep power consumption with Linux live USB. Sadly, currently there is nothing we can do about it.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

I've narrowed down the BCM94360CS2 airport card heat to Bluetooth. In hackintool, if I remove the BRCM20702 Hub at HS07, it won't heat up anymore and power drain slows down considerably.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

You fully removed Bluetooth? Either faulty card or weird USB power settings. Please remove USBPorts.kext and use USBMap.kext from here

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi @EETagent thanks for the tip. I am using USBMap.kext now and have removed my wifi card, placed some insulation tape around it and now battery drain is better.

The power consumption during standby is now 1% per hour.
I am using 24Wh (internal) + 24Wh (external).

is this about the same for you guys? 1% per hour drain rate during sleep.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

I can’t report macOS values, but when on Linux, TP definitely does not lose 10% of battery during 10h sleep. Like I sad above, try some Linux live USB and check sleep power consumption with it.

from t480-opencore-hackintosh.

zombillano avatar zombillano commented on May 17, 2024

is this about the same for you guys? 1% per hour drain rate during sleep.

Nope, that's still too high. Battery usage under sleep has been tested before by myself and reported over the features enhancement issue. My T480 only consumes 1% every ~10-12 hours. I can test it again but to me your consumption is pretty high.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 Do a longer sleep (at least a few hours) and paste the output of "pmset -g log" (the last part for the actual sleep-session is enough) afterwards to see whats going on.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi @benbender thanks alot for asking. Here's my log and appreciate if you have any input:

`2020-08-29 08:11:59 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep': Using Batt (Charge:96%) 54731 secs
2020-08-29 08:12:01 +0800 Wake Requests [*process=powerd request=UserWake deltaSecs=158212 wakeAt=2020-08-31 04:08:53 info="com.apple.alarm.user-visible-Weekly Usage Report,327"]
2020-08-29 08:12:01 +0800 PM Client Acks Delays to Sleep notifications: [com.apple.apsd is slow(2014 ms)]
2020-08-29 23:24:09 +0800 Kernel Client Acks Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(1441 ms)] [AppleDeviceManagementHIDEventService driver is slow(msg: WillChangeState to 2)(422 ms)] [IOSCSIPeripheralDeviceType00 driver is slow(msg: SetState to 0)(502 ms)] [IOUSBMassStorageInterfaceNub driver is slow(msg: SetState to 0)(501 ms)]
2020-08-29 23:24:09 +0800 Notification Display is turned on
2020-08-29 23:24:09 +0800 Assertions Kernel Idle sleep preventers: IODisplayWrangler
2020-08-29 23:24:09 +0800 Assertions PID 222(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00 id:0x0xd000085b2 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:09 +0800 Assertions PID 222(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00 id:0x0xd000085b2 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:09 +0800 Notification Next immediate inactivity window start:'2020-08-29 23:15:00 +0800' end:'2020-08-29 23:45:00 +0800'
2020-08-29 23:24:09 +0800 Notification Next largest inactivity window start:'2020-08-30 00:15:00 +0800' end:'2020-08-30 08:00:00 +0800'
2020-08-29 23:24:10 +0800 Wake Wake from Safe Sleep [CDNVA] : due to /Lid Open Using BATT (Charge:60%)
2020-08-29 23:24:10 +0800 WakeDetails DriverReason:PXSX - DriverDetails:
DriverReason:WiFi.ScanOffload-Group key handshake timeout - DriverDetails:
2020-08-29 23:24:10 +0800 HibernateStats hibmode=3 standbydelaylow=0 standbydelayhigh=0 222
2020-08-29 23:24:10 +0800 WakeTime WakeTime: 54996.216 sec
2020-08-29 23:24:10 +0800 Kernel Client Acks Delays to Wake notifications: [AirPort_BrcmNIC driver is slow(msg: SetState to 2)(366 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 2)(398 ms)] [ApplePS2Controller driver is slow(msg: SetState to 2)(425 ms)] [IOUSBMassStorageDriverNub driver is slow(msg: SetState to 1)(561 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(590 ms)] [RMIBus driver is slow(msg: SetState to 1)(1036 ms)]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleDisplaySleep "com.apple.audio.context79.preventuseridledisplaysleep" 25:39:00 id:0x0x50000804e [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleSystemSleep "com.apple.audio.context79.preventuseridlesleep" 25:39:00 id:0x0x10000804d [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleDisplaySleep "com.apple.audio.context80.preventuseridledisplaysleep" 25:39:00 id:0x0x500008052 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleSystemSleep "com.apple.audio.context80.preventuseridlesleep" 25:39:00 id:0x0x100008051 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleDisplaySleep "com.apple.audio.context81.preventuseridledisplaysleep" 25:39:00 id:0x0x500008056 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:10 +0800 Assertions PID 215(coreaudiod) Released PreventUserIdleSystemSleep "com.apple.audio.context81.preventuseridlesleep" 25:39:00 id:0x0x100008055 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:12 +0800 Assertions PID 181(loginwindow) Created UserIsActive "Loginwindow User Activity" 00:00:00 id:0x0x9000085ee [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:12 +0800 Assertions PID 181(loginwindow) Released UserIsActive "Loginwindow User Activity" 00:00:00 id:0x0x9000085ee [System: PrevIdle DeclUser kDisp]
2020-08-29 23:26:06 +0800 Assertions PID 429(sharingd) Released PreventUserIdleSystemSleep "Handoff" 00:01:53 id:0x0x1000085f1 [System: PrevIdle DeclUser kDisp]

Total Sleep/Wakes since boot at 2020-08-28 21:44:57 +0800 :4

2020-08-29 23:30:53 +0800 : Showing all currently held IOKit power assertions
Assertion status system-wide:
BackgroundTask 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 0
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 153(hidd): [0x000021810009859a] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:10000043c name:IOHIDEventDriver product:Keyboard eventType:3"
Timeout will fire in 119 secs Action=TimeoutActionRelease
pid 429(sharingd): [0x0000225400018663] 00:04:44 PreventUserIdleSystemSleep named: "Handoff"
pid 421(useractivityd): [0x0000236c00018683] 00:00:04 PreventUserIdleSystemSleep named: "BTLEAdvertisement"
Timeout will fire in 56 secs Action=TimeoutActionTurnOff
pid 351(Intel Power Gadget): [0x0000002500018098] 25:45:29 PreventUserIdleSystemSleep named: "logging system metrics"
Kernel Assertions: 0x8=BT-HID
id=503 level=255 0x8=BT-HID mod=01/01/1970, 7:30 AM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
Idle sleep preventers: IODisplayWrangler
firefly1@FireFly1s-MBP ~ % 2020-08-29 08:11:59 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep': Using Batt (Charge:96%) 54731 secs
2020-08-29 08:12:01 +0800 Wake Requests [*process=powerd request=UserWake deltaSecs=158212 wakeAt=2020-08-31 04:08:53 info="com.apple.alarm.user-visible-Weekly Usage Report,327"]
2020-08-29 08:12:01 +0800 PM Client Acks Delays to Sleep notifications: [com.apple.apsd is slow(2014 ms)]
2020-08-29 23:24:09 +0800 Kernel Client Acks Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(1441 ms)] [AppleDeviceManagementHIDEventService driver is slow(msg: WillChangeState to 2)(422 ms)] [IOSCSIPeripheralDeviceType00 driver is slow(msg: SetState to 0)(502 ms)] [IOUSBMassStorageInterfaceNub driver is slow(msg: SetState to 0)(501 ms)]
2020-08-29 23:24:09 +0800 Notification Display is turned on
2020-08-29 23:24:09 +0800 Assertions Kernel Idle sleep preventers: IODisplayWrangler
2020-08-29 23:24:09 +0800 Assertions PID 222(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00 id:0x0xd000085b2 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:09 +0800 Assertions 2020-08-29 08:11:59 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep': Using Batt (Charge:96%) 54731 secs
2020-08-29 08:12:01 +0800 Wake Requests [*process=powerd request=UserWake deltaSecs=158212 wakeAt=2020-08-31 04:08:53 info="com.apple.alarm.user-visible-Weekly Usage Report,327"]
2020-08-29 08:12:01 +0800 PM Client Acks Delays to Sleep notifications: [com.apple.apsd is slow(2014 ms)]
2020-08-29 23:24:09 +0800 Kernel Client Acks Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(1441 ms)] [AppleDeviceManagementHIDEventService driver is slow(msg: WillChangeState to 2)(422 ms)] [IOSCSIPeripheralDeviceType00 driver is slow(msg: SetState to 0)(502 ms)] [IOUSBMassStorageInterfaceNub driver is slow(msg: SetState to 0)(501 ms)]
2020-08-29 23:24:09 +0800 Notification Display is turned on
2020-08-29 23:24:09 +0800 Assertions Kernel Idle sleep preventers: IODisplayWrangler
2020-08-29 23:24:09 +0800 Assertions PID 222(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00 id:0x0xd000085b2 [System: PrevIdle DeclUser kDisp]
2020-08-29 23:24:09 +0800 Assertions
`

As seen above, the sleep was at 8:12 AM and battery was at 96%
At 23:24:10 pm, battery was only at 60%.

Thanks.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Something isn't going completely in S3. Check with syslog with "log show --last boot". Do you use the exact same config from this repo or did you change anything? Any devices connected while doing the S3?

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi. Yes I'm using the same config except

  1. Changed the platform info to match my own random set of serials
  2. I removed the intel wifi kexts. I am using an apple airport wifi card with a m.2 converter.

no devices are connected while sleeping. I even turned off the always ON power for the USB.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Dear @EETagent / @zombillano ,
I found that my DSDT.dsl Processor is using "_PR" prefix while your prefix uses "_SB".
I am using i5-8350u processor. Attached is my DSDT.dsl and your current SSDT-PLUG.dsl. I noticed some battery improvement after using SSDT Time to get my SSDT-PLUG.aml but I wonder if I should just use your SSDT-Plug.aml and change the prefix to "_PR".

Can you take a look?
Thanks.
DSDT&SSDT-swatchie.zip

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

After some tests, i notice my T480 logs show that it wakes up every 2 hours with RTC/Alarm reason.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Bloody hell, you are right. Probably some mistake from when I recompiled/edited ACPI patches, before it was _PR.PR00. I've just checked my DSDT and this is huge bug as SSDT-PLUG now does not do anything actually. I will release hotfix immediately.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Great. Hope it solves my sleep battery drain issue too.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@swatchie-1

Why you have there this though? _PR_.PR00

Shouldn't it be without that second underscore like OC little has? In my DSDT, it is without underscore too.
_PR.PR00

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

After some tests, i notice my T480 logs show that it wakes up every 2 hours with RTC/Alarm reason.

You may want to try to experiment with https://github.com/acidanthera/RTCMemoryFixup
It would help you with removing conflicting offsets.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Oh yes you are right. Typo on my part. Correcting it now and testing it again.

Why you have there this though? _PR_.PR00

Shouldn't it be without that second underscore like OC little has? In my DSDT, it is without underscore too.
_PR.PR00

from t480-opencore-hackintosh.

zombillano avatar zombillano commented on May 17, 2024

After some tests, i notice my T480 logs show that it wakes up every 2 hours with RTC/Alarm reason.

You may want to try to experiment with https://github.com/acidanthera/RTCMemoryFixup
It would help you with removing conflicting offsets.

Weren't we using RTCMemoryFixup before release 4.0? I haven't got time to check battery drain while sleeping but I think mine does discharge at a similar ratio as @swatchie-1. I remember it was just fine when I tested it. I was running release 3.XX at that time.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

After some tests, i notice my T480 logs show that it wakes up every 2 hours with RTC/Alarm reason.

You may want to try to experiment with https://github.com/acidanthera/RTCMemoryFixup
It would help you with removing conflicting offsets.

According to the forumer here, the RTCMemoryFixup doesn't fix the RTC Alarm. I read in the Dortania guide that it may be due to some application causing it. Will continue to experiment.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

After some tests, i notice my T480 logs show that it wakes up every 2 hours with RTC/Alarm reason.

You may want to try to experiment with https://github.com/acidanthera/RTCMemoryFixup
It would help you with removing conflicting offsets.

Weren't we using RTCMemoryFixup before release 4.0? I haven't got time to check battery drain while sleeping but I think mine does discharge at a similar ratio as @swatchie-1. I remember it was just fine when I tested it. I was running release 3.XX at that time.

Yes, it was here but does nothing by default ( offset boot argument is needed ) so I removed it.
For me when on Linux, it is about 1% for 1,5h (1,3h) sleep to memory. On Windows, statistics are better as laptop enters hibernate mod automatically after some time. That's why I would like to have hibernation working flawlessly someday, even though that macOS handles reopening windows after shutdown fairly well

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@swatchie-1 Also do you have Power Nap enabled in energy preferences?

from t480-opencore-hackintosh.

darioZIP avatar darioZIP commented on May 17, 2024

I can confirm I also am getting high energy drain while keeping the laptop in sleep mode. I kept it in sleep mode for around 24 hours and the battery went from 100% to 78%, with power nap disabled.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent Working fix for hibernatemode 25 is here: tylernguyen/x1c6-hackintosh#44 (comment) (+ efi-driver 2 posts below)

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

@benbender have you tried it on the t480 yet and does it work? Wow

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 Not extensively yet, but yes, it works on T480. And the EFI-driver should be a temporary solution. The patch did land in OC 0.6.2 already (acidanthera/OpenCorePkg@fdfdc7e)

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@EETagent Working fix for hibernatemode 25 is here: tylernguyen/x1c6-hackintosh#44 (comment) (+ efi-driver 2 posts below)

Wow, really interesting stuff. Will move master to 0.6.2 then

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent You don't need to. I've tested it with the small efi-driver from here: tylernguyen/x1c6-hackintosh#44 (comment)

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Added in bf6a685

BTW, I actually moved toOC 0.6.2 7 days ago but at that time, there were no important changes

from t480-opencore-hackintosh.

zombillano avatar zombillano commented on May 17, 2024

Wow, pretty interesting. I will test right now. Do I need to modify anything apart of OC files?

Update: @EETagent did you made a typo on config.plist? I'm getting "DCS: No scheme for ARTFrequency at 1 index. context!" at boot.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 The RTC-Wakeups are normal. Thats MaintenanceWake via RTC-Clock. Try to disable PowerNap and see if it's gone to be sure. I suspect your power draw to be higher because of the "WillChangeState to 2"-messages. It should be S3 afaik for all devices except for the memory.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

hi @benbender the RTC-wakeups are no longer appearing since many days ago. However i'm still facing the issue of power drain of 1% per hour. I'm using BCM94360CS2. This should be the only difference between my machine and others.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

At least the RAM has to be powered on for S3 and genuine macs (and every other OS) therefor "suffering" some powe loss in S3. "Hibernatemode 3" in OSX is actually S3 (standby) + going to S4 (hibernation) if the battery goes low to save the contents of the ram. So some power loss is really absolutely normal.

Even more true for the T480 as its ram isn't soldered and mostly non-low-power. (Thats also the reason why so many machines have soldered ram these days - aside from microsofts requirement that it has to be soldered on to get the "modern-standby"-patch from them. And likely also the reason why the T480 doesn't support "modern standby" or "S0 deepidle")

Why is it done this way? Because you want your machine to be ready as fast as possible after standby/sleep. With S0-deepidle you should get nearly instant resume (under 1 second) - if the hardware, firmware and OS are supporting it properly.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Hi @benbender,

may you please share your config.plist with hibernation working? I am actually pretty confused from that thread which Quirks have to be enabled/disabled. Thanks

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Hey, sure: https://github.com/benbender/x1c6-hackintosh/blob/experimental/optional/Config-Hibernation.plist

(I've gotten a X1C6 a few days ago and playing with it and will gather experimental configs and parts)

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Hey, sure: https://github.com/benbender/x1c6-hackintosh/blob/experimental/optional/Config-Hibernation.plist

(I've gotten a X1C6 a few days ago and playing with it and will gather experimental configs and parts)

Thanks, really helpful.

Did you though about adding offset to NVRAM | 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 | rtc-blacklist instead of boot-args?

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi. As for me, USB always ON is already disabled at bios.
Still consumes about 1% per hour during sleep. Thing is, i can standby my T440P for days. But for the T480, that's the power consumption rate of 1% per hour using a total of 48Wh battery.

Screenshot 2020-10-07 at 7 43 30 AM

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Did you already tried sleep with some live Linux distro?

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Did you already tried sleep with some live Linux distro?
I have not.
Would it be any different from windows?

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Yes, Windows hibernate by default ( From sleep after some time ), that's unfair comparison.

Hibernation should be enabled with latest commit, so you may try that too.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@swatchie-1

Just tested hibernation and it works well. Add these two lines to your .zshrc

alias hibernate="sudo pmset -a hibernatemode 25 && pmset sleepnow"
alias sleepnow="sudo pmset -a hibernatemode 3 && pmset sleepnow"

And choose between hibernate and sleep using Terminal

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

@EETagent i'm trying your latest repo. I've done the sudo pmset -b hibernatemode 25
and i put it to sleep. It looks like it's the same as sleep. It takes the same amount of time to wake up, about 3 secs.

Does it help in your battery life while hibernating?
Thanks.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent i'm trying your latest repo. I've done the sudo pmset -b hibernatemode 25
and i put it to sleep. It looks like it's the same as sleep. It takes the same amount of time to wake up, about 3 secs.

hibernate takes noticeable longer to wakeup from. The command is pmset -a hibernatemode 25 (not -b). After that, check your settings with sudo pmset -g. Read the manual with man pmset. :)

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@EETagent i'm trying your latest repo. I've done the sudo pmset -b hibernatemode 25
and i put it to sleep. It looks like it's the same as sleep. It takes the same amount of time to wake up, about 3 secs.

Does it help in your battery life while hibernating?
Thanks.

Like @benbender says, you have typo in your command. Copy that one which I posted above.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@swatchie-1 You may want to try https://raw.githubusercontent.com/benbender/x1c6-hackintosh/experimental/EFI/OC/dsl/SSDT-ARPT.dsl
This patch shuts down whole PCI-E slot, effectively eliminating all Wi-Fi card related power drain. Please try and report back.

@benbender Thanks for all your work. Looking to try your new battery patch soon. You are a real ACPI Jesus man!

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Thanks ;)

Note: SSDT-ARPT only works with Broadcom-cards with OSX-native drivers (they can be spoofed, but need to use the OSX drivers) as the driver accesses these ACPI-methods. It does not work with Intel atm.

PS: brought the idea to my mind to suggest to implement them to the itlwm-devs ;)

@EETagent Btw, I'm down to ~0.6W idle draw on the T480 (2k screen, 32GB ram, 2Tb SSD) with everything in bios enabled (TB enabled, bios-assist off, USB always power on, every io-port enabled etc). Biggest impact: correctly shutdown dGPU + TB in OSX + CFG Lock Unlocked in BIOS and clean USB-setup.

T480-powerdraw

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Wow, amazing. will try it out.
@benbender have you tested your battery life on a full charge 48wh battery? 5 hours with light browsing/youtube?

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 The battery-life in context of video is generally bad, because we are missing apple's GuC-FW for the GPU and doing parts of the video decoding in software.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

No wonder it takes ages to compile and run apps in Xcode.
@benbender I'm trying out your SSDT-ARPT.dsl and compiled it to .aml

I don't think it changed anything. My broadcom wifi card is still heating up after hours of sleeping. Battery was 77% and dropped to 66% after 5 hours.

Is there anything I need to change in the aml file?
What I did was:

  1. put the SSDT-ARPT.aml to the ACPI folder
  2. I used propertree and snapshot it
  3. Reboot and sleep.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Don't know your setup and I don't know propertree, so I can't tell. The GPU doesn't have to do much with compilation times.

from t480-opencore-hackintosh.

sajtrga avatar sajtrga commented on May 17, 2024

Hi y'all, I figured I'd just chime in on this issue, I used to have about 5% per hour battery drain during sleep, but since I updated to 3e9bc18 the drain is now about 5% per day. I still have pretty poor battery life (3h of light load), but at least the sleep issue seems to be resolved for me.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@sajtrga 5% per 24 hours on hibernatemode 3 / S3-Standby? That would be extremely good. Could you pin down from which version/commit you upgraded?

from t480-opencore-hackintosh.

sajtrga avatar sajtrga commented on May 17, 2024

I think I was on 0a52b43 before I updated, though I'm not 100% sure

Don't quote me exactly on the 5% per 24h number, I realize now that the way I wrote it sounds misleading, sorry, I meant it more as an order of magnitude (x per day instead of x per hour). I did try leaving it in sleep for a little over an hour to see the exact battery drain, and this was the result:

image
image

So, nothing of value, apart from the fact that the battery consumption per hour was <1%, compared to the previous 5%. Then I left it overnight, and when I came back the next day it was indeed at 95%. However, I did not note the exact time I got the 95% value, it was probably a bit less than 24h. I'll try to do a more accurate measurement when find the time to not use a computer for 24h.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@sajtrga you can check pmset -g log after a longer sleep. Would love to see a logfile of that sleep (via pmset -g log > sleep.log). Thank you!

from t480-opencore-hackintosh.

sajtrga avatar sajtrga commented on May 17, 2024

Right, so I'm dumb and the 5% per day figure was just wishful thinking apparently. I did a more thorough test and this was the result:
image
image

The 5% figure I got must have been just an overnight thing. Anyways, Here's the log:
sleep.log

15% per 24h is still good enough for me, so I wouldn't consider high power usage during sleep an issue anymore with that figure, at least for me

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

yeah, thats more in line with the usual ~1% per hour. At least I'm glad that it works for you and I'm also unsure if genuine macs are so much better in terms of power draw on standby...

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

@benbender can you tell us how did you achieve 0.65W at idle?
I already did the SSDT-ARPT in my T480 but results is 1.5W at idle.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 SSDT-ARPT doesn't do anything in terms of runtime-power consumption. It may help with power draw in sleep but even that isn't sure and if it does, it's minor.

Regarding runtime power-draw mostly 4 things matter: TB-controller, dGPU, correct USB-mapping & correctly done PM. 1.5W draw in idle suggests that your TB-controller is running. Try to disable it with the following:

disable-tb-and-dgpu.zip

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

@benbender thanks i'm using it now. power consumption drops to 1.35W.
There's still the 1% per hour battery drain during sleep and the wifi broadcom card is still warm during sleep.
I've installed the SSDT-ARPT from your repo too but it doesn't seem to make any difference. Do you have a SSDT-ARPT for T480 specifically?

Thanks.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

thanks i'm using it now. power consumption drops to 1.35W.
There's still the 1% per hour battery drain during sleep and the wifi broadcom card is still warm during sleep.
I've installed the SSDT-ARPT from your repo too but it doesn't seem to make any difference. Do you have a SSDT-ARPT for T480 specifically?

Thanks.

Do you have OSDW method enabled at boot? Otherwise SSDT-ARPT does not work

        Method (OSDW, 0, NotSerialized)
        {
            If (CondRefOf (\_OSI))
            {
                If (_OSI ("Darwin"))
                {
                    Return (One) // Is OSX
                }
            }

            Return (Zero)
        }

If not, just replace every If (OSDW ()) with If (_OSI ("Darwin"))
Do not forget that !OSDW () is not same as OSDW ()

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent Note:

SSDT-ARPT doesn't do anything in terms of runtime-power consumption.

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@EETagent Note:

SSDT-ARPT doesn't do anything in terms of runtime-power consumption.

Yeah I know, he talks about card warming up during sleep

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

@benbender
Also which version of iasl you use?

I am getting Illegal forward reference (\_S3) in SSDT-SLEEP with both latest MaciASL and iasl 20200925 compiled directly from ACPICA's latest source

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent

Yeah I know, he talks about card warming up during sleep

Ah, I see. Stupid me ;)

Also which version of iasl you use?

Was using 6.2, updated to 6.3 in the meantime (which is quite picky) but didn't update the repo yet as I want to stabilize some things first

from t480-opencore-hackintosh.

EETagent avatar EETagent commented on May 17, 2024

Tried with 20200528 you precompiled in your repo and it went without error. 20200925 does not like (\_S3) though.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent Ah, ok, then it was more recent than I thought...

Fix for _S3 is simply declaring it as external (untyped as it's only a named-object) above:

External (_S3) 

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

@benbender should be working now where the broadcom card is not heating up anymore during sleep. Will test further.
I used your utils ssdt to activate the osdw.
Power now at 1.30W lowest. Still can't get it to your 0.6W which is really amazing.
I did those 4 stuffs you told me to: USB remapping, TB patch, dGPU patch, maximize battery during boot, cfg unlock. My unit does not have a discreet GPU by the way. I'm having the intel UHD.

Regarding the TB, i disabled all in the bios.
Any other suggestions you might have?

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Still doesn't work. Despite trying out the SSDT-ARPT from @benbender 's repo, it still heats up. Battery drain seems more than before. 2% per hour.
Anything to try?

from t480-opencore-hackintosh.

Charlyo avatar Charlyo commented on May 17, 2024

In my T460 i get < 0.5W by disabling the card reader. I know it is pcie based and the kext is not 100% stable. I think it might be worth trying for you guys (although yours is usb)

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@Charlyo in a correct setup, the usb-card-reader is powergated and has no impact. If it does, the usb-setup is incorrect.

For things in PCIe-ports: You can disable those with this method: https://github.com/daliansky/OC-little/blob/d332eca397c4771f89ce117b9561ab7a655287ff/docs/16-%E7%A6%81%E6%AD%A2PCI%E8%AE%BE%E5%A4%87/SSDT-RP01.PXSX-disbale.dsl

(Setting the disable bit in the PCI-config-space in memory for that particular port)

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Screenshot 2020-11-03 at 8 29 52 PM

Dear @benbender and @Charlyo
I still cannot below about 1.5W. I'm using the

  1. SSDT-ARPT
  2. SSDT-OFFTB
  3. SSDT-OFFDGPU (i've no DGPU in my system)

but still to no avail.

I think there is still either a TB or a USB that is still actively drawing power since the CPU power is already low.
I've disabled Thunderbolt in the Bios I/O port.

Here's a screenshot on the CPU power

Screenshot 2020-11-03 at 8 32 17 PM

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 To diagnose further, please attach:

a) An IOReg-dump (https://github.com/vulgo/IORegistryExplorer)
b) A dump of your syslog (log show --last boot > syslog-swatchie.log)

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi @benbender I appreciate you taking the time to look at this. Hope it helps other community members too with these troubleshooting.

Sys Log:
[removed]

ioreg:
[removed]

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Don't have much time, but a first look revealed the following:

Multiple ACPI-Errors in your syslog (see with smth like log show --last boot|grep AE_)

Remove DGOFF as you don't have the HGOF()-method which it uses because you don't have a dGPU.

some of your usb-connectors are wrong:

  • HS04 is connectortype 0x09
  • HS09 is connectortype 0xFF
  • SS04 is connectortype 0x09

Your PMC-config is wrong:

  • Your PPMC-device is missing (it should be enabled and have AppleIntelPCHPMC attached, you seem to have faked it to pmcr with no real PCI-device attached to it)

Additionally:

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@EETagent @swatchie-1 Please adapt the following PR: benbender/x1c6-hackintosh@7e69d7f

Simpler, runs earlier and shouldn't fail if someone has:

  • no dGPU
  • TB bios-assist enabled and therefor PM in the TB-ICM

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Thanks. Let me try from the beginning. Adding those stuff such as AppleIntelPCHPMC, disabling PPMC and adding PPMC causes my bluetooth to stop functioning.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 if you have a T480, you have a PPMC-device. Thats your Power Management Controller. I don't have a clue how this interferes with your BT tbh. Without any logs, errors or similar its impossible to say whats up. But killing the PMC and replacing it with some arbitrary devices with no PCI-device attached to it is surely not the right way to fix it.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Dear @benbender I've done what you taught me to and I've removed most of the AE_Not_Found errors.
Now the AE_Bad_Parameter remains which stems from : IOAPIC: Version 0x20 Vectors 64:111

Can I ask you about:

  1. My Power consumption is still 1.4W at idle. I fixed my USBPorts. Can you see if there's anything else?
  2. My Broadcom wifi card, i suspect is RP07 (based on the DSDT) but the SSDT-ARPT is targeting RP01. Should I change it to RP07?

Thank you.

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Dear @benbender I've done what you taught me to and I've removed most of the AE_Not_Found errors.
Now the AE_Bad_Parameter remains which stems from : IOAPIC: Version 0x20 Vectors 64:111

Ah sorry, could have mention that. The error is normal and exists on every OS. Root cause unknown.

Can I ask you about:

  1. My Power consumption is still 1.4W at idle. I fixed my USBPorts. Can you see if there's anything else?

Fix your PMC.

  1. My Broadcom wifi card, i suspect is RP07 (based on the DSDT) but the SSDT-ARPT is targeting RP01. Should I change it to RP07?

Yes, but it will not have any effect on runtime power-usage. In fact I've abandoned the SSDT for now.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi @benbender regarding achieving 0.63W,

  1. Regarding the PMC, i still can't find anything else to power down. I've tried the OFFTB and OFFDGPU but i'd have AE_not_found errors if I activate them, so I deactivated the two SSDTs. I've also done:
  • Thunderbolt BIOS Assist Mode Disabled
  • Wake by Thunderbolt(TM) 3 Enabled
  • Security Level User Authorization
  • Support in Pre Boot Environment -> Thunderbolt(TM) device Enabled

Screenshot 2020-11-06 at 11 08 42 PM

Any other PMC items i should look out for?

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

@swatchie-1 if you have a T480, you have a PPMC-device. Thats your Power Management Controller. I don't have a clue how this interferes with your BT tbh. Without any logs, errors or similar its impossible to say whats up. But killing the PMC and replacing it with some arbitrary devices with no PCI-device attached to it is surely not the right way to fix it.

You never fixed this afaik.

But it seems as if your TB-controller is running. Verify by deactivating it completely in your BIOS.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Dear @benbender sorry about the link being broken earlier.

I confirmed i've deactivated the Thunderbolt in my bios I/O settings.
I've deactivated the SSDT ARPT, OFFTB, and OFFDGPU.
Lowest Wattage I achieved is 1.47W.

Thank You

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Again - Fix your PMC!

It should be like this:
PPMC

Yours is completely broken:
pmc-broken

Explanation: You (or someone else) copy&pasted some ACPI-code meant for different hardware and a different purpose (probably this: https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-PMC.dsl, which doesnt apply in any way to our hardware) without really knowing what he/she was doing. As a result your PowerManagement-controller, which handles PCI-power-management, is forcefully broken and a non-existent device (PMCR) is added. Interestingly this device is also present in the genuine ACPI for the macbookpro14,1, but by adding "APP9876" as name to the device a pm-driver of OSX connects to this non-functional-device and, presumably, brakes your PM.

Correct implemenation: https://github.com/tylernguyen/x1c6-hackintosh/blob/master/patches/SSDT-PMCR.dsl

PS: You didn't apply: "Switch to a Macbook14,1-platform as it's the closest match to a T480 PCH-wise. After the switch, regenerate your CPUFriendDataProvider with this: https://github.com/fewtarius/CPUFriendFriend"

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Thanks alot @benbender , i've fixed the SSDT-PMCR.dsl and it's working as the photo below.

Power consumption is still about 1.5W. I discovered in IOReg that my TB port is still there : RP09.

So I did this:

  1. Enable SSDT-OFFTB.aml
  2. Set in bios to turn on the Thunderbolt I/O, and:
  • Thunderbolt BIOS Assist Mode Disabled
  • Wake by Thunderbolt(TM) 3 Enabled
  • Security Level User Authorization
  • Support in Pre Boot Environment -> Thunderbolt(TM) device Enabled

I'm still at Macbook 15,2 because my bluetooth broadcom card will not work at Macbook 14,1.

Now I'm facing Kernel Task being high and the processor is constantly at work, fan is constantly on. Disabling the SSDT-OFFTB.aml solves it but power consumption is at 1.5W.

Screenshot 2020-11-08 at 1 22 38 AM

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

Disable TB in IO-Ports in BIOS. The kernel task is a crashing TB-controller. "BIOS Assist disabled" is not "TB disabled".

I'm still at Macbook 15,2 because my bluetooth broadcom card will not work at Macbook 14,1.

Bluetooth is probably connected to usb. Switch the platform and redo your usb-patching via Hackintool or similar. Its most probably incorrect and you only have working bluetooth by accident.

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Hi @benbender good day to you. Yeah I disabled TB, all TB settings are disabled. I also checked it with ioreg:

Screenshot 2020-11-08 at 9 32 39 PM

RP01 : is already disabled
RP05: NVME controller
RP07: Broadcom wifi : working normally
RP09: TB: disabled as below
RP11: NVME Controller

I have an NVME storage for Windows PM981 original
and another storage for Mac using the WWAN port.

I suspect the power draw is from the NVME storage from the windows drive since I can access it from mac OS.

Would that be a possible conclusion?

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

please post a complete ioreg-dump and I'll check the power-state

from t480-opencore-hackintosh.

swatchie-1 avatar swatchie-1 commented on May 17, 2024

Thanks alot @benbender

swatchie-1-9-nov.zip

from t480-opencore-hackintosh.

benbender avatar benbender commented on May 17, 2024

from t480-opencore-hackintosh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.