You are not logged in.

#1 2025-01-23 16:36:48

zolland
Member
Registered: 2025-01-22
Posts: 9

Looking for some help debugging suspend issues

Hello! I am trying to get suspend working on my desktop PC. I have a feeling this is going to be really annoying to investigate, so I just wanted to post here with as much info as possible to see if anyone could point me in the right direction without sinking too much time into it. I've read through the [Suspend and Hibernate](https://wiki.archlinux.org/title/Power_ … _hibernate) wiki page but nothing seemed to help. I'm not really familiar with how suspend works so I am having a hard time debugging this.

Symptoms

When putting the system into suspend (s2idle or deep, but preferring s2idle for now), it becomes unresponsive.

Hardware

Motherboard: Gigabyte Z490 VISION D
CPU: Intel i9-10850K
GPU: Radeon RX 7700 XT
Display output: Thunderbolt Passthrough, which requires a DP cable going from motherboard to graphics card. I then plug in a thunderbolt 4 hub which goes to my monitor.
- I don't think this is relevant since the issue is reproducible when I only have an ethernet cable plugged in.

Bios Software

I don't know what settings are relevant here but...

Platform Power Management: Enabled
Linux Software

Display Manager: sddm

$ pacman -Qi sddm
...
Version         : 0.21.0-6
...

Desktop Env: KDE Plasma (wayland)

$ plasmashell --version
plasmashell 6.2.5

$ pacman -Qi wayland
...
Version         : 1.23.1-1
...

Suspend settings:

$ cat /sys/power/mem_sleep
[s2idle] deep
Dmesg output

Is there anywhere I can upload logs? They are pretty huge, don't want to just paste them here.

Last edited by zolland (2025-01-23 16:39:26)

Offline

#2 2025-01-23 18:03:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,096

Re: Looking for some help debugging suspend issues

https://wiki.archlinux.org/title/List_o … n_services -- for how to paste logs and outputs.

Offline

#3 2025-01-28 02:30:14

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

Thank you! Finally got a chance to get the logs. I ran the following command to start capturing logs.

$ sudo dmesg > dmesg_suspend.log &

I then ran this to suspend:

systemctl suspend

https://0x0.st/88r7.txt

Last edited by zolland (2025-01-28 02:31:17)

Offline

#4 2025-01-30 02:27:29

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

Huge progress!!

At the same time as my suspend issues, I have also been having issues with my computer screen going black and not responding to IO, while still being accessible through other channels such as ssh. I often boot up my computer without a display plugged in, then plug one in later via a KVM or thunderbolt. In this scenario I would not be able to access the computer without switching to tty (ctrl-alt-f3) and restarting the display manager (sddm).

I fixed this with the following change to /etc/mkinitcpio.conf

MODULES=(btrfs amdgpu)

This apparently fixed one of my suspend issues! My computer must have been going into a half suspended state, and when waking up it was just struggling with display driver issues. I had suspected display issues, and was actually always able to get in via ssh after it seemingly woke up, but wasn't quite able to get much info with searches revolving around suspend.

So now I can suspend and wake semi-successfully, but the issue now is that it doesn't seem like my computer is fully suspended. The fans stay on, I can hear some of my HDDs spin down but some remain on and I can hear them clicking away. They are a ZFS pool of 4 drives, 2 sata and 2 sas. Going to keep looking into this and will report back here.

Last edited by zolland (2025-01-30 02:27:42)

Offline

#5 2025-01-30 04:04:06

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

I guess I jumped the gun. I was doing more messing around to try getting suspend to work, attempted to revert back to this state that I thought was working, and it isnt... can't get my display to work after boot either. classic.

Offline

#6 2025-01-30 04:36:41

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

I think I have it back to the improved state I described above... it seems to have had more to do with the sddm config I have here in /etc/sddm.conf.d/display.conf than anything else

[Wayland]
EnableHidpi=true
EnableOutputAutoDetect=true

At some point I had changed it to EnableHiDPI because that is how it is in the default, but it seems to only work with the camel case in the code block...super weird. I tried removing the DPI line, removing the config entirely, but it only works in this state.

I removed amdgpu from the mkinitcpio.conf as well and it is still detecting the display when it is plugged in after boot and it is also still waking from suspend better.

MODULES=(btrfs)

And this is my boot loader entry with the kernel params removed

options root=PARTUUID=30b7c3a8-6e2d-44fd-b5b8-862a9257d0ca zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs mem_sleep_default=deep

That really seems to have been a sddm issue.

Regarding suspend, I have no idea whats happning. Still sometimes seems to break down and I can't figure out why. Never reaches a full suspend

Last edited by zolland (2025-01-30 05:06:18)

Offline

#7 2025-01-30 05:47:06

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

Interesting development... The following successfully suspends the computer and i can wake it up perfectly.

sudo sh -c "echo mem> /sys/power/state"

but attempting to suspend from plasma or from systemctl causes issues

systemctl suspend

Last edited by zolland (2025-01-30 05:51:21)

Offline

#8 2025-01-30 06:22:24

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

I think I got it... I did some searching/chatting and read the man page for systemd-sleep to see what it is up to, realizing that if the kernel interface works flawlessly the issue must be at a higher level.
https://man.archlinux.org/man/systemd-sleep.8

I then realized at some point I had written an override in /etc/systemd/sleep.conf.d/mem-deep.conf that was telling it to use s2idle. Should have checked the file metadata before updating... I don't think I've ever actually seen this PC fully suspend until I used the kernel interface earlier so I don't know, maybe I put this in here by accident ages ago or something. I updated the config to use deep and to send mem to /sys/power/state
https://man.archlinux.org/man/systemd-sleep.conf.5.en

# /etc/systemd/sleep.conf.d/mem-deep.conf
[Sleep]
MemorySleepMode=deep
SuspendState=mem

Suspend is now working from sysctl as well as from the plasma gui cool

In further testing I removed the file completely and suspend still works. Seems like s2idle is broken but I don't really care about that. Maybe my system was defaulting to s2idle, I added the file in some attempt at changing it, then moved on to changing the kernel parameter and forgot the file was there.

Still have no idea what is going on with the display stuff in sddm though...

Offline

#9 2025-02-07 04:09:35

zolland
Member
Registered: 2025-01-22
Posts: 9

Re: Looking for some help debugging suspend issues

I reverted back to my thunderbolt setup and the suspend issues returned.

In a wild turn of events the solution is to plug the computer into the monitor, and then plug my thunderbolt hub into the monitor. Before I was plugging the computer into the hub and then the monitor into the hub.

No idea why this works but it does.

There's still some issues like being weird about detecting displays if one is only plugged in after boot, and I just had it go into a weird mode where the display would flash on and off until I rebooted, but it works a lot better like this than it ever did before over thundrbolt.

Last edited by zolland (2025-02-07 04:20:02)

Offline

Board footer

Powered by FluxBB