Not waking up from Suspend with dedicated graphics

Hi,

suspend worked perfectly with integrated graphics but since I upgraded to a dedicated graphics card, it does not work anymore. Everything turns off, but it does not wake up any more: no key press, no mouse movement and not even the power button are able to wake the computer. I have to long-press the power button and only then I can boot again, but the session is gone of course.

After entering standby, the mainboard status code shows 03, that might be normal since the manual does not have that code listed.

Currently the system uses video-hybrid-intel-nvidia-prime that was selected by sudo mhwd -a pci nonfree 0300
While I am not using the integrated graphics anymore, I guess it is good to have the ability to use it, if the main gpu ever has issues, no?
Before I break my system trying to replace it with video-nvidia, I’d rather ask the experts if that might be a solution.

So, what might be the reason my pc is not waking up and how can I fix it?

inxi -Fazy

System:
  Kernel: 6.6.10-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_x11 vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: Z690 AORUS MASTER v: -CF
  Mobo: Gigabyte model: Z690 AORUS MASTER
    UEFI: American Megatrends LLC. v: F25 date: 07/24/2023
CPU:
  Info: model: 13th Gen Intel Core i9-13900K bits: 64 type: MST AMCP
    arch: Raptor Lake gen: core 13 level: v3 note: check built: 2022+
    process: Intel 7 (10nm) family: 6 model-id: 0xB7 (183) stepping: 1
    microcode: 0x11D
  Topology: cpus: 1x cores: 24 mt: 8 tpc: 2 st: 16 threads: 32 smt: enabled
    cache: L1: 2.1 MiB desc: d-16x32 KiB, 8x48 KiB; i-8x32 KiB, 16x64 KiB
    L2: 32 MiB desc: 8x2 MiB, 4x4 MiB L3: 36 MiB desc: 1x36 MiB
Graphics:
  Device-1: NVIDIA AD102 [GeForce RTX 4090] driver: nvidia v: 545.29.06
    alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2023-11) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:2684 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.10 compositor: kwin_x11 driver: X:
    loaded: modesetting,nouveau,nvidia alternate: fbdev,nv,vesa gpu: nvidia
    display-ID: :0 screens: 1
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
    memory: 23.43 GiB
  API: Vulkan v: 1.3.274 layers: 2 device: 0 type: discrete-gpu
    name: NVIDIA GeForce RTX 4090 driver: nvidia v: 545.29.06
    device-ID: 10de:2684 surfaces: xcb,xlib
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: Gigabyte driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:7ad0
    class-ID: 0403
  Device-2: NVIDIA AD102 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:22ba class-ID: 0403
  API: ALSA v: k6.6.10-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: JACK v: 1.9.22 status: off tools: N/A
  Server-3: PipeWire v: 1.0.0 status: off with: pipewire-media-session
    status: off tools: pw-cli
  Server-4: PulseAudio v: 16.1 status: active with: 1: pulseaudio-alsa
    type: plugin 2: pulseaudio-jack type: module tools: pacat,pactl

Logs:
journalctl --boot -1 | sed -n -r "/Starting.+Suspend/,/Finished.+Suspend/p"

Jan 29 12:01:10 pc systemd[1]: Starting System Suspend...
Jan 29 12:01:10 pc systemd-sleep[22309]: Failed to lock home directories: Unknown object '/org/freedesktop/home1'.
Jan 29 12:01:10 pc systemd-sleep[22309]: Performing sleep operation 'suspend'...
Jan 29 12:01:10 pc kernel: PM: suspend entry (deep)

journalctl --no-pager --no-hostname -b-1 -p3

Jan 29 15:59:55 systemd-udevd[537]: /usr/lib/udev/rules.d/69-mixxx-usb-uaccess.rules:57 Unknown group 'uaccess', ignoring.
Jan 29 15:59:56 kernel: iwlwifi 0000:00:14.3: WRT: Invalid buffer destination
Jan 29 15:59:56 kernel: 
Jan 29 15:59:56 kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  545.29.06  Thu Nov 16 01:59:08 UTC 2023
Jan 29 15:59:58 kernel: usbhid 1-6.1:1.0: can't add hid device: -32
Jan 29 15:59:58 (udev-worker)[618]: hiddev0: /usr/lib/udev/rules.d/69-mixxx-usb-uaccess.rules:57 Only network interfaces can be renamed, ignoring NAME="usb/%k".
Jan 29 15:59:59 kernel: Bluetooth: hci0: Malformed MSFT vendor event: 0x02
Jan 29 15:59:59 bluetoothd[1121]: src/adapter.c:reset_adv_monitors_complete() Failed to reset Adv Monitors: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to clear UUIDs: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to set mode: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 15:59:59 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 16:00:04 libddcutil[1741]: i2c_check_businfo_connector() failed for bus 10
Jan 29 16:00:06 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 16:00:06 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 16:00:06 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 16:00:06 bluetoothd[1121]: Failed to add UUID: Failed (0x03)
Jan 29 16:00:10 systemd[1518]: Failed to start Kate - Advanced Text Editor.
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0x90001, and key code 221: Invalid argument
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0x90002, and key code 171: Invalid argument
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0x90003, and key code 219: Invalid argument
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0x90004, and key code 148: Invalid argument
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0x90005, and key code 149: Invalid argument
Jan 29 16:01:18 (udev-worker)[2925]: event17: Failed to call EVIOCSKEYCODE with scan code 0xc0183, and key code 226: Invalid argument
Jan 29 16:08:07 systemd-sleep[3486]: Failed to lock home directories: Unknown object '/org/freedesktop/home1'.

sudo dmesg --level=emerg,alert,crit,err

[    5.717733] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  545.29.06  Thu Nov 16 01:59:08 UTC 2023
[    5.741999] iwlwifi 0000:00:14.3: WRT: Invalid buffer destination
[    8.876290] Bluetooth: hci0: Malformed MSFT vendor event: 0x02

Bluetooth and wifi are disabled.

Hi @Anthony,

I see it is an Nvidia card, so I’m going to ask, have you setup your suspend according to:

https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend

Because, speaking from experience, not having it set up correctly can be…interesting. See also:

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Troubleshooting

Hope this helps!


:bangbang: Tip: :bangbang:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Thanks for the hints @Mirdarthos!

Unfortunately, I had no success with the tips from #Troubleshooting.

While I have not set up suspend like in your first link, the troubleshooting page is referring to “failures such as rendering corruption and application crashes” and I assume you had such issues. So that might be an issue that I have to tackle down the line, but before that, the problem is that the computer seems “dead” after (presumably) entering standby.

Then we’ll need to obviously dig deeper. Please post the output of:

journalctl --boot=-1 | grep 'sleep\|suspend'

Where:

  • the --boot=-1 argument limits the output to log messages from the previous boot. This can be adjusted to -2 for the boot before that, -3 to the boot before that, and so on and so forth;
  • the output of the command is piped to grep which searches for any mention of either “suspend” or “sleep”;

I doubt it has anything to do with this, as I also have that error.

Another thing to try is a different kernel. Try 6.1 as it will be maintained for 10 years. Yo install it, run:

sudo mhwd-kernel --install linux61

Reboot into it:

…And test.

Try

sudo nano /etc/default/grub

edit your config and insert these exact lines

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash udev.log_priority=3 mem_sleep_default=deep"

update grub:

sudo update-grub

Reboot. Test it. Tell me if it helped.

@Mirdarthos
Going back to kernel 6.1.71-1 did not change the behavior, unfortunately.
The output of journalctl --boot=-1 | grep 'sleep\|suspend' with 6.1.71-1 kernel was:

Feb 03 14:13:22 pc kernel: ahci 0000:00:17.0: port does not support device sleep
Feb 03 14:15:05 pc systemd-logind[1115]: The system will suspend now!
Feb 03 14:15:05 pc ModemManager[1265]: <msg> [sleep-monitor-systemd] system is about to suspend
Feb 03 14:15:05 pc NetworkManager[1109]: <info>  [1706966105.8894] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Feb 03 14:15:05 pc NetworkManager[1109]: <info>  [1706966105.8895] device (wlo1): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Feb 03 14:15:06 pc systemd-sleep[2667]: Failed to lock home directories: Unknown object '/org/freedesktop/home1'.
Feb 03 14:15:06 pc systemd-sleep[2667]: Performing sleep operation 'suspend'...
Feb 03 14:15:06 pc kernel: PM: suspend entry (deep)

@oldfield
Same result with the edited grub cmdline: the computer goes to sleep but can’t be waked up.
With kernel 6.6.10-1 and your edit to grub, this is the output of journalctl --boot=-1 | grep 'sleep\|suspend':

Feb 03 14:01:19 pc kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64 root=UUID=redacted rw quiet udev.log_priority=3 mem_sleep_default=deep
Feb 03 14:01:19 pc kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64 root=UUID=redacted rw quiet udev.log_priority=3 mem_sleep_default=deep
Feb 03 14:01:21 pc kernel: ahci 0000:00:17.0: port does not support device sleep
Feb 03 14:03:18 pc systemd-logind[1038]: The system will suspend now!
Feb 03 14:03:18 pc ModemManager[1217]: <msg> [sleep-monitor-systemd] system is about to suspend
Feb 03 14:03:18 pc NetworkManager[1032]: <info>  [1706965398.7377] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Feb 03 14:03:18 pc NetworkManager[1032]: <info>  [1706965398.7379] device (wlo1): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Feb 03 14:03:18 pc systemd-sleep[2829]: Failed to lock home directories: Unknown object '/org/freedesktop/home1'.
Feb 03 14:03:18 pc systemd-sleep[2829]: Performing sleep operation 'suspend'...
Feb 03 14:03:18 pc kernel: PM: suspend entry (deep)

According to lspci, the message ahci 0000:00:17.0: port does not support device sleep points to

00:17.0 SATA controller: Intel Corporation Alder Lake-S PCH SATA Controller [AHCI Mode] (rev 11)

but the controller/disks have been there before installing the dedicated gpu, when suspend was still working perfectly, this doesn’t make sense.

If you have the suspend setup as per that Arch Wiki article:

https://wiki.archlinux.org/title/NVIDIA

…and it’s still not working, well then…

:man_shrugging:

I’ll try it once I understand how, but from my point of view, the computer is not getting to the point where “failures such as rendering corruption and application crashes upon exit from power management cycles” could happen. It’s like it does not get the signal to wake up once it sleeps, there is absolutely no reaction.

I tried a different keyboard, different USB port (both probably pointless since the power button does also not wake it up), enabled NativeASPM in UEFI, disabled ErP in UEFI, nothing changed.
Same result when suspending a live manjaro (proprietary gpu drivers).

I am facing and observing the same problems.
I had this problem first at feb '23, then it did go away for 6 months, and it came back with the Dec '23 update.
At the meantime, i had a gtx960, a gtx750ti and now a gtx1070 video card, but all of them have problems with to wake up after suspend.
For me seems its a XFCE problem, because gnome seems work well.

But it also looks like, XFCE doesnt initialize the monitor well.
I made me a shortcut for xfdesktop --reload display=:0 but it only freeze the visible mouse pointer for a minute what obviously means, it does the reload, but still dont load the desktop.
Its even more worse with Kernel 6.6 because i got a blackscreen there, with Kernel 6.1 i got a mousepointer all time.

I also did set at powermanagement - system power saving mode to suspend instead of hibernate or sleep, what helped a bit, that the black screen does not appear each time.

And the last days, it mostly worked, when i first rightclick, then leftclick with the mouse on that black screen. Or right-left click spammed on the screen. Today it did take a minute before it did load again, but still did load again.

Maybe it helps, when you try that, because i dont really know, where else to look.

Same here with KDE…(pc wakes up, but no output to the monitor at all, so no tty etc.) It worked for a while last year, but now it’s broken again.

I have tried all your suggestions (Nvidia hibernate/suspend, acpi fake-windows-version etc) Nothing has worked so far…

Guess all we can do is wait for some future update to fix the problem.
Meanwhile i will try your click-spamming or use SysReq as usual :wink:

Seems like you have a different issue then because my computer does not wake up at all (fans not starting, no “switching on” sound from the power supply, nothing).

If i remember right, i had that issue once (not waking up at all).
Solved it, by switching in the Bios from “wkae up controlled by os” to “wake up controlled by Bios”

I’m on KDE, so I tried a gnome flash drive and there wasn’t even a sleep or suspend button.
sudo systemctl suspend returned Call to Suspend failed: Access denied so I tried to activate the suspend service with
systemctl start nvidia-suspend.service
and the display turns black and keyboard/mouse inputs are ignored - is that normal?

Checking the suspend/resume services on KDE:

systemctl status nvidia-suspend.service 
○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-suspend.service; disabled; preset: disabled)
     Active: inactive (dead)

systemctl status nvidia-resume.service 
○ nvidia-resume.service - NVIDIA system resume actions
     Loaded: loaded (/usr/lib/systemd/system/nvidia-resume.service; disabled; preset: disabled)
     Active: inactive (dead)

Is that output normal, shouldn’t these services be “active”?

I think i remember too, that some live Iso have no suspend function, all you can do is to run or install the live usb. So i would say its normal

But i did install my gnome parallel, you then can choose your session at your login at ie. lightdm.
Beside your login name is a button to pick your session.
What was btw fun at ubuntu and i had some space, when i could have 2-3 Desktops installed and switch around as i did like to.
Its also is easy uninstalled again, if you dont like it anymore.

When i says “Access denied” i would more assume, its not loaded.
You may want do first a systemctl enable nvidia-suspend.service

When you then type systemctl start nvidia-suspend.servicethen it goes into suspend.
So the message “inactive” is logical correct, that your pc is right now not at suspend.
I did the same, and got that ugly blackscreen too, that noting as a hard reset did work anymore.
Looks like, its not the best method to send the pc into suspend.

But for this sudo systemctl suspend returned Call to Suspend failed: Access denied you may need to look for other solutions ie. the web. Seems it can be caused by other problems like here which points at comment 19 to the wiki there

@AlexBoldt
Thanks for the suggestion - while I don’t have those options in my BIOS, I noticed that I had enabled ResizableBAR after installing the GPU. So I deactivated all related settings (Above 4G Decoding, Above 4GB MMIO BIOS assignment and Re-Size BAR Support) and after that, the computer is finally reacting to the wake signal.

Unfortunately, this has not solved my suspend issue completely: while the system does sometimes wake up now, in most cases it only wakes up partially: audible power supply switching, GPU powering up but the display just shows “No Signal”. Also, the system does not seem to have woken up completely since there is no confirmation sound from the speakers on pressing the volume up/down buttons.
So most of the time I need to press “Reset” loosing the prior session.

Better try first a ctrl+alt+backspace first. Doing a reboot all time can cause the system to want do a file check or get your filessystem corrupted.
Its a shortcut to restart the xserver, it only doesnt work for me every time, because my xserver looks like to freeze after a minute or so.
A second method would be to switch to a console with ctrl+alt+F1-F6 and do a sudo systemctl restart lightdm or whatever DM-manager you have.

In Manjaro, I’d suggest F3 to F6 as the first two tend to be tied to the X-server etc…

Probably just a coincident, but after resetting the BIOS to defaults and then configuring everything anew the same as before, Suspend worked for the last couple of days, but now it does once again not wake up entirely (Power switches on, GPU on, disk spinning again, mouse on, mainboard debug leds displaying the same code that is displayed when the system is running normally, but no display signal, no keyboard).
Guess Manjaro did not wake up completely.

The keyboard seems to be “dead” (Num Light does not turn on) disconnecting/reconnecting the USB plug did not help. Connection a different keyboard did not help either, it is “dead” as well.
Since the mouse light was on, I tried connecting the keyboard to this port but it was also not working.

Tested suspend again after reset and it again did not work, reset, next test, it did wake up, tested again, did wake up - it seems to be totally random at this point (which is an upgrade to before I deactivated Resizable BAR, but still not usable).

Since the keyboard does not work in case of a failed wake up, there seems to be no alternative to a reset.

Are you using Kernel 6.6?
Its only that worse for me if i use 6.6, 6,7, but a bit better with 6.1.
At the meantime i have changed my monitor and video card, and still no change.

Yes, I’m on Kernel 6.6. Will test the other ones again, but with the issue being so random, even waking up successfully multiple times would not give me the confidence to use Suspend.

Is there no way to identify the cause of the issue, to know if something can be done about it or not?

edit:
Tested different kernels (6.7.7-1, 6.6.19-1, 6.1.80-1), but waking up failed eventually with every one. Perhaps hybrid standby could be used so I could keep my session if waking up fails, don’t know.