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

All applications are frozen after turning on the display with DPMS #73

Open
nostdm opened this issue Jun 21, 2020 · 8 comments
Open

All applications are frozen after turning on the display with DPMS #73

nostdm opened this issue Jun 21, 2020 · 8 comments

Comments

@nostdm
Copy link

nostdm commented Jun 21, 2020

I have the following desktop setup:

  • 3 x 4k monitors (DP1 DP2 DP3)
  • AMD ATI Radeon RX 5700 XT GPU
  • sway version 1.4-eeb90a79 (Jun 21 2020, branch 'master')
  • mesa driver version 20.1.1

I have set up swayidle to turn off my displays with the following command:

exec swayidle -w \
timeout 900 'swaylock -f -c 000000' \
timeout 900 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'

Whenever the outputs get turned off by swayidle after 900 seconds and then subsequently turned on with the dpms on command when I perform an action (e.g. press a key on the keyboard) all previously opened applications become frozen (terminal, browser etc.) and cannot be interacted with or even closed (although new applications can still be launched) - In which case I usually have to kill sway and restart it. This might be an issue with my GPU as it's quite a new model (although the latest mesa drivers seem to support this card). Or this could be something to do with the compositor itself. Can someone recommend how to best debug this issue and has anyone experienced a similar problem?

P.S. This issue doesn't happen 100% of the time, it sometimes happens, sometimes it doesn't - it's quite random.

Also, system suspend works correctly and doesn't have the same issue.

@ggreer
Copy link

ggreer commented Jul 20, 2020

I've had this same behavior with an external monitor on my X1 Carbon 7th gen. I'm on Arch and I keep things pretty up-to-date. The output of sway --version is sway version 1.5-36c3c222 (Jul 20 2020, branch 'master'). Here's my swayidle exec command:

exec swayidle -w \
    timeout 295 'swaymsg "output * dpms off"' \
       resume 'swaymsg "output * dpms on"' \
    timeout 300 'lock-screen' \
       resume 'swaymsg "output * dpms on"' \
    before-sleep 'lock-screen'

Oh and the output of uname -a is Linux iron 5.7.9-arch1-1 #1 SMP PREEMPT Thu, 16 Jul 2020 19:34:49 +0000 x86_64 GNU/Linux.

Let me know if there is any more info I can provide that is helpful.

@nostdm
Copy link
Author

nostdm commented Jul 21, 2020

The issue has disappeared for me recently but I'm not sure why. I would assume it has more to do with sway and wlroots as swayidle only sends a message to the compositor to run the DPMS command.

My current setup:

wlroots version: 0.11.0.r0.g751a21d9
sway version: 1.5-ab8ded62 (Jul 19 2020, branch 'master')
swayidle version: 1.6.r10.g04a176e
sway config:

exec swayidle -w \
timeout 900 'swaylock -f -c 000000' \
timeout 900 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'

It correctly puts my 3 displays into power saving mode and then wakes them up when I move the mouse or press a key on the keyboard.

Update: Actually it happened again to me today - quite randomly. It worked for ~2 weeks without problems and today when I woke up the monitors all applications were frozen again (had to restart sway).

@hassec
Copy link

hassec commented Jan 18, 2022

For what it's worth, I've also been running into this.
For now running without swayidle/swaylock to avoid this problem.

I've also found swaywm/swaylock#217 and swaywm/swaylock#86 which all sound pretty similar...

@emersion if it would be useful, I'd be happy to try and produce some more debug info for this but am not sure what logs etc. would be helpful to figure this out.

@emersion
Copy link
Member

Please provide Sway debug logs + dmesg

@hassec
Copy link

hassec commented Jan 18, 2022

@emersion thanks for the quick reply, I've managed to get my system stuck so attaching the logs for journalctl -b and dmesg -T
journalctl.log
dmesg.log

The locking happened at 16:44:13 and the dpms off command was issued at 16:44:43, a bit after I try to unlock, notice it's stuck and then at 16:45:26 drop to the tty4 to get the logs and then reboot.

Let me know if you need more or if I can be of help in any other way :)

EDIT: looking into the log a bit too and noticed that similar errors are also reported in swaywm/sway#6017

@emvidi
Copy link

emvidi commented Jan 31, 2022

Hi there, in my case I get segfault with electron based apps. I am attaching journalctl and dmesg logs:
journalctl.log
dmesg.log

Also sway.log but does not contain anything related to the crashes:
sway.log

uname -a:
Linux al.emvidi.eu 5.15.18-1-lts #1 SMP Sat, 29 Jan 2022 12:13:13 +0000 x86_64 GNU/Linux

@hassec
Copy link

hassec commented Mar 11, 2022

@emersion did you have any time yet to look into these logs?

@dtk9289
Copy link

dtk9289 commented Oct 5, 2022

i'm also have this problem

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

No branches or pull requests

6 participants