Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Fix for S3 sleep and headphone jack #3

Open
Drowningfish223 opened this issue Sep 27, 2020 · 84 comments
Open

Potential Fix for S3 sleep and headphone jack #3

Drowningfish223 opened this issue Sep 27, 2020 · 84 comments

Comments

@Drowningfish223
Copy link

Drowningfish223 commented Sep 27, 2020

check out this to fix S3 sleep. rEFInd is a great tool, but AcpiPatcher.efi might also be able to be injected in the opencore/drivers folder if you don't want to use rEFInd. If you get a flickering screen or have the igpu lock to 350 mhz after sleep, add igfxfw=2 to your boot args to load apple's native GuC firmware. That also enables iGPU power management.

For the headphone jack, try adding verbstub.kext to your kexts folder. Jaromeyer has a folder with materials and instructions on his read.me on how to install combojack, which is a related utility. His solution worked for me.

Also, how efficient is S2 sleep? Please let me know, because I've had sleep related issues on my laptop and disabling S3 could be a solution.

Let me know if any of this works!

@Drowningfish223
Copy link
Author

@zachs78 Also, I forgot to mention-karabiner elements will let you map your function keys, including brightness. I recommend checking it out. You might have to use the top-case apple logo setting to change brightness if the default brightness option doesn't work. You'll understand if you check it out.

Another quick question: given the amazingly large trackpad, do you have any palm rejection issues?

Good luck!

@zachs78
Copy link
Owner

zachs78 commented Sep 30, 2020

rEFInd isn't going to help. This is an OpenCore EFI? AFAIK rEFI is an EFI to re-enable S3 for Windows 2004. I am not on Windows 2004 yet and CsEnable works well there. S3 is just as broken though (Dell BIOS bug) and S2 sleep is terrible!

I want to map the brightness key properly via SSDT. Any idea how to do that?

I haven't had any problems with palm rejection to be honest, but I use an external keyboard and mouse most of the time. The keyboard layout with the home button sharing the same physical button as F11 doesn't quite work for a programmer. Given that I have an external dock and bluetooth headset, I haven't found the need to use a headphone jack either. The only real annoyance is I can't put the laptop to sleep, but it's no different to Windows.

@thefiredragon
Copy link

I could remap brightness keys I had also own a Dell XPS, I would share my effort here

@thefiredragon
Copy link

@zachs78 I'll contact dell support, and also found your dell threads about broken sleep, dell don't want to test it internally and want to replace the motherboard of my device, what do you think?
I had wrote 3 days about it.

@Rastafabisch
Copy link

Rastafabisch commented Nov 30, 2020

There might be another way for enabling sleep support. Apparently S3 sleep mode can be successfully hacktivated on either the 13” 9300, as well as the 17” 9700 model. That said it is know that the same setting do not yield in a useable S3 mode on the 9500 model due to the aforementioned firmware bug. However what might be a doable approach, is to flash a 9700 bios to the 9500 model as those are fairly similar. This could also be done incrementally by comparing both bios and replacing only certain modules (UEFI tool + bin-Walk).
@zachs78: Do you think this is feasible?

@suservu123
Copy link

suservu123 commented Apr 29, 2021

AcpiPatcher.efi can enable s3 standby
Before:
D0AFB097-C0B1-44DD-857D-44BF66983748
After:
27AD909E-36C5-4F1A-A49D-C85BDF144C17

but when computer wake it will be black screen and have to be hard reset

  1. Combojack doesn’t work for My xps 9500

@thefiredragon
Copy link

How did you enabled s3?

@suservu123
Copy link

suservu123 commented Apr 29, 2021

How did you enabled s3?

Yeah, and cannot wake :)))

@suservu123
Copy link

How did you enabled s3?

Use rEFind to enable s3 with driver: acpipatcher.efi .By this way linux and win wake with black screen

@suservu123
Copy link

50F226BF-B18F-480F-9A9F-E341445E3075

yep you can sleep but when wake up laptop screen will be black just, backlight just turn on

@thefiredragon
Copy link

But external Screen Turn on?

theres a new bios update 1.7 or something like this

@suservu123
Copy link

suservu123 commented Apr 30, 2021

But external Screen Turn on?

theres a new bios update 1.7 or something like this

My bios is newest. Maybe flash bios 1.4 will slove the problem

@sweet3c
Copy link

sweet3c commented Aug 6, 2021

@zachs78 bios 1.8 slove the S3 Sleep problem?
In windows OS the Application "Dell Command | Configure" has many options to controll bios
I'm not sure is that userful.

I tried the DeepinOS, this OS can support Sleep

@thefiredragon
Copy link

For me 1.8 also not enable s3 sleep
It will Hang on s3 logo

@VGerris
Copy link

VGerris commented Jan 19, 2023

one of many threads is here : https://www.dell.com/community/Precision-Mobile-Workstations/precision-5550-S3-sleep-not-working/td-p/7759319 ( 5550 precision is pretty much xps 9500 with different wifi and nvidia chip).
you can still enable S3 with a registry setting but as many post, after wake the laptop hangs - depending on your signs of life settings you get a black screen or the Dell logo. This is a major BIOS bug that I reported to Dell support and posted on the community forums about, so far without results.
I would be interested to know if anyone can make S3 sleep work with DSDT patches by figuring out what precisely goes wrong at S3 wake. Perhaps injection with OpenCore (or rEFIt) can fix it or at least let it fall back to S2.
The only thing that works for me is to disable S3 sleep and use hibernate.
I tried to use this : https://github.com/acidanthera/HibernationFixup but no matter what I try, the laptop either does not sleep like 'modern sleep' and uses more than 5% an hour and stays hot, or it goes in some form of sleep but does not wake up, even with the S3 disabled. Hibernate is a bad solution because it wears the SSD but it is arguably better than no sleep (modern) but I cannot get it to work on MacOS. On Windows it seems the OS hibernates when S3 is forced to be enabled, so Dell must have done something in the drivers. On Linux, with S3 enabled in BIOS the machine hangs, with it disabled it uses a lot of energy ( haven't tried hibernate yet).

Dell does a terrible job here and should really fix this in the BIOS.
Any workaround for MacOS is appreciated also for brightness mapping (DSDT).

@AO554
Copy link

AO554 commented Feb 13, 2023

50F226BF-B18F-480F-9A9F-E341445E3075

yep you can sleep but when wake up laptop screen will be black just, backlight just turn on

It would make me curious to believe then if its just platformid/ACPI patching for the display part just to get working again otherwise, thats what I'd first suspect since its coming out of sleep

@VGerris
Copy link

VGerris commented Mar 30, 2023

For the record, Dell did replace my motherboard, did a terrible job at it, with a screw missing, screws loose, protection pads loose, etc. The support was the worst experience ever. On the plus side, I got them to admit that the problem is in the BIOS ( firmware ) and also that they will fix it, but that they could not give a timeline - so don't be surprised if it is in fact never.
The worst is that while the laptop was away, two BIOS updates were released, that did not solve the issue ( on 1.21 now ).
I tried to implement a workaround with HibernateFixup. It almost works, but after wake and boot with preselected MacOS in OC, it hangs in black screen. I will try to see if I can find the root cause for it.

I also tried to patch the DSDT by having S3 do S0 but I am not sure if it did anything, I got the same issue with the wake to logo hang issue. I did try to compare an XPS 9700 BIOS with my Precision 5550 but there were to many differences. Could anyone dump the full DSDT and SSDT files for the latest BIOS of that? I hope someone else with more knowledge on this may be of help, I think looking with more understanding to the diff might point to the cause of the problem, or at least makes it work with the sign-of-life options off, like on the XPS 9700.

I would love to see S3 fixed. Let's keep going :)

@VGerris
Copy link

VGerris commented Apr 26, 2023

Precision 5550 BIOS got an update to 1.22 without option to go back to 1.21 or earlier.
It does not fix the S3 issue.

@VGerris
Copy link

VGerris commented Jun 18, 2023

update to 1.23.1 , no change. yes Dell, you suck.

@VGerris
Copy link

VGerris commented Aug 2, 2023

I am thinking about selling the Precision 5550 because of the sleep issue. Does anyone have any suggestions on last attempts tp try? I bought an HP and intent to never look back if I get a good price for this machine. cheers

@VGerris
Copy link

VGerris commented Aug 24, 2023

Got my hands on an XPS 17 and thought sleep did not work, but it turned out it only works when power is plugged in at the time the sleep is triggered, see also : https://www.reddit.com/r/Dell/comments/hla8yk/how_to_enable_s3_deep_sleep_on_xps_17_9700_in/ . This does not work on the XPS 15. I am not sure if I have enough time and skill to find the XPS 17 issue - this seems fixable. If anyone is up for the task or can help, please let me know. Tips on tooling, testing, debugging, methods etc.
If that issue can be fixed it may be possible to compare BIOSes and find the additional bug in the XPS 15 / Precision 5550.
Thanks!

@sweet3c
Copy link

sweet3c commented Sep 6, 2023

Got my hands on an XPS 17 and thought sleep did not work, but it turned out it only works when power is plugged in at the time the sleep is triggered, see also : https://www.reddit.com/r/Dell/comments/hla8yk/how_to_enable_s3_deep_sleep_on_xps_17_9700_in/ . This does not work on the XPS 15. I am not sure if I have enough time and skill to find the XPS 17 issue - this seems fixable. If anyone is up for the task or can help, please let me know. Tips on tooling, testing, debugging, methods etc. If that issue can be fixed it may be possible to compare BIOSes and find the additional bug in the XPS 15 / Precision 5550. Thanks!

I have asked the DELL service, the recover is XPS9500 The hardware design is flawed, so I give up trying

@jkbuha
Copy link

jkbuha commented Sep 6, 2023

Hi guys, spotted this just now when I was looking at S3 sleep for the 9520. This is going to sound a bit controversial, but under one of the latest mainline linux kernels (mine's kali 6.1.0) it is possible to successfully trigger S3 sleep/wake under Linux. Logs hereunder:

`──(jkbuha㉿kali)-[~/Downloads/XPS-9520-AlderLake-OpenCore-main/EFI]
└─$ uname -a
Linux kali 6.1.0-kali9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1kali1 (2023-05-12) x86_64 GNU/Linux

┌──(jkbuha㉿kali)-[~/Downloads/XPS-9520-AlderLake-OpenCore-main/EFI]
└─$ cat /sys/power/mem_sleep
s2idle [deep]

┌──(jkbuha㉿kali)-[~/Downloads/XPS-9520-AlderLake-OpenCore-main/EFI]
└─$ dmesg | grep S3
[ 0.247410] ACPI: PM: (supports S0 S3 S4 S5)
[ 53.907883] ACPI: PM: Preparing to enter system sleep state S3
[ 54.213848] ACPI: PM: Waking up from system sleep state S3

┌──(jkbuha㉿kali)-[~/Downloads/XPS-9520-AlderLake-OpenCore-main/EFI]
└─$
`

To validate this you'll need to (a) set the ACPI UEFI IFR 'S3 Sleep' variable to enabled (default is off for 9510/20/30 but should be set for 9500) and also boot linux from an existing partition where mem_sleep is already set to [deep], as it's usually not enabled by default on a live usb.

I suspect the kernel devs have activated a different wake path via _GPRW but will spend some more time investigating this to see if it can be backported onto MacOS and injected via SSDT.

@VGerris
Copy link

VGerris commented Sep 8, 2023

hi, thanks for sharing, that may be interesting. Just for clarity, when running Linux with mem_sleep set to deep ( kernel param ) on both 9500 and 9700 models, they hang, but the 9700 works when on power.
It may be interesting to look at the kernel patches to understand what is fixed, because something more is broken in the BIOS - and very likely some device's sleep or wake action. Any hints on how to pin it down are very much appreciated, I still have both models with multiple OSes to test!

@jkbuha
Copy link

jkbuha commented Sep 8, 2023

I can leave here the dmesg log for a successful 9520 deep (S3) mem_sleep

[ 30.584022] PM: suspend entry (deep)
[ 30.593445] Filesystems sync: 0.009 seconds
[ 30.593752] (NULL device *): firmware: direct-loading firmware regulatory.db.p7s
[ 30.593758] (NULL device *): firmware: direct-loading firmware iwlwifi-so-a0-gf-a0.pnvm
[ 30.593759] (NULL device *): firmware: direct-loading firmware regulatory.db
[ 30.593768] (NULL device *): firmware: direct-loading firmware intel/ibt-0040-0041.ddc
[ 30.593901] (NULL device *): firmware: direct-loading firmware intel/ibt-0040-0041.sfi
[ 30.593934] (NULL device *): firmware: direct-loading firmware iwlwifi-so-a0-gf-a0-72.ucode
[ 30.593994] (NULL device *): firmware: direct-loading firmware i915/adlp_dmc_ver2_16.bin
[ 30.594263] (NULL device *): firmware: direct-loading firmware i915/adlp_guc_70.bin
[ 30.594438] (NULL device *): firmware: direct-loading firmware i915/tgl_huc.bin
[ 30.594960] Freezing user space processes
[ 30.615610] Freezing user space processes completed (elapsed 0.020 seconds)
[ 30.615613] OOM killer disabled.
[ 30.615613] Freezing remaining freezable tasks
[ 30.616781] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 30.616822] printk: Suspending console(s) (use no_console_suspend to debug)
[ 31.188030] ACPI: EC: interrupt blocked
[ 31.264884] ACPI: PM: Preparing to enter system sleep state S3
[ 31.286289] ACPI: EC: event blocked
[ 31.286297] ACPI: EC: EC stopped
[ 31.286299] ACPI: PM: Saving platform NVS memory
[ 31.286452] Disabling non-boot CPUs ...
[ 31.290329] smpboot: CPU 1 is now offline
[ 31.299793] smpboot: CPU 2 is now offline
[ 31.308268] smpboot: CPU 3 is now offline
[ 31.311329] smpboot: CPU 4 is now offline
[ 31.316461] smpboot: CPU 5 is now offline
[ 31.319094] smpboot: CPU 6 is now offline
[ 31.324214] smpboot: CPU 7 is now offline
[ 31.326881] smpboot: CPU 8 is now offline
[ 31.331874] smpboot: CPU 9 is now offline
[ 31.334578] smpboot: CPU 10 is now offline
[ 31.339412] smpboot: CPU 11 is now offline
[ 31.341948] smpboot: CPU 12 is now offline
[ 31.344303] smpboot: CPU 13 is now offline
[ 31.346608] smpboot: CPU 14 is now offline
[ 31.349223] smpboot: CPU 15 is now offline
[ 31.351543] smpboot: CPU 16 is now offline
[ 31.353858] smpboot: CPU 17 is now offline
[ 31.355943] smpboot: CPU 18 is now offline
[ 31.358106] smpboot: CPU 19 is now offline
[ 31.389021] ACPI: PM: Low-level resume complete
[ 31.389111] ACPI: EC: EC started
[ 31.389114] ACPI: PM: Restoring platform NVS memory
[ 31.390460] Enabling non-boot CPUs ...
[ 31.390588] x86: Booting SMP configuration:
[ 31.390591] smpboot: Booting Node 0 Processor 1 APIC 0x1
[ 31.401366] CPU1 is up
[ 31.401442] smpboot: Booting Node 0 Processor 2 APIC 0x8
[ 31.440925] CPU2 is up
[ 31.440997] smpboot: Booting Node 0 Processor 3 APIC 0x9
[ 31.452201] CPU3 is up
[ 31.452270] smpboot: Booting Node 0 Processor 4 APIC 0x10
[ 31.460588] CPU4 is up
[ 31.460647] smpboot: Booting Node 0 Processor 5 APIC 0x11
[ 31.462911] CPU5 is up
[ 31.462969] smpboot: Booting Node 0 Processor 6 APIC 0x18
[ 31.470404] CPU6 is up
[ 31.470469] smpboot: Booting Node 0 Processor 7 APIC 0x19
[ 31.472789] CPU7 is up
[ 31.472848] smpboot: Booting Node 0 Processor 8 APIC 0x20
[ 31.480339] CPU8 is up
[ 31.480413] smpboot: Booting Node 0 Processor 9 APIC 0x21
[ 31.482948] CPU9 is up
[ 31.483002] smpboot: Booting Node 0 Processor 10 APIC 0x28
[ 31.490498] CPU10 is up
[ 31.490575] smpboot: Booting Node 0 Processor 11 APIC 0x29
[ 31.492994] CPU11 is up
[ 31.493069] smpboot: Booting Node 0 Processor 12 APIC 0x30
[ 31.499557] core: cpu_atom PMU driver: PEBS-via-PT
[ 31.499562] ... version: 5
[ 31.499562] ... bit width: 48
[ 31.499563] ... generic registers: 6
[ 31.499564] ... value mask: 0000ffffffffffff
[ 31.499564] ... max period: 00007fffffffffff
[ 31.499565] ... fixed-purpose events: 3
[ 31.499565] ... event mask: 000000070000003f
[ 31.500340] CPU12 is up
[ 31.500412] smpboot: Booting Node 0 Processor 13 APIC 0x32
[ 31.504144] CPU13 is up
[ 31.504218] smpboot: Booting Node 0 Processor 14 APIC 0x34
[ 31.508045] CPU14 is up
[ 31.508128] smpboot: Booting Node 0 Processor 15 APIC 0x36
[ 31.511970] CPU15 is up
[ 31.512050] smpboot: Booting Node 0 Processor 16 APIC 0x38
[ 31.519054] CPU16 is up
[ 31.519104] smpboot: Booting Node 0 Processor 17 APIC 0x3a
[ 31.523055] CPU17 is up
[ 31.523113] smpboot: Booting Node 0 Processor 18 APIC 0x3c
[ 31.526924] CPU18 is up
[ 31.526982] smpboot: Booting Node 0 Processor 19 APIC 0x3e
[ 31.531013] CPU19 is up
[ 31.539714] ACPI: PM: Waking up from system sleep state S3
[ 31.587716] ACPI: EC: interrupt unblocked
[ 31.689843] ACPI: button: The lid device is not compliant to SW_LID.
[ 61.703044] ACPI Error: Aborting method _SB.PC00.PEG1.NPON due to previous error (AE_AML_LOOP_TIMEOUT) (20220331/psparse-529)
[ 61.703107] ACPI Error: Aborting method _SB.PC00.PEG1.PG01._ON due to previous error (AE_AML_LOOP_TIMEOUT) (20220331/psparse-529)
[ 61.845964] ACPI: EC: event unblocked
[ 61.866527] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.bin version 70.5.1
[ 61.866531] i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc.bin version 7.9.3
[ 61.873297] xhci_hcd 0000:00:0d.0: xHC error in resume, USBSTS 0x401, Reinit
[ 61.873309] usb usb3: root hub lost power or was reset
[ 61.873313] usb usb4: root hub lost power or was reset
[ 61.879655] i915 0000:00:02.0: [drm] HuC authenticated
[ 61.880030] i915 0000:00:02.0: [drm] GuC submission enabled
[ 61.880031] i915 0000:00:02.0: [drm] GuC SLPC enabled
[ 61.880378] i915 0000:00:02.0: [drm] GuC RC: enabled
[ 61.884069] nvme nvme0: 20/0/0 default/read/poll queues
[ 61.920002] nvme nvme1: 20/0/0 default/read/poll queues
[ 62.115247] usb 1-10: reset full-speed USB device number 4 using xhci_hcd
[ 62.391262] usb 1-6: reset high-speed USB device number 2 using xhci_hcd
[ 62.421360] ish-hid {33AECD58-B679-4E54-9BD9-A04D34F0C226}: [hid-ish]: enum_devices_done OK, num_hid_devices=1
[ 62.559301] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 62.561728] Bluetooth: hci0: Device revision is 0
[ 62.561737] Bluetooth: hci0: Secure boot is enabled
[ 62.561739] Bluetooth: hci0: OTP lock is enabled
[ 62.561740] Bluetooth: hci0: API lock is enabled
[ 62.561742] Bluetooth: hci0: Debug lock is disabled
[ 62.561743] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[ 62.561747] Bluetooth: hci0: Bootloader timestamp 2019.40 buildtype 1 build 38
[ 62.561757] Bluetooth: hci0: Found device firmware: intel/ibt-0040-0041.sfi
[ 62.561856] Bluetooth: hci0: Boot Address: 0x100800
[ 62.561859] Bluetooth: hci0: Firmware Version: 107-51.22
[ 62.562372] OOM killer enabled.
[ 62.562383] Restarting tasks ... done.
[ 62.563435] random: crng reseeded on system resumption
[ 62.578816] usb 1-9: USB disconnect, device number 3
[ 62.610895] PM: suspend exit
[ 62.710877] usb 1-9: new full-speed USB device number 5 using xhci_hcd
[ 62.864842] usb 1-9: New USB device found, idVendor=27c6, idProduct=63ac, bcdDevice= 1.00
[ 62.864857] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 62.864862] usb 1-9: Product: Goodix USB2.0 MISC
[ 62.864866] usb 1-9: Manufacturer: Goodix Technology Co., Ltd.
[ 62.864869] usb 1-9: SerialNumber: UID820612F3_XXXX_MOC_B0
[ 64.490387] Bluetooth: hci0: Waiting for firmware download to complete
[ 64.490582] Bluetooth: hci0: Firmware loaded in 1883616 usecs
[ 64.490911] Bluetooth: hci0: Waiting for device to boot
[ 64.507778] Bluetooth: hci0: Device booted in 16786 usecs
[ 64.507800] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0040-0041.ddc
[ 64.511972] Bluetooth: hci0: Applying Intel DDC parameters completed
[ 64.515960] Bluetooth: hci0: Firmware timestamp 2022.51 buildtype 1 build 56683<

In the kernel dev chats I can see some unorthodox return to wake through a different EC mapping. I'll see where it leads. In the meantime if you can see if can spot any differences in the 9700 sleep logs (or at least where the 9500 fails).

@VGerris
Copy link

VGerris commented Sep 11, 2023

This is my dmesg output for a lid closed sleep on Fedora 38, kernel 6.4.14-fc200 on the XPS 9700 ( latest BIOS ).

[ 153.230924] wlp0s20f3: deauthenticating from ba:15:a2:3b:f0:cd by local choice (Reason: 3=DEAUTH_LEAVING)
[ 153.669465] ACPI: button: The lid device is not compliant to SW_LID.
[ 154.522133] rfkill: input handler enabled
[ 154.680796] PM: suspend entry (deep)
[ 154.748605] Filesystems sync: 0.067 seconds
[ 154.787889] Freezing user space processes
[ 154.789226] Freezing user space processes completed (elapsed 0.001 seconds)
[ 154.789228] OOM killer disabled.
[ 154.789229] Freezing remaining freezable tasks
[ 154.790188] Freezing remaining freezable tasks completed (elapsed 0.000 seconds)
[ 154.790226] printk: Suspending console(s) (use no_console_suspend to debug)
[ 157.128832] PM: suspend devices took 2.339 seconds
[ 157.159547] ACPI: EC: interrupt blocked
[ 157.253246] ACPI: PM: Preparing to enter system sleep state S3
[ 157.257073] ACPI: EC: event blocked
[ 157.257074] ACPI: EC: EC stopped
[ 157.257074] ACPI: PM: Saving platform NVS memory
[ 157.257138] Disabling non-boot CPUs ...
[ 157.258702] smpboot: CPU 1 is now offline
[ 157.260760] smpboot: CPU 2 is now offline
[ 157.262785] smpboot: CPU 3 is now offline
[ 157.264799] smpboot: CPU 4 is now offline
[ 157.266811] smpboot: CPU 5 is now offline
[ 157.268810] smpboot: CPU 6 is now offline
[ 157.271334] smpboot: CPU 7 is now offline
[ 157.273240] smpboot: CPU 8 is now offline
[ 157.275602] smpboot: CPU 9 is now offline
[ 157.277430] smpboot: CPU 10 is now offline
[ 157.279271] smpboot: CPU 11 is now offline
[ 157.281091] smpboot: CPU 12 is now offline
[ 157.282847] smpboot: CPU 13 is now offline
[ 157.284620] smpboot: CPU 14 is now offline
[ 157.286428] smpboot: CPU 15 is now offline
[ 157.291142] ACPI: PM: Low-level resume complete
[ 157.291212] ACPI: EC: EC started
[ 157.291213] ACPI: PM: Restoring platform NVS memory
[ 157.292556] Enabling non-boot CPUs ...
[ 157.292599] x86: Booting SMP configuration:
[ 157.292599] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 157.294208] CPU1 is up
[ 157.294230] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 157.295726] CPU2 is up
[ 157.295744] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 157.297286] CPU3 is up
[ 157.297304] smpboot: Booting Node 0 Processor 4 APIC 0x8
[ 157.298839] CPU4 is up
[ 157.298857] smpboot: Booting Node 0 Processor 5 APIC 0xa
[ 157.300396] CPU5 is up
[ 157.300414] smpboot: Booting Node 0 Processor 6 APIC 0xc
[ 157.301979] CPU6 is up
[ 157.301997] smpboot: Booting Node 0 Processor 7 APIC 0xe
[ 157.303596] CPU7 is up
[ 157.303614] smpboot: Booting Node 0 Processor 8 APIC 0x1
[ 157.304500] CPU8 is up
[ 157.304524] smpboot: Booting Node 0 Processor 9 APIC 0x3
[ 157.305233] CPU9 is up
[ 157.305254] smpboot: Booting Node 0 Processor 10 APIC 0x5
[ 157.305964] CPU10 is up
[ 157.305982] smpboot: Booting Node 0 Processor 11 APIC 0x7
[ 157.306703] CPU11 is up
[ 157.306723] smpboot: Booting Node 0 Processor 12 APIC 0x9
[ 157.307453] CPU12 is up
[ 157.307473] smpboot: Booting Node 0 Processor 13 APIC 0xb
[ 157.308209] CPU13 is up
[ 157.308227] smpboot: Booting Node 0 Processor 14 APIC 0xd
[ 157.308987] CPU14 is up
[ 157.309006] smpboot: Booting Node 0 Processor 15 APIC 0xf
[ 157.309793] CPU15 is up
[ 157.315293] ACPI: PM: Waking up from system sleep state S3
[ 157.453139] ACPI: EC: interrupt unblocked
[ 158.842695] ACPI: EC: event unblocked
[ 158.857975] xhci_hcd 0000:01:00.2: xHC error in resume, USBSTS 0x401, Reinit
[ 158.857978] usb usb3: root hub lost power or was reset
[ 158.857979] usb usb4: root hub lost power or was reset
[ 158.865357] xhci_hcd 0000:a5:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 158.865359] usb usb7: root hub lost power or was reset
[ 158.865360] usb usb8: root hub lost power or was reset
[ 158.865361] xhci_hcd 0000:3b:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 158.865364] usb usb5: root hub lost power or was reset
[ 158.865365] usb usb6: root hub lost power or was reset
[ 158.888216] nvme nvme0: 8/0/0 default/read/poll queues
[ 158.897898] i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 158.897905] i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 158.897918] i915 0000:00:02.0: [drm] [ENCODER:113:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 158.897926] i915 0000:00:02.0: [drm] [ENCODER:120:DDI D/PHY D] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 159.077180] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
[ 159.148805] nvme nvme1: 8/0/0 default/read/poll queues
[ 159.152472] nvme nvme1: Ignoring bogus Namespace Identifiers
[ 159.345916] ish-hid {33AECD58-B679-4E54-9BD9-A04D34F0C226}: [hid-ish]: enum_devices_done OK, num_hid_devices=1
[ 160.091100] PM: resume devices took 1.249 seconds
[ 160.091353] pcieport 0000:00:1c.0: PCI bridge to [bus 04]
[ 160.091376] pcieport 0000:00:1c.0: bridge window [mem 0xd2100000-0xd21fffff]
[ 160.091512] pci_bus 0000:07: Allocating resources
[ 160.091539] pci_bus 0000:3b: Allocating resources
[ 160.091666] pci_bus 0000:71: Allocating resources
[ 160.091683] pci_bus 0000:a5: Allocating resources
[ 160.091733] pcieport 0000:00:1b.0: PCI bridge to [bus 02]
[ 160.091767] pcieport 0000:00:1b.0: bridge window [mem 0xd2300000-0xd23fffff]
[ 160.092324] OOM killer enabled.
[ 160.092328] Restarting tasks ...
[ 160.092372] pcieport 0000:00:1b.4: PCI bridge to [bus 03]
[ 160.092384] pcieport 0000:00:1b.4: bridge window [mem 0xd2200000-0xd22fffff]
[ 160.092508] pci_bus 0000:07: Allocating resources
[ 160.092537] pci_bus 0000:3b: Allocating resources
[ 160.092654] pci_bus 0000:71: Allocating resources
[ 160.092676] pci_bus 0000:a5: Allocating resources
[ 160.093955] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[ 160.094840] done.
[ 160.094852] random: crng reseeded on system resumption
[ 160.156809] PM: suspend exit
[ 160.602409] rfkill: input handler disabled
[ 160.614078] evdi: [I] (card0) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 160.614398] evdi: [I] (card1) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 160.614706] evdi: [I] (card2) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 160.615054] evdi: [I] (card3) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 160.899867] evdi: [I] (card0) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 160.900106] evdi: [I] (card1) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 160.900328] evdi: [I] (card2) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 160.900548] evdi: [I] (card3) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 161.974794] hid-sensor-hub 001F:8087:0AC2.0003: timeout waiting for response from ISHTP device
[ 164.371697] wlp0s20f3: authenticate with ba:15:a2:3b:f0:cd
[ 164.375487] wlp0s20f3: send auth to ba:15:a2:3b:f0:cd (try 1/3)
[ 164.426685] wlp0s20f3: authenticated
[ 164.427235] wlp0s20f3: associate with ba:15:a2:3b:f0:cd (try 1/3)
[ 164.429289] wlp0s20f3: RX AssocResp from ba:15:a2:3b:f0:cd (capab=0x1011 status=0 aid=18)
[ 164.439928] wlp0s20f3: associated
[ 164.464341] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20f3: link becomes ready
[ 164.490304] wlp0s20f3: Limiting TX power to 23 (23 - 0) dBm as advertised by ba:15:a2:3b:f0:cd
[ 168.479291] wlp0s20f3: deauthenticating from ba:15:a2:3b:f0:cd by local choice (Reason: 3=DEAUTH_LEAVING)
[ 168.744191] rfkill: input handler enabled
[ 168.890774] PM: suspend entry (deep)
[ 168.918075] Filesystems sync: 0.027 seconds
[ 168.918425] Freezing user space processes
[ 168.925369] Freezing user space processes completed (elapsed 0.006 seconds)
[ 168.925372] OOM killer disabled.
[ 168.925372] Freezing remaining freezable tasks
[ 168.926288] Freezing remaining freezable tasks completed (elapsed 0.000 seconds)
[ 168.926326] printk: Suspending console(s) (use no_console_suspend to debug)
[ 169.701793] PM: suspend devices took 0.775 seconds
[ 169.732802] ACPI: EC: interrupt blocked
[ 169.827656] ACPI: PM: Preparing to enter system sleep state S3
[ 169.831557] ACPI: EC: event blocked
[ 169.831558] ACPI: EC: EC stopped
[ 169.831558] ACPI: PM: Saving platform NVS memory
[ 169.831625] Disabling non-boot CPUs ...
[ 169.833190] smpboot: CPU 1 is now offline
[ 169.835170] smpboot: CPU 2 is now offline
[ 169.837215] smpboot: CPU 3 is now offline
[ 169.839246] smpboot: CPU 4 is now offline
[ 169.841286] smpboot: CPU 5 is now offline
[ 169.843159] smpboot: CPU 6 is now offline
[ 169.845093] smpboot: CPU 7 is now offline
[ 169.847699] smpboot: CPU 8 is now offline
[ 169.849542] smpboot: CPU 9 is now offline
[ 169.851228] smpboot: CPU 10 is now offline
[ 169.853015] smpboot: CPU 11 is now offline
[ 169.854829] smpboot: CPU 12 is now offline
[ 169.856342] smpboot: CPU 13 is now offline
[ 169.857822] smpboot: CPU 14 is now offline
[ 169.859337] smpboot: CPU 15 is now offline
[ 169.863859] ACPI: PM: Low-level resume complete
[ 169.863928] ACPI: EC: EC started
[ 169.863929] ACPI: PM: Restoring platform NVS memory
[ 169.865298] Enabling non-boot CPUs ...
[ 169.865327] x86: Booting SMP configuration:
[ 169.865328] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 169.866960] CPU1 is up
[ 169.866983] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 169.868542] CPU2 is up
[ 169.868561] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 169.870108] CPU3 is up
[ 169.870125] smpboot: Booting Node 0 Processor 4 APIC 0x8
[ 169.871683] CPU4 is up
[ 169.871702] smpboot: Booting Node 0 Processor 5 APIC 0xa
[ 169.873268] CPU5 is up
[ 169.873285] smpboot: Booting Node 0 Processor 6 APIC 0xc
[ 169.874877] CPU6 is up
[ 169.874895] smpboot: Booting Node 0 Processor 7 APIC 0xe
[ 169.876521] CPU7 is up
[ 169.876539] smpboot: Booting Node 0 Processor 8 APIC 0x1
[ 169.877440] CPU8 is up
[ 169.877464] smpboot: Booting Node 0 Processor 9 APIC 0x3
[ 169.878188] CPU9 is up
[ 169.878206] smpboot: Booting Node 0 Processor 10 APIC 0x5
[ 169.878934] CPU10 is up
[ 169.878953] smpboot: Booting Node 0 Processor 11 APIC 0x7
[ 169.879695] CPU11 is up
[ 169.879716] smpboot: Booting Node 0 Processor 12 APIC 0x9
[ 169.880469] CPU12 is up
[ 169.880488] smpboot: Booting Node 0 Processor 13 APIC 0xb
[ 169.881250] CPU13 is up
[ 169.881269] smpboot: Booting Node 0 Processor 14 APIC 0xd
[ 169.882044] CPU14 is up
[ 169.882062] smpboot: Booting Node 0 Processor 15 APIC 0xf
[ 169.882862] CPU15 is up
[ 169.888342] ACPI: PM: Waking up from system sleep state S3
[ 170.026449] ACPI: EC: interrupt unblocked
[ 171.391781] ACPI: EC: event unblocked
[ 171.406433] xhci_hcd 0000:01:00.2: xHC error in resume, USBSTS 0x401, Reinit
[ 171.406439] usb usb3: root hub lost power or was reset
[ 171.406440] usb usb4: root hub lost power or was reset
[ 171.412192] xhci_hcd 0000:3b:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 171.412194] usb usb5: root hub lost power or was reset
[ 171.412195] usb usb6: root hub lost power or was reset
[ 171.412311] xhci_hcd 0000:a5:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 171.412313] usb usb7: root hub lost power or was reset
[ 171.412314] usb usb8: root hub lost power or was reset
[ 171.437341] nvme nvme0: 8/0/0 default/read/poll queues
[ 171.447562] i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 171.447576] i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 171.447591] i915 0000:00:02.0: [drm] [ENCODER:113:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 171.447606] i915 0000:00:02.0: [drm] [ENCODER:120:DDI D/PHY D] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 171.625799] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
[ 171.697529] nvme nvme1: 8/0/0 default/read/poll queues
[ 171.701252] nvme nvme1: Ignoring bogus Namespace Identifiers
[ 171.887049] ish-hid {33AECD58-B679-4E54-9BD9-A04D34F0C226}: [hid-ish]: enum_devices_done OK, num_hid_devices=1
[ 172.654499] PM: resume devices took 1.262 seconds
[ 172.654629] pcieport 0000:00:1c.0: PCI bridge to [bus 04]
[ 172.654642] pcieport 0000:00:1c.0: bridge window [mem 0xd2100000-0xd21fffff]
[ 172.654736] pci_bus 0000:07: Allocating resources
[ 172.654754] pci_bus 0000:3b: Allocating resources
[ 172.654828] pci_bus 0000:71: Allocating resources
[ 172.654843] pci_bus 0000:a5: Allocating resources
[ 172.654871] pcieport 0000:00:1b.0: PCI bridge to [bus 02]
[ 172.654877] pcieport 0000:00:1b.0: bridge window [mem 0xd2300000-0xd23fffff]
[ 172.655356] pcieport 0000:00:1b.4: PCI bridge to [bus 03]
[ 172.655362] pcieport 0000:00:1b.4: bridge window [mem 0xd2200000-0xd22fffff]
[ 172.655439] OOM killer enabled.
[ 172.655440] Restarting tasks ...
[ 172.655455] pci_bus 0000:07: Allocating resources
[ 172.655482] pci_bus 0000:3b: Allocating resources
[ 172.655587] pci_bus 0000:71: Allocating resources
[ 172.655616] pci_bus 0000:a5: Allocating resources
[ 172.656963] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[ 172.657264] done.
[ 172.657273] random: crng reseeded on system resumption
[ 172.720583] PM: suspend exit
[ 173.153988] rfkill: input handler disabled
[ 173.157014] evdi: [I] (card0) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 173.157284] evdi: [I] (card1) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 173.157518] evdi: [I] (card2) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 173.157844] evdi: [I] (card3) Opened by Task 1047 (systemd-logind) of process 1047 (systemd-logind)
[ 173.466641] evdi: [I] (card0) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 173.466934] evdi: [I] (card1) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 173.467157] evdi: [I] (card2) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 173.467370] evdi: [I] (card3) Closed by Task 9900 (gnome-shell) of process 9900 (gnome-shell)
[ 174.523798] hid-sensor-hub 001F:8087:0AC2.0003: timeout waiting for response from ISHTP device
[ 176.903992] wlp0s20f3: authenticate with ba:15:a2:3b:f0:cd
[ 176.907952] wlp0s20f3: send auth to ba:15:a2:3b:f0:cd (try 1/3)
[ 176.954964] wlp0s20f3: authenticated
[ 176.955544] wlp0s20f3: associate with ba:15:a2:3b:f0:cd (try 1/3)
[ 176.957302] wlp0s20f3: RX AssocResp from ba:15:a2:3b:f0:cd (capab=0x1011 status=0 aid=24)
[ 176.966294] wlp0s20f3: associated
[ 176.997378] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20f3: link becomes ready
[ 176.998662] wlp0s20f3: Limiting TX power to 23 (23 - 0) dBm as advertised by ba:15:a2:3b:f0:cd

might be an issue with NVram because now the touchscreen does not work on wake and there is a strange effect where the logo shows, then gets garbeled and another sleep wake action seems to be needed. I will try to post again when that is fixed, but thought it might be useful to share anyway. This sing of life ( logo ) has something to do with the issue too I believe. Would be fantastic to get to the bottom of this :)!

@VGerris
Copy link

VGerris commented Sep 11, 2023

here is the output of dmesg after an NVram reset. Sign of life logo was on in Bios, after disabling that the behaviour disappeared and I get a 'normal S3 sleep' on this XPS 9700:

[ 15.421439] evdi: [I] (card3) Closed by Task 3099 (gnome-shell) of process 3099 (gnome-shell)
[ 51.024170] wlp0s20f3: deauthenticating from ba:15:a2:3b:f0:cd by local choice (Reason: 3=DEAUTH_LEAVING)
[ 51.472653] ACPI: button: The lid device is not compliant to SW_LID.
[ 52.401117] rfkill: input handler enabled
[ 52.560668] PM: suspend entry (deep)
[ 52.587398] Filesystems sync: 0.026 seconds
[ 52.630800] Freezing user space processes
[ 52.632367] Freezing user space processes completed (elapsed 0.001 seconds)
[ 52.632369] OOM killer disabled.
[ 52.632370] Freezing remaining freezable tasks
[ 52.633543] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 52.633583] printk: Suspending console(s) (use no_console_suspend to debug)
[ 54.924441] PM: suspend devices took 2.290 seconds
[ 54.955116] ACPI: EC: interrupt blocked
[ 55.049460] ACPI: PM: Preparing to enter system sleep state S3
[ 55.056258] ACPI: EC: event blocked
[ 55.056261] ACPI: EC: EC stopped
[ 55.056262] ACPI: PM: Saving platform NVS memory
[ 55.056380] Disabling non-boot CPUs ...
[ 55.058696] smpboot: CPU 1 is now offline
[ 55.062067] smpboot: CPU 2 is now offline
[ 55.065331] smpboot: CPU 3 is now offline
[ 55.068563] smpboot: CPU 4 is now offline
[ 55.073031] smpboot: CPU 5 is now offline
[ 55.075918] smpboot: CPU 6 is now offline
[ 55.078622] smpboot: CPU 7 is now offline
[ 55.083148] smpboot: CPU 8 is now offline
[ 55.085881] smpboot: CPU 9 is now offline
[ 55.088468] smpboot: CPU 10 is now offline
[ 55.091176] smpboot: CPU 11 is now offline
[ 55.093705] smpboot: CPU 12 is now offline
[ 55.096453] smpboot: CPU 13 is now offline
[ 55.098945] smpboot: CPU 14 is now offline
[ 55.101456] smpboot: CPU 15 is now offline
[ 55.106442] ACPI: PM: Low-level resume complete
[ 55.106512] ACPI: EC: EC started
[ 55.106512] ACPI: PM: Restoring platform NVS memory
[ 55.107911] Enabling non-boot CPUs ...
[ 55.107940] x86: Booting SMP configuration:
[ 55.107940] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 55.109601] CPU1 is up
[ 55.109624] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 55.111159] CPU2 is up
[ 55.111180] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 55.112711] CPU3 is up
[ 55.112729] smpboot: Booting Node 0 Processor 4 APIC 0x8
[ 55.114275] CPU4 is up
[ 55.114293] smpboot: Booting Node 0 Processor 5 APIC 0xa
[ 55.115839] CPU5 is up
[ 55.115856] smpboot: Booting Node 0 Processor 6 APIC 0xc
[ 55.117444] CPU6 is up
[ 55.117462] smpboot: Booting Node 0 Processor 7 APIC 0xe
[ 55.119066] CPU7 is up
[ 55.119084] smpboot: Booting Node 0 Processor 8 APIC 0x1
[ 55.119937] CPU8 is up
[ 55.119962] smpboot: Booting Node 0 Processor 9 APIC 0x3
[ 55.120669] CPU9 is up
[ 55.120687] smpboot: Booting Node 0 Processor 10 APIC 0x5
[ 55.121402] CPU10 is up
[ 55.121421] smpboot: Booting Node 0 Processor 11 APIC 0x7
[ 55.122156] CPU11 is up
[ 55.122175] smpboot: Booting Node 0 Processor 12 APIC 0x9
[ 55.122920] CPU12 is up
[ 55.122939] smpboot: Booting Node 0 Processor 13 APIC 0xb
[ 55.123687] CPU13 is up
[ 55.123709] smpboot: Booting Node 0 Processor 14 APIC 0xd
[ 55.124475] CPU14 is up
[ 55.124493] smpboot: Booting Node 0 Processor 15 APIC 0xf
[ 55.125279] CPU15 is up
[ 55.130743] ACPI: PM: Waking up from system sleep state S3
[ 55.264226] ACPI: EC: interrupt unblocked
[ 56.703308] ACPI: EC: event unblocked
[ 56.714124] xhci_hcd 0000:a5:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 56.714127] usb usb7: root hub lost power or was reset
[ 56.714129] usb usb8: root hub lost power or was reset
[ 56.714217] xhci_hcd 0000:3b:00.0: xHC error in resume, USBSTS 0x401, Reinit
[ 56.714220] usb usb5: root hub lost power or was reset
[ 56.714221] usb usb6: root hub lost power or was reset
[ 56.724106] xhci_hcd 0000:01:00.2: xHC error in resume, USBSTS 0x401, Reinit
[ 56.724108] usb usb3: root hub lost power or was reset
[ 56.724109] usb usb4: root hub lost power or was reset
[ 56.738907] nvme nvme0: 8/0/0 default/read/poll queues
[ 56.748859] i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 56.750857] i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 56.756491] i915 0000:00:02.0: [drm] [ENCODER:113:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 56.761792] i915 0000:00:02.0: [drm] [ENCODER:120:DDI D/PHY D] is disabled/in DSI mode with an ungated DDI clock, gate it
[ 56.937142] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
[ 56.998720] nvme nvme1: 8/0/0 default/read/poll queues
[ 57.002445] nvme nvme1: Ignoring bogus Namespace Identifiers
[ 57.197917] ish-hid {33AECD58-B679-4E54-9BD9-A04D34F0C226}: [hid-ish]: enum_devices_done OK, num_hid_devices=1
[ 57.961341] PM: resume devices took 1.258 seconds
[ 57.961459] pcieport 0000:00:1c.0: PCI bridge to [bus 04]
[ 57.961469] pcieport 0000:00:1c.0: bridge window [mem 0xd2100000-0xd21fffff]
[ 57.961567] pci_bus 0000:07: Allocating resources
[ 57.961584] pci_bus 0000:3b: Allocating resources
[ 57.961658] pci_bus 0000:71: Allocating resources
[ 57.961673] pci_bus 0000:a5: Allocating resources
[ 57.961698] pcieport 0000:00:1b.0: PCI bridge to [bus 02]
[ 57.961701] pcieport 0000:00:1b.0: bridge window [mem 0xd2300000-0xd23fffff]
[ 57.962226] pcieport 0000:00:1b.4: PCI bridge to [bus 03]
[ 57.962232] pcieport 0000:00:1b.4: bridge window [mem 0xd2200000-0xd22fffff]
[ 57.962332] pci_bus 0000:07: Allocating resources
[ 57.962350] pci_bus 0000:3b: Allocating resources
[ 57.962443] OOM killer enabled.
[ 57.962444] Restarting tasks ...
[ 57.962450] pci_bus 0000:71: Allocating resources
[ 57.962476] pci_bus 0000:a5: Allocating resources
[ 57.963857] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[ 57.964674] done.
[ 57.964686] random: crng reseeded on system resumption
[ 58.035036] PM: suspend exit
[ 58.457046] rfkill: input handler disabled
[ 58.472042] evdi: [I] (card0) Opened by Task 1053 (systemd-logind) of process 1053 (systemd-logind)
[ 58.472397] evdi: [I] (card1) Opened by Task 1053 (systemd-logind) of process 1053 (systemd-logind)
[ 58.472652] evdi: [I] (card2) Opened by Task 1053 (systemd-logind) of process 1053 (systemd-logind)
[ 58.472925] evdi: [I] (card3) Opened by Task 1053 (systemd-logind) of process 1053 (systemd-logind)
[ 58.768951] evdi: [I] (card0) Closed by Task 3099 (gnome-shell) of process 3099 (gnome-shell)
[ 58.769256] evdi: [I] (card1) Closed by Task 3099 (gnome-shell) of process 3099 (gnome-shell)
[ 58.769482] evdi: [I] (card2) Closed by Task 3099 (gnome-shell) of process 3099 (gnome-shell)
[ 58.769700] evdi: [I] (card3) Closed by Task 3099 (gnome-shell) of process 3099 (gnome-shell)
[ 59.835012] hid-sensor-hub 001F:8087:0AC2.0003: timeout waiting for response from ISHTP device
[ 62.203753] ucsi_acpi USBC000:00: ucsi_handle_connector_change: GET_CONNECTOR_STATUS failed (-110)
[ 62.227738] wlp0s20f3: authenticate with ba:15:a2:3b:f0:cd
[ 62.233896] wlp0s20f3: send auth to ba:15:a2:3b:f0:cd (try 1/3)
[ 62.288376] wlp0s20f3: authenticated
[ 62.288748] wlp0s20f3: associate with ba:15:a2:3b:f0:cd (try 1/3)
[ 62.291140] wlp0s20f3: RX AssocResp from ba:15:a2:3b:f0:cd (capab=0x1011 status=0 aid=10)
[ 62.300736] wlp0s20f3: associated
[ 62.336591] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s20f3: link becomes ready
[ 62.374559] wlp0s20f3: Limiting TX power to 23 (23 - 0) dBm as advertised by ba:15:a2:3b:f0:cd

The touchscreen stops working after the wake, which is something I read about happening for other models. That does not happen on MacOS last time I checked.
Looked forward to any findings you may do!

@jkbuha
Copy link

jkbuha commented Sep 11, 2023

Can you attach here the current (linux) DSDT.aml for the 9700?

sudo cat /sys/firmware/acpi/tables/DSDT > DSDT.aml

@VGerris
Copy link

VGerris commented Sep 11, 2023

DSDT-xps-9700.zip

sure, there you go.

@VGerris
Copy link

VGerris commented Sep 20, 2023

hi, any updates ? does anyone know how I could find what changes on the ACPI level when the power is plugged/unplugged ? With that I could look at the methods of the BIOS file to see where such a change can affect the sleep. Thank you.

@VGerris
Copy link

VGerris commented Sep 29, 2023

similar issue : EETagent/T480-OpenCore-Hackintosh#20

@jkbuha
Copy link

jkbuha commented Sep 29, 2023 via email

@VGerris
Copy link

VGerris commented Sep 29, 2023

Great, thanks, put it back. I disabled the wifi in the BIOS and it looked at first there was some difference, but a bit after not. Depends if this Coconutbattery is accurate, it takes a while to change. Perhaps it has to do with that linked issue, so the iGPU. I added igfxonln=1 back and igfxfw=2 for testing , can't notice difference but wake is fast.
Then replaced igfxfw=2 with igfxnorpsc=1 .
I wonder if the issue is just the coconut measuring, like an average that suddenly adds ?
I don't see any obvious issues when running Intel Power Gadget, it's a bit of a mystery. Do you have concrete measurements that show the coco is not nuts ?
The most Intel Power Gadget shows is that the CPU temperature seems to have gone up and the PKG line seems to go up a bit but it does not seem to add up to what Coconut shows.
I also noticed the voltage is reset to default when using voltageshift ( from command line ).

Another finding : 4 TB crucial only works with hibernate in SSD slot 2, which I think is enough to conclude it may not work with any other drive in SSD slot 1. I can image that if an EFI on a disk in slot 2 may work on a disk in slot 1, I will probably not spend more time to test unless anybody thinks that is really useful.

@jkbuha
Copy link

jkbuha commented Sep 30, 2023 via email

@jkbuha
Copy link

jkbuha commented Oct 4, 2023

Finally fixed issue with power drain post hibernation. As suspected it was due to the 9500's ACPI logic powering the dGPU up again which has been fixed now thanks to a change in powering down logic and a new introductory transition to sleep state which powers up the GPU then shuts it down properly. All existing XPS 9500 hackintoshes would have had this problem post-sleep/wake cycle, but it wasn't obvious because, well, sleep or hibernation wasn't working until now.

I've also changed the RTC device properties which means you don't need to add any rtx_exclude parameters anymore.

You can get the latest changes from my github repo. Enjoy!

@VGerris
Copy link

VGerris commented Oct 5, 2023

hi, that's great! I tested it but I cannot get it working. I have Sonoma which worked with the previous, exchanged EFI and updated the Airportdriver version but I only see a quick Apple logo after verbose boot, then a black screen and after some time a reboot happens. Any idea what may cause this? Did you upgrade to latest BIOS given undervolting works with :
setup_var_cv CpuSetup 0xda 0x01 0x00
?
Thanks for all your work, I hope mine will work too soon :).
[edit] it looks like the display goes off after boot to logo[/edit]

@jkbuha
Copy link

jkbuha commented Oct 5, 2023 via email

@VGerris
Copy link

VGerris commented Oct 5, 2023

hi, I just reinstalled Ventura on a clean disk with the original working EFI - no problems.
Then plain switched to a one on one copy of your latest EFI - I get the same problem as in Sonoma.
Regarding BIOS, I recommend upgrading, because quite some CVEs were fixed and undervolting does work by unlocking. Perhaps it can make it easier to find cause too? Although I understand it is great to have a working machine with S4 sleep :). It still looks like the display gets shut off, that didn't happen in the previous - perhaps something with the 4k display difference ? I will verify BIOS settings and look a bit further to see if I can find something. Happy to get tips for troubleshooting further, I would love to have this working too and finally be able to switch to the machine as a daily driver :).

@jkbuha
Copy link

jkbuha commented Oct 5, 2023

Could you change boot-args in EFI with the following pls:

-v keepsyms=1 kext-dev-mode=1 -igfxblr hbfx-ahbm=3 igfxnorpsc=1

@VGerris
Copy link

VGerris commented Oct 6, 2023

hi, thank you for the continued help, it's really appreciated!
I tried it, but it had no effect. I tried it on the XPS 17 9700 too, same problem.
I also tried disabling wifi and bluetooth on the 5550, same problem.

I have some stack traces, perhaps they help. I'm beginning to suspect BIOS version difference. I hope you can be persuaded to upgrade to see if it keeps working :).

The traces :

panic(cpu 6 caller 0xffffff801c995941): userspace watchdog timeout: no successful checkins from WindowServer in 120 seconds
WindowServer has not exited since first loaded
service: logd, total successful checkins in 184 seconds: 17, last successful checkin: 0 seconds ago
service: WindowServer, total successful checkins in 130 seconds: 1, last successful checkin: 120 seconds ago
service: opendirectoryd, total successful checkins in 184 seconds: 16, last successful checkin: 0 seconds ago
service: configd, total successful checkins in 184 seconds: 16, last successful checkin: 0 seconds ago

Panicked task 0xffffff8bb8909038: 3 threads: pid 100: watchdogd
Backtrace (CPU 6), panicked thread: 0xffffff954ee2cb30, Frame : Return Address
0xffffffa080a335b0 : 0xffffff801967205d mach_kernel : _handle_debugger_trap + 0x4ad
0xffffffa080a33600 : 0xffffff80197c6144 mach_kernel : _kdp_i386_trap + 0x114
0xffffffa080a33640 : 0xffffff80197b5c57 mach_kernel : _kernel_trap + 0x3b7
0xffffffa080a33690 : 0xffffff8019612951 mach_kernel : _return_from_trap + 0xc1
0xffffffa080a336b0 : 0xffffff801967233d mach_kernel : _DebuggerTrapWithState + 0x5d
0xffffffa080a337a0 : 0xffffff80196719e7 mach_kernel : _panic_trap_to_debugger + 0x1a7
0xffffffa080a33800 : 0xffffff8019ddb3f3 mach_kernel : _panic_with_options + 0x89
0xffffffa080a338f0 : 0xffffff801c995941 com.apple.driver.watchdog : __ZN10IOWatchdog14userspacePanicEP8OSObjectPvP25IOExternalMethodArguments.cold.1 + 0x27
0xffffffa080a33900 : 0xffffff801c9955dc com.apple.driver.watchdog : __ZN10IOWatchdog14userspacePanicEP8OSObjectPvP25IOExternalMethodArguments + 0x2e
0xffffffa080a33920 : 0xffffff801c9946b9 com.apple.driver.watchdog : __ZN20IOWatchdogUserClient14externalMethodEjP25IOExternalMethodArgumentsP24IOExternalMethodDispatchP8OSObjectPv + 0x7f
0xffffffa080a33a50 : 0xffffff8019d526de mach_kernel : _is_io_connect_method + 0x37e
0xffffffa080a33bb0 : 0xffffff80197728e9 mach_kernel : _iokit_server_routine + 0x3609
0xffffffa080a33cc0 : 0xffffff801964c51a mach_kernel : _ipc_kmsg_send + 0x41a
0xffffffa080a33d60 : 0xffffff8019663282 mach_kernel : _mach_msg_overwrite_trap + 0x592
0xffffffa080a33dd0 : 0xffffff8019663907 mach_kernel : _mach_msg2_trap + 0x3c7
0xffffffa080a33ef0 : 0xffffff801979b513 mach_kernel : _mach_call_munger64 + 0x1f3
0xffffffa080a33fa0 : 0xffffff8019612db6 mach_kernel : _hndl_mach_scall64 + 0x16
      Kernel Extensions in backtrace:
         com.apple.driver.watchdog(1.0)[BD08CE2D-77F5-358C-8F0D-A570540A0BE7]@0xffffff801c993000->0xffffff801c995fff

Process name corresponding to current thread (0xffffff954ee2cb30): watchdogd
Boot args: -v keepsyms=1 kext-dev-mode=1 igfxnorpsc=1 -igfxblr hbfx-ahbm=3

Mac OS version:
22G120

Kernel version:
Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64
Kernel UUID: F75FC53F-FC1A-3AB6-8980-EF66A83DD51D
roots installed: 0
KernelCache slide: 0x0000000019200000
KernelCache base:  0xffffff8019400000
Kernel slide:      0x00000000192dc000
Kernel text base:  0xffffff80194dc000
__HIB  text base: 0xffffff8019300000
System model name: MacBookPro16,4 (Mac-A61BADE1FDAD7B05)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 184522526740
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x0000002af6665b26
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000000b6b978e2c 0x0000000000000000
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Zone info:
  Zone map: 0xffffff807fb77000 - 0xffffffa07fb77000
  . PGZ   : 0xffffff807fb77000 - 0xffffff8087b78000
  . VM    : 0xffffff8087b78000 - 0xffffff8553511000
  . RO    : 0xffffff8553511000 - 0xffffff86ec844000
  . GEN0  : 0xffffff86ec844000 - 0xffffff8bb81dd000
  . GEN1  : 0xffffff8bb81dd000 - 0xffffff9083b76000
  . GEN2  : 0xffffff9083b76000 - 0xffffff954f50f000
  . GEN3  : 0xffffff954f50f000 - 0xffffff9a1aea9000
  . DATA  : 0xffffff9a1aea9000 - 0xffffffa07fb77000
  Metadata: 0xffffffc84dfb2000 - 0xffffffc86dfb2000
  Bitmaps : 0xffffffc86dfb2000 - 0xffffffc879fb2000
  Extra   : 0 - 0

panic(cpu 8 caller 0xffffff80150d7941): userspace watchdog timeout: no successful checkins from WindowServer in 120 seconds
WindowServer has not exited since first loaded
service: logd, total successful checkins in 178 seconds: 17, last successful checkin: 0 seconds ago
service: WindowServer, total successful checkins in 130 seconds: 1, last successful checkin: 120 seconds ago
service: opendirectoryd, total successful checkins in 178 seconds: 16, last successful checkin: 0 seconds ago
service: configd, total successful checkins in 178 seconds: 16, last successful checkin: 0 seconds ago

Panicked task 0xffffff86c3b49208: 3 threads: pid 100: watchdogd
Backtrace (CPU 8), panicked thread: 0xffffff905ae92b30, Frame : Return Address
0xffffffab4e7e3590 : 0xffffff8011deb31d mach_kernel : _handle_debugger_trap + 0x4ad
0xffffffab4e7e35e0 : 0xffffff8011f59236 mach_kernel : _kdp_i386_trap + 0x116
0xffffffab4e7e3620 : 0xffffff8011f48480 mach_kernel : _kernel_trap + 0x3e0
0xffffffab4e7e3670 : 0xffffff8011d85951 mach_kernel : _return_from_trap + 0xc1
0xffffffab4e7e3690 : 0xffffff8011deb5fd mach_kernel : _DebuggerTrapWithState + 0x5d
0xffffffab4e7e3780 : 0xffffff8011deaca9 mach_kernel : _panic_trap_to_debugger + 0x1a9
0xffffffab4e7e37e0 : 0xffffff80125e0993 mach_kernel : _panic_with_options + 0x89
0xffffffab4e7e38d0 : 0xffffff80150d7941 com.apple.driver.watchdog : __ZN10IOWatchdog14userspacePanicEP8OSObjectPvP25IOExternalMethodArguments.cold.1 + 0x27
0xffffffab4e7e38e0 : 0xffffff80150d75e0 com.apple.driver.watchdog : __ZN10IOWatchdog35userspaceDisableUserspaceMonitoringEP8OSObjectPvP25IOExternalMethodArguments
0xffffffab4e7e3900 : 0xffffff80150d66c9 com.apple.driver.watchdog : __ZN20IOWatchdogUserClient14externalMethodEjP25IOExternalMethodArgumentsP24IOExternalMethodDispatchP8OSObjectPv + 0x7f
0xffffffab4e7e3a30 : 0xffffff8012553f0a mach_kernel : _is_io_connect_method + 0x37a
0xffffffab4e7e3b90 : 0xffffff8011effe89 mach_kernel : _iokit_server_routine + 0x38c9
0xffffffab4e7e3ca0 : 0xffffff8011dc2c69 mach_kernel : _ipc_kmsg_send + 0x569
0xffffffab4e7e3d50 : 0xffffff8011ddbb62 mach_kernel : _mach_msg_overwrite_trap + 0x4a2
0xffffffab4e7e3dc0 : 0xffffff8011ddc26a mach_kernel : _mach_msg2_trap + 0x3ba
0xffffffab4e7e3ef0 : 0xffffff8011f2aa7a mach_kernel : _mach_call_munger64 + 0x1ea
0xffffffab4e7e3fa0 : 0xffffff8011d85db6 mach_kernel : _hndl_mach_scall64 + 0x16
      Kernel Extensions in backtrace:
         com.apple.driver.watchdog(1.0)[92D3D6F6-4641-3F89-B20E-AE9C7FA0BA06]@0xffffff80150d5000->0xffffff80150d7fff

Process name corresponding to current thread (0xffffff905ae92b30): watchdogd
Boot args: -v keepsyms=1 kext-dev-mode=1 igfxonln=1 igfxfw=2 -igfxblr hbfx-ahbm=3

Mac OS version:
22C65

Kernel version:
Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64
Kernel UUID: 6B3374E9-7FD7-354D-886F-E995FAAC2CA3
roots installed: 0
KernelCache slide: 0x0000000011a00000
KernelCache base:  0xffffff8011c00000
Kernel slide:      0x0000000011adc000
Kernel text base:  0xffffff8011cdc000
__HIB  text base: 0xffffff8011b00000
System model name: MacBookPro16,4 (Mac-A61BADE1FDAD7B05)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 178814397068
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x00000029a22b35ef
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000000956424136 0x0000000000000000
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Zone info:
  Zone map: 0xffffff8056443000 - 0xffffffa056443000
  . PGZ   : 0xffffff8056443000 - 0xffffff805e444000
  . VM    : 0xffffff805e444000 - 0xffffff8529ddd000
  . RO    : 0xffffff8529ddd000 - 0xffffff86c3110000
  . GEN0  : 0xffffff86c3110000 - 0xffffff8b8eaa9000
  . GEN1  : 0xffffff8b8eaa9000 - 0xffffff905a442000
  . GEN2  : 0xffffff905a442000 - 0xffffff9525ddb000
  . GEN3  : 0xffffff9525ddb000 - 0xffffff99f1775000
  . DATA  : 0xffffff99f1775000 - 0xffffffa056443000
  Metadata: 0xffffffffc7fee000 - 0xffffffffe7fee000
  Bitmaps : 0xffffffffe7fee000 - 0xfffffffffffee000

panic(cpu 0 caller 0xffffff8000748953): Kernel trap at 0xffffff8000301057, type 13=general protection, registers:
CR0: 0x000000008001003b, CR2: 0x0000000107550000, CR3: 0x0000000006ef1000, CR4: 0x00000000003626e0
RAX: 0xaaaaaaaaaaaaaaaa, RBX: 0xffffffffff937630, RCX: 0x0000000000000158, RDX: 0x0000000000000158
RSP: 0xffffffffff937558, RBP: 0xffffffffff937590, RSI: 0xffffff95ae554708, RDI: 0xaaaaaaaaaaaaaaaa
R8:  0x0000000000000158, R9:  0x00000000ffffffff, R10: 0x0000000000000001, R11: 0x0000000000000002
R12: 0x0000000000000002, R13: 0x0000000000000030, R14: 0xffffff95adef4180, R15: 0xffffff95adef4180
RFL: 0x0000000000010282, RIP: 0xffffff8000301057, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0x0000000107550000, Error code: 0x0000000000000000, Fault CPU: 0x0, PL: 0, VF: 0

Panicked task 0xffffff874c05c208: 202 threads: pid 0: kernel_task
Backtrace (CPU 0), panicked thread: 0xffffff874c2feb30, Frame : Return Address
0xffffff800030c1a0 : 0xffffff80005eb31d mach_kernel : _handle_debugger_trap + 0x4ad
0xffffff800030c1f0 : 0xffffff8000759236 mach_kernel : _kdp_i386_trap + 0x116
0xffffff800030c230 : 0xffffff8000748480 mach_kernel : _kernel_trap + 0x3e0
0xffffff800030c280 : 0xffffff8000585951 mach_kernel : _return_from_trap + 0xc1
0xffffff800030c2a0 : 0xffffff80005eb5fd mach_kernel : _DebuggerTrapWithState + 0x5d
0xffffff800030c390 : 0xffffff80005eaca9 mach_kernel : _panic_trap_to_debugger + 0x1a9
0xffffff800030c3f0 : 0xffffff8000de08cb mach_kernel : _panic + 0x84
0xffffff800030c4e0 : 0xffffff8000748953 mach_kernel : _sync_iss_to_iks + 0x2c3
0xffffff800030c660 : 0xffffff8000748642 mach_kernel : _kernel_trap + 0x5a2
0xffffff800030c6b0 : 0xffffff8000585951 mach_kernel : _return_from_trap + 0xc1
0xffffff800030c6d0 : 0xffffff8000301057 
0xffffffffff937590 : 0xffffff800451847d com.zxystd.AirportItlwm : __ZN12AirportItlwm17apple80211RequestEjiP16IO80211InterfacePv + 0x84d
0xffffffffff937600 : 0xffffff800231147d com.apple.iokit.IO80211FamilyLegacy : __ZN13RSNSupplicant14storeFullRSNIEEP16RSNAuthenticator + 0x77
0xffffffffff937a60 : 0xffffff800230f987 com.apple.iokit.IO80211FamilyLegacy : __ZN13RSNSupplicant11process1of4EP16RSNAuthenticatorP6__mbufP7wpa_keyt + 0x1c5
0xffffffffff937c10 : 0xffffff80022dd661 com.apple.iokit.IO80211FamilyLegacy : __ZN16IO80211Interface11inputPacketEP6__mbufjjPv + 0x369
0xffffffffff937c80 : 0xffffff8004474204 com.zxystd.AirportItlwm : __ZN21AirportItlwmInterface11inputPacketEP6__mbufjjPv + 0x114
0xffffffffff937cf0 : 0xffffff800446d017 com.zxystd.AirportItlwm : __ZL9_if_inputP8OSObjectPvS1_S1_S1_ + 0xd7
0xffffffffff937d60 : 0xffffff8000d15d54 mach_kernel : __ZN13IOCommandGate9runActionEPFiP8OSObjectPvS2_S2_S2_ES2_S2_S2_S2_ + 0xb4
0xffffffffff937dc0 : 0xffffff800446cf36 com.zxystd.AirportItlwm : __Z8if_inputP6_ifnetP9mbuf_list + 0x66
0xffffffffff937e00 : 0xffffff80044dec53 com.zxystd.AirportItlwm : __ZN6ItlIwx14iwx_notif_intrEP9iwx_softc + 0x153
0xffffffffff937e60 : 0xffffff80044df2e9 com.zxystd.AirportItlwm : __ZN6ItlIwx8iwx_intrEP8OSObjectP22IOInterruptEventSourcei + 0x629
0xffffffffff937ed0 : 0xffffff8000d14764 mach_kernel : __ZN22IOInterruptEventSource12checkForWorkEv + 0x114
0xffffffffff937f20 : 0xffffff8000d1305e mach_kernel : __ZN10IOWorkLoop15runEventSourcesEv + 0x12e
0xffffffffff937f60 : 0xffffff8000d12697 mach_kernel : __ZN10IOWorkLoop10threadMainEv + 0x37
0xffffffffff937fa0 : 0xffffff800058519e mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         com.apple.iokit.IO80211FamilyLegacy(1200.12.2b1)[63565270-42B3-31A8-80FB-16DA0EBBFA4C]@0xffffff8002240000->0xffffff8002386fff
            dependency: com.apple.driver.AppleMobileFileIntegrity(1.0.5)[4E741445-0025-3DB8-8292-C7533F3C0917]@0xffffff8001b92000->0xffffff8001bc0fff
            dependency: com.apple.driver.corecapture(1.0.4)[3A3001CC-D289-35D6-B101-7B16A7F8AC9E]@0xffffff80037f0000->0xffffff8003812fff
            dependency: com.apple.iokit.CoreAnalyticsFamily(1)[D0FF0186-6F90-3AF1-9F7E-A2BD383CCA20]@0xffffff8001edc000->0xffffff8001ee5fff
            dependency: com.apple.iokit.IONetworkingFamily(3.4)[196DFD8C-1D79-39E6-AEFA-FCF645C51977]@0xffffff8002d9f000->0xffffff8002db5fff
            dependency: com.apple.iokit.IOSkywalkFamily(1.0)[F96DD1E4-1285-31A2-8AE8-4C6884D59E11]@0xffffff80030e9000->0xffffff8003116fff
            dependency: com.apple.kec.corecrypto(12.0)[7A2A4035-FDBB-38A2-88B7-7AF62A0BD48B]@0xffffff8003821000->0xffffff8003899fff
         com.zxystd.AirportItlwm(2.2)[C05CE393-171B-3D6E-907F-DE32B2105CC1]@0xffffff800446c000->0xffffff80053b2fff
            dependency: com.apple.iokit.IO80211FamilyLegacy(1200.12.2b1)[63565270-42B3-31A8-80FB-16DA0EBBFA4C]@0xffffff8002240000->0xffffff8002386fff
            dependency: com.apple.iokit.IONetworkingFamily(3.4)[196DFD8C-1D79-39E6-AEFA-FCF645C51977]@0xffffff8002d9f000->0xffffff8002db5fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[752CD69F-309E-31FF-881C-2A22ACB6C0B6]@0xffffff8003000000->0xffffff800302ffff

Process name corresponding to current thread (0xffffff874c2feb30): kernel_task
Boot args: -v keepsyms=1 kext-dev-mode=1 igfxonln=1 igfxfw=2 -igfxblr hbfx-ahbm=3

Mac OS version:
22C65

Kernel version:
Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64
Kernel UUID: 6B3374E9-7FD7-354D-886F-E995FAAC2CA3
roots installed: 0
KernelCache slide: 0x0000000000200000
KernelCache base:  0xffffff8000400000
Kernel slide:      0x00000000002dc000
Kernel text base:  0xffffff80004dc000
__HIB  text base: 0xffffff8000300000
System model name: MacBookPro16,4 (Mac-A61BADE1FDAD7B05)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 35231988731
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x0000000833fd7f92
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000000c36ae9d90 0x0000000000000000
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Zone info:
  Zone map: 0xffffff80df35d000 - 0xffffffa0df35d000
  . PGZ   : 0xffffff80df35d000 - 0xffffff80e735e000
  . VM    : 0xffffff80e735e000 - 0xffffff85b2cf7000
  . RO    : 0xffffff85b2cf7000 - 0xffffff874c02a000
  . GEN0  : 0xffffff874c02a000 - 0xffffff8c179c3000
  . GEN1  : 0xffffff8c179c3000 - 0xffffff90e335c000
  . GEN2  : 0xffffff90e335c000 - 0xffffff95aecf5000
  . GEN3  : 0xffffff95aecf5000 - 0xffffff9a7a68f000
  . DATA  : 0xffffff9a7a68f000 - 0xffffffa0df35d000
  Metadata: 0xffffff8044bc9000 - 0xffffff8064bc9000
  Bitmaps : 0xffffff8064bc9000 - 0xffffff807cbc9000



The last one I think was the wireless driver that was mismatched, that was fixed after updating it.
So same problem pretty much across machines on Ventura 13.1, 13.6 and Sonoma.

@jkbuha
Copy link

jkbuha commented Oct 7, 2023

Ok let's try and troubleshoot exactly where it happened. It's clearly not a bios version problem (otherwise the first commit wouldn't have worked for you), and we also need to make the S4 fix universal across all the XPS and Precision versions, irrespective of the configuration. A lot of further power and performance optimisation fixes have been committed since the first version so you'll get a lot more benefits by being on the same branch.

Let's narrow down exactly which commit broke restore functionality. Could you download my second major version here (Download ZIP) and see if it works for you?

@VGerris
Copy link

VGerris commented Oct 10, 2023

oh, I see my post wasn't posted. Feedback: this boots but the screen shows a divison in 4 blocks : 2 big ones created by a line across the middle of the screen horizontally then another vertical line a few cm from the left. Interestingly, when the machine is put to sleep and then wake, sometimes the screen recovers. I do seem to have more power use than before sleep ( about 15 vs 30 ).
By the way, small typo in sudo pmset hibernatemode 25 on your page.
Thanks again for all the help, I hope we can nail it down :)!

@jkbuha
Copy link

jkbuha commented Oct 10, 2023 via email

@VGerris
Copy link

VGerris commented Oct 10, 2023 via email

@jkbuha
Copy link

jkbuha commented Oct 10, 2023 via email

@VGerris
Copy link

VGerris commented Oct 11, 2023

I have tried to make this the same as the one that worked earlier : PciRoot(0x0)/Pci(0x2,0x0) - I took various steps.
When I eventually commented : dpcd-max-link-rate like #dpcd-max-link-rate it worked properly.
Regarding power use I pretty much see the same as before : at boot about 31, going down to about 17. Then after hibernate wake currently around 45 , but not going down a lot, to about 30-35 Watts.
I will try to enable the other options again, but it didn't seem to affect the power use.
If you have suggestions on what to investigate, please let me know.
And once again thank you very much for your continued support!

@jkbuha
Copy link

jkbuha commented Oct 11, 2023 via email

@VGerris
Copy link

VGerris commented Oct 11, 2023

pulled latest of your EFI, changed the option, upgraded itlwm and airport equivalent.
It hangs at boot just after iGPU - PWRD something I see AppleALC too I think then a hang with a reference to disk0s4 I believe.
I didn't see the pci id for the Nvidia card in hackintool, where can I find it and which line in the config aims to block it?
thanks!

@jkbuha
Copy link

jkbuha commented Oct 11, 2023 via email

@VGerris
Copy link

VGerris commented Oct 11, 2023 via email

@VGerris
Copy link

VGerris commented Oct 12, 2023

my Nvidia pci path is pci bus 1, device 0, function 0 , so I suppose 01:00.0 . can't get the latest EFI to work

@jkbuha
Copy link

jkbuha commented Oct 12, 2023

At this point I'm unsure what's not working with your config, which is a shame as I've got the latest updates working well and have even upgraded to Ventura and hibernate/resume and low-power after wake is all working fine, avg power on idle = 3W. I still need to do some further aspm optimisation but will do so once you've managed to use my updated EFI as well.

What I'd suggest is to upload your most up to date working EFI together with your DSDT.aml and ioreg file (or point me to your github repo if you have one) and I'll try and see if I can send a few patches your way.

@VGerris
Copy link

VGerris commented Oct 12, 2023

hi, thank you for hanging in there and all the help, greatly appreciated!
That sounds like an amazing result, can't wait to get there too :)!
I will try my best to facilitate. I forked your repo and create an archive folder with working EFI folders.
The last working one is this commit : https://github.com/jkbuha/XPS-9500-IceLake-OpenCore/tree/9f12bc3e757e8f8119e73b5dad95b20a54abd5c8 when I just disable dpcd-max-link-rate.

That can be found here:
https://github.com/VGerris/XPS-9500-IceLake-OpenCore/tree/main/EFI_archives/EFI.095-last-working-9f12bc3e757e8f8119e73b5dad95b20a54abd5c8
I also added the ioreg there.

This is probably the stacktrace from your latest commit, with as only change again the dpcd-max-link-rate commented:

panic(cpu 6 caller 0xffffff80019b60f3): Kernel trap at 0xffffff7f967db65b, type 0=divide error, registers:
CR0: 0x000000008001003b, CR2: 0x0000000109f6d000, CR3: 0x0000001045a87002, CR4: 0x00000000003626e0
RAX: 0x01a7c9fd80000000, RBX: 0x01a7c9fd80000000, RCX: 0x0000000000006000, RDX: 0x0000000000000000
RSP: 0xffffffc13bea3280, RBP: 0xffffffc13bea32b0, RSI: 0x00000000000000a1, RDI: 0xffffff8002516a38
R8:  0x0000000000000000, R9:  0xffffff9089bf6000, R10: 0x0000000000000001, R11: 0x000000000000000a
R12: 0x000000002350d520, R13: 0x0000000000000000, R14: 0xffffffc13bea32c8, R15: 0x0000000009a7ec80
RFL: 0x0000000000010246, RIP: 0xffffff7f967db65b, CS:  0x0000000000000008, SS:  0x0000000000000010
Fault CR2: 0x0000000109f6d000, Error code: 0x0000000000000000, Fault CPU: 0x6, PL: 0, VF: 0

Panicked task 0xffffff8bbe484698: 10 threads: pid 146: WindowServer
Backtrace (CPU 6), panicked thread: 0xffffff8bbecdf0c8, Frame : Return Address
0xffffffc13bea2c60 : 0xffffff800187205d mach_kernel : _handle_debugger_trap + 0x4ad
0xffffffc13bea2cb0 : 0xffffff80019c6144 mach_kernel : _kdp_i386_trap + 0x114
0xffffffc13bea2cf0 : 0xffffff80019b5c57 mach_kernel : _kernel_trap + 0x3b7
0xffffffc13bea2d40 : 0xffffff8001812951 mach_kernel : _return_from_trap + 0xc1
0xffffffc13bea2d60 : 0xffffff800187233d mach_kernel : _DebuggerTrapWithState + 0x5d
0xffffffc13bea2e50 : 0xffffff80018719e7 mach_kernel : _panic_trap_to_debugger + 0x1a7
0xffffffc13bea2eb0 : 0xffffff8001fdb32b mach_kernel : _panic + 0x84
0xffffffc13bea2fa0 : 0xffffff80019b60f3 mach_kernel : _sync_iss_to_iks + 0x2c3
0xffffffc13bea3120 : 0xffffff80019b5ddd mach_kernel : _kernel_trap + 0x53d
0xffffffc13bea3170 : 0xffffff8001812951 mach_kernel : _return_from_trap + 0xc1
0xffffffc13bea3190 : 0xffffff7f967db65b com.apple.driver.AppleIntelCFLGraphicsFramebuffer : __ZN31AppleIntelFramebufferController14SetupDPTimingsEP21AppleIntelFramebufferP21AppleIntelDisplayPathPNS_10CRTCParamsE + 0xf5
0xffffffc13bea32b0 : 0xffffff7f967d8afc com.apple.driver.AppleIntelCFLGraphicsFramebuffer : __ZN31AppleIntelFramebufferController9hwSetModeEP21AppleIntelFramebufferP21AppleIntelDisplayPathPK29IODetailedTimingInformationV2 + 0x272
0xffffffc13bea3720 : 0xffffff7f967ac5f5 com.apple.driver.AppleIntelCFLGraphicsFramebuffer : __ZN21AppleIntelFramebuffer14setDisplayModeEii + 0xf8d
0xffffffc13bea38e0 : 0xffffff7f975df7fc com.apple.iokit.IOGraphicsFamily : __ZN13IOFramebuffer16doSetDisplayModeEii + 0x128
0xffffffc13bea3970 : 0xffffff7f975df65f com.apple.iokit.IOGraphicsFamily : __ZN13IOFramebuffer17extSetDisplayModeEP8OSObjectPvP25IOExternalMethodArguments + 0x97
0xffffffc13bea3a00 : 0xffffff7f975e6034 com.apple.iokit.IOGraphicsFamily : __ZN23IOFramebufferUserClient14externalMethodEjP25IOExternalMethodArgumentsP24IOExternalMethodDispatchP8OSObjectPv + 0x82
0xffffffc13bea3a50 : 0xffffff8001f526de mach_kernel : _is_io_connect_method + 0x37e
0xffffffc13bea3bb0 : 0xffffff80019728e9 mach_kernel : _iokit_server_routine + 0x3609
0xffffffc13bea3cc0 : 0xffffff800184c51a mach_kernel : _ipc_kmsg_send + 0x41a
0xffffffc13bea3d60 : 0xffffff8001863282 mach_kernel : _mach_msg_overwrite_trap + 0x592
0xffffffc13bea3dd0 : 0xffffff8001863907 mach_kernel : _mach_msg2_trap + 0x3c7
0xffffffc13bea3ef0 : 0xffffff800199b513 mach_kernel : _mach_call_munger64 + 0x1f3
0xffffffc13bea3fa0 : 0xffffff8001812db6 mach_kernel : _hndl_mach_scall64 + 0x16
      Kernel Extensions in backtrace:
         com.apple.iokit.IOGraphicsFamily(597.0)[718E01CF-8B05-3042-88F4-DE3441395D00]@0xffffff7f975c1000->0xffffff7f975effff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[F11A1D9C-398D-3933-94D6-9539D3B7B1FD]@0xffffff80042ac000->0xffffff80042ddfff
         com.apple.driver.AppleIntelCFLGraphicsFramebuffer(20.0.6)[38204761-5F6B-3734-99F4-E4C7B2C822C8]@0xffffff7f9678e000->0xffffff7f96853fff
            dependency: com.apple.AppleGraphicsDeviceControl(7.1.18)[B22B74AE-08E9-3D23-8F7A-EAD3C39EE7AD]@0xffffff7f96504000->0xffffff7f96507fff
            dependency: com.apple.iokit.IOACPIFamily(1.4)[D342E754-A422-3F44-BFFB-DEE93F6723BC]@0xffffff8003e3c000->0xffffff8003e3dfff
            dependency: com.apple.iokit.IOAcceleratorFamily2(475.40.6)[5CEA519D-44FC-30EB-8622-2394570EBDD4]@0xffffff7f97420000->0xffffff7f9748afff
            dependency: com.apple.iokit.IOGraphicsFamily(597)[718E01CF-8B05-3042-88F4-DE3441395D00]@0xffffff7f975c1000->0xffffff7f975effff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[F11A1D9C-398D-3933-94D6-9539D3B7B1FD]@0xffffff80042ac000->0xffffff80042ddfff
            dependency: com.apple.iokit.IOReportFamily(47)[491DDA55-D371-3A28-9A77-C28DB013D8AE]@0xffffff80042ee000->0xffffff80042f0fff

Process name corresponding to current thread (0xffffff8bbecdf0c8): WindowServer
Boot args: -v keepsyms=1 kext-dev-mode=1 igfxonln=1 igfxfw=2 -igfxblr hbfx-ahbm=3 acpi_layer=0x8 acpi_level=0x2 debug=0x100

Mac OS version:
22G120

Kernel version:
Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64
Kernel UUID: F75FC53F-FC1A-3AB6-8980-EF66A83DD51D
roots installed: 0
KernelCache slide: 0x0000000001400000
KernelCache base:  0xffffff8001600000
Kernel slide:      0x00000000014dc000
Kernel text base:  0xffffff80016dc000
__HIB  text base: 0xffffff8001500000
System model name: MacBookPro16,4 (Mac-A61BADE1FDAD7B05)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 35299179102
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x0000000837febd1e
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000002c3b09b228 0x0000000000000000
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Zone info:
  Zone map: 0xffffff8085e4d000 - 0xffffffa085e4d000
  . PGZ   : 0xffffff8085e4d000 - 0xffffff808de4e000
  . VM    : 0xffffff808de4e000 - 0xffffff85597e7000
  . RO    : 0xffffff85597e7000 - 0xffffff86f2b1a000
  . GEN0  : 0xffffff86f2b1a000 - 0xffffff8bbe4b3000
  . GEN1  : 0xffffff8bbe4b3000 - 0xffffff9089e4c000
  . GEN2  : 0xffffff9089e4c000 - 0xffffff95557e5000
  . GEN3  : 0xffffff95557e5000 - 0xffffff9a2117f000
  . DATA  : 0xffffff9a2117f000 - 0xffffffa085e4d000
  Metadata: 0xffffffa085e5d000 - 0xffffffa0a5e5d000
  Bitmaps : 0xffffffa0a5e5d000 - 0xffffffa0b1e5d000
  Extra   : 0 - 0

If there's anything more I can do, I am happy to. This was all running on Ventura 13.6. Glad you upgraded too, BIOS not yet? good night!

@jkbuha
Copy link

jkbuha commented Oct 12, 2023 via email

@VGerris
Copy link

VGerris commented Oct 13, 2023

awesome!
Pulled your EFI, same issue, hang at boot when almost there.
My paths are:
1 - same as in the linked guide : https://dortania.github.io/Getting-Started-With-ACPI/assets/img/nvidia.672e8e16.png ( bios info )
2 - Location paths : PCIROOT(0)#PCI(0100)#PCI(0000)
ACPI(SB)#ACPI(PCI0)#ACPI(PEG0)#ACPI(PEGP)

I hope it is what you say it is. If so, it should work on the XPS 9700 I suppose ? I haven't had time yet to test on that one, I need a working computer too :).
cheers!

@jkbuha
Copy link

jkbuha commented Oct 13, 2023 via email

@VGerris
Copy link

VGerris commented Oct 13, 2023 via email

@jkbuha
Copy link

jkbuha commented Oct 14, 2023

S4 Sleep (Hibernate+Resume) should now be fixed for all XPS 9500 and also Precision 5550 machines (thanks for confirming @VGerris!). Have pushed the latest changes to github...

@VGerris
Copy link

VGerris commented Oct 14, 2023

I can confirm the latest commit, which is : https://github.com/jkbuha/XPS-9500-IceLake-OpenCore/tree/878c183576497f4ab998601d0292f77fb383569b works like a charm!
Thank you @jkbuha for all your help and support !
I am working on finalising the config with a script ( auto fill in of new generated values for SMBIOS etc ) and enable graphical OC, so I forked and if I can keep it compatible I will make a PR.

I understand more optimisations may come and who knows, perhaps S3.
For the sake of everyone getting email on this issue, perhaps the discussion around it may perhaps be best held outside this issue - check out the git repo and please help if you can :).

Big thanks and congratulations to @jkbuha for beating Dell to fixing their broken BIOS and giving us all a laptop that sucks less, or better yet is suddenly very useable.

P.S I have a case open at Dell Pro support for the S3 issue and will keep chasing them, but it does not seem likely they will actually fix their crap, it has been 5 BIOS updates or more since without changes, even while they admitted the issue and promised a solution ( without ETA). I will probably spent some effort trying to get it to work if that does not work out, but for now I am very happy with the way it works with S4!

@valinet
Copy link

valinet commented Apr 22, 2024

Any tips on how to have S3 work on battery as well? I have Precision 5680 and it exhibits the same bug: S3 sleep works (after advertising is enabled with setup_var 0xE 0x1) when the AC adapter is connected, but hangs when on DC (battery). Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants