You are not logged in.

#1 2024-10-30 03:24:05

Bicyforecastle
Member
Registered: 2023-05-19
Posts: 7

[swaywm] Unable to resume from suspend when using swayidle

My system is unable to resume from suspend, and my only current
workaround is to manually reboot using the power button. Having to do this
several times per day is very frustrating. I hope you can help me to
resolve this issue.

I am running Sway + Wayland on an AMD-based system, using the amdgpu
graphics driver and amdvlk for Vulkan. My CPU is a Ryzen 7 7700X and my
GPU is a Radeon R9 390.

The following code snippet demonstrates how I use swayidle:

    # In .config/sway/config:
    exec ~/.local/bin/my_idle_script

    # In my_idle_script:
    swayidle -w \
            timeout 900     'swaylock -f -c 000000' \
            timeout 1000    'swaymsg "output * dpms off" && systemctl suspend' \
            resume          'swaymsg "output * dpms on"' \
            before-sleep    'swaylock -f -c 000000'

When I attempt to wake from suspend, the power LED on my case flickers,
indicating that the machine is registering something. However, my
monitors show no output. I am not able to switch to another TTY session.
I am not able to 'blind login' by entering my password (even multiple
times). I am not able to receive video output after dis/re-connecting my
monitors.

I have perused the output of journalctl -b and journalctl -b -1, and
I have not been able to find any relevant looking output. My computer does
not appear to log anything to the journal between when suspend and the
subsequent manual boot (i.e., nothing gets written to the journal while
I am attempting to wake from suspend).

If it wasn't clear from my config, my overall goal is that:

  • Screen is locked after ~15 minutes;

  • Screen is powered off and system is suspended soon thereafter

  • Screen is powered back on when the system resumes (presumably by me pressing keys on the keyboard)

Thank you for taking the time to read my message, and I truly appreciate
your help.

Offline

#2 2024-10-30 08:09:20

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [swaywm] Unable to resume from suspend when using swayidle

Are sway or swaidle actually relevant to this situation?
Try to boot only the multi-user.target and "systemctl suspend" from there

My computer does not appear to log anything to the journal between when suspend and the subsequent manual boot

because

reboot using the power button

If it works, the https://wiki.archlinux.org/title/Keyboa … el_(SysRq) will help with that (but if the kernel doesn't actually resume, that won't work either)

You could test the behavior w/ the LTS kernel and then there's https://bbs.archlinux.org/viewtopic.php … 4#p2201174 which meanwhile has been shown multiple times to NOT be restricted to "nvidia closed source crap"

Offline

#3 2024-10-30 09:04:54

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 561
Website

Re: [swaywm] Unable to resume from suspend when using swayidle

I seem to be having a similar issue, does it help if you blindly open a terminal and type "swaymsg output '*' power on"?

I don't know if it's related but for me swayidle segfaults a lot.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

Board footer

Powered by FluxBB