sway: Screen won't turn on after resume from sleep
- Sway Version:
$ swaymsg -t get_version
sway version 1.8-dev-9400bd96 (Oct 19 2022, branch 'master')
I am using sway-git along with wlroots-hidpi-xprop-git, which builds the wlroots master branch with a hidpi scaling patch for xwayland (see pull request). My current wlroots build is based on c6d8a11.
-
Debug Log:
-
Debug logs zipped. Sorry, but I could not manage to upload the original unzipped file (72 MB) to GitHub Gist.
-
Configuration File:
- Since the issue is random, I cannot just willingly reproduce it. The above debug logs were produced with my actual configuration.
-
Description:
Sometimes after my laptop resumes from sleep, the screen just won’t turn back on. Most of the time it works, but sometimes it doesn’t, and in those cases the only option is for me to restart my computer.
Below are the steps that I followed that correspond to my attached debug logs:
- I spent a lot of time working (this includes me using a Dell thunderbolt dock, an external screen, and external USB devices as well)
- I disconnected my dock and all USB devices and put my laptop to sleep
- Opened it - this time it worked
- Spent another hour working, after which I put my laptop to sleep (not sure if manually or by just closing the lid)
- Opened it back again several minutes later, and the screen didn’t want to turn back on
- I switched to a VT (the screen turned on for this), logged in, and restarted the machine.
When the issue happens, switching to some VT and back again to VT1 with sway does not solve the issue. The screen turns on for the VT, but then turns off again when switching to Sway.
I am running Arch Linux with recent updates. I am using a 12th generation Intel Alder Lake CPU (i9-12900HK) and I am using the integrated Intel GPU.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 11
- Comments: 19 (5 by maintainers)
I sometimes have a similar issue, and a workaround for me is to run
swaymsg output eDP-1 disable; swaymsg output eDP-1 enable(I have a keybind for it since it happens quite often recently).A few times my system has woken up from sleep but the screen won’t turn on. Unlike op, I cannot switch to another tty (nothing happens when I press the key combination). I also have in my settings:
But pressing the power key does nothing. I’m not entirely sure if it’s just the screen that remains off, or if sway has frozen completely.
I’m seeing this on sway
1.8.1and wlroots0.16.2.For the sake of people coming in from google, I’m currently fixing it by swapping to another tty and running the following and then quickly switching back to tty1:
I do also have the
bindswitch lid:on/offsection in my config, though, so I’ll remove that and make a new issue if it persists.I figured out that this issue is related to the following lines in my sway config, and commenting them out mitigates the issue:
Where
eDP-1is (usually) my laptop’s built-in screen.Since I removed this, I entered sleep by closing the laptop’s lid many times and did not have the issue. However, this is obviously not ideal since I won’t be able to close the lid of the laptop and have the laptops screen turn off when docked. I guess I could resolve the issue with some kind of advanced scripting, but still, I believe the above should work as it did on my previous laptop (with 9th gen Intel GPU).
Is there something that I could do to gather further logs from when reproducing this issue? Would recent debug (or trace?) logs help, with the default sway configuration (with the above lines added)?