-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
One monitor won't wake up after swayidle #5759
Comments
Potentially https://gitlab.freedesktop.org/drm/amd/-/issues/1368 I've been trying to find a way to debug this, specifically to get timestamps of when it happens so I can correlate drm logs with sway logs. |
I'm having what might be the same issue on and off with a Dell Precision 5550 (Intel GPU) with an external monitor |
Here we go:
And my config has:
I wonder if it's a timing issue or race between enabling the output and turning on DPMS? |
I managed to simplify how to reproduce this bug with what @LaserEyess suggested in this thread: https://gitlab.freedesktop.org/drm/amd/-/issues/1376
It will not happen every time I run these commands but every second or third time. One session when I tried these commands, the first time both monitors came back. Second time only the left (DP-2), I toggled the right (DP-1) off and on using this mode in my configuration:
It came back, no issue with the resolution. No errors in The third time I tried, the same monitor didn't come back. Did the same toggle and it came back but with a resolution of 640x480. When physically turning the monitor off and back on it just showed a black screen. Did the sway toggle again and it came back with it's native resolution. This time I don't see any errors in my sway log about this. Here are some snippets from my log after the third run:
Then when I've toggled the monitor off and on
Then after I physically toggled the monitor off and on
I do see a bunch of these errors:
|
Sure sounds like a driver bug. |
I am too experiencing the same issue, my laptop screen does not turn back on after the screen turns off with swayidle. I |
FWIW: I have experienced the same(?) issue using swayidle (1.6) and swaylock (1.5) on sway (1.5.1) on two separate machines (one intel/nvidia based laptop, one amdgpu based desktop) using a dual monitor setup (the same monitors in both setups). One of the monitors ( I have switched to waylock about two weeks ago and I have not experienced this behavior since. My config currently includes:
With swaylock it used to include:
This can of course also be a red herring, but so far the above setup has been stable for my hardware setup. |
@dvzrv I tested your waylock configuration and sadly it is still happening to me. Power cycling the sleeping monitor brings it back, but sometimes I need to turn it off and on again with sway to get the correct resolution back. |
I'm experiencing this issue on my 5700XT and on my Intel 10th gen laptop. This issue only affects my HDMI connected monitor on both setups (Displayport + HDMI connections) I usually just reload the config or re-enable the monitor in wdisplays to fix this issue |
Just for reference for people being annoyed by this bug as I was, this module parameter worked around it for me: |
Just to give a brief update, it's still happening to me with |
Repro steps:
A dpms toggle doesn't turn it back on either, eg:
The DP-2 will start fine on wake if the laptop was suspended in the docking station:
Logs here:WLR_DRM_NO_MODIFIERS=1 sway -d > sway.log 2>&1t430 :: ~ % sway --version sway version 1.6-c9060bcc (Aug 15 2021, branch 'master')wlroots-git is at commit https://github.com/swaywm/wlroots/commit/3364eec07e91eb51f770f2f7d619a07d96c0b5c4 Most relevant part:00:04:55.798 [INFO] [sway/commands.c:257] Handling command 'output DP-2 pos 1366 0 res 2560x1440' 00:04:55.798 [DEBUG] [sway/commands.c:428] Subcommand: pos 1366 0 res 2560x1440 00:04:55.798 [DEBUG] [sway/commands.c:428] Subcommand: res 2560x1440 00:04:55.798 [DEBUG] [sway/config/output.c:204] Merging on top of existing output config 00:04:55.798 [DEBUG] [sway/config/output.c:227] Config stored for output DP-2 (enabled: -1) (2560x1440@59.951000Hz position 1366,0 scale -1.000000 subpixel unknown trans form -1) (bg #3f3f3f solid_color) (dpms 1) (max render time: -1) 00:04:55.798 [DEBUG] [sway/config/output.c:351] Turning on output DP-2 00:04:55.798 [DEBUG] [sway/config/output.c:355] Set DP-2 mode to 2560x1440 (59.951000 Hz) 00:04:55.798 [DEBUG] [sway/config/output.c:269] Assigning configured mode to DP-2 00:04:55.798 [DEBUG] [sway/config/output.c:329] Output DPI: 69.174468x69.011321 00:04:55.798 [DEBUG] [sway/config/output.c:400] Auto-detected output scale: 1.000000 00:04:55.798 [DEBUG] [sway/config/output.c:430] Committing output DP-2 00:04:55.798 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-2: Can't enable an output without a buffer 00:04:55.798 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset 00:04:55.798 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer 00:04:55.805 [DEBUG] [wlr] [render/gbm_allocator.c:127] Allocated 2560x1440 GBM buffer (format 0x34325258, modifier 0xFFFFFFFFFFFFFF) 00:04:55.805 [DEBUG] [wlr] [render/gles2/renderer.c:142] Created GL FBO for buffer 2560x1440 00:04:55.805 [DEBUG] [wlr] [backend/drm/atomic.c:35] connector DP-2: Atomic test failed (modeset): Invalid argument 00:04:55.806 [ERROR] [sway/config/output.c:435] Failed to commit output DP-2 Full logs: https://gist.github.com/3nuc/6c9112485258b0dab36ce2a67e0594dc |
@3nuc I'm experiencing the same issue. I've just resorted to just sleep instead of just powering off my monitors to save on some electricity 😄🌳 |
Oh, I think this is caused by having a custom output mode. I had Possibly related to Here are similar old WLC issues but since wlroots exist now they don't matter that much: |
I'm also experiencing the same issue. sway version 1.6.1 sway log:
There are no related messages in
|
I'm not sure whether to just add here, or to file my own bug. I've got the same problem described, but this happens on two different machines, plugged into two different sets of monitors. The first is a laptop with an intel CPU/GPU plugged into two lenovo thinkvision monitors, and the second is a desktop with an AMD CPU and Nvidia GPU (running GBM) plugged into a TCL TV. Given that this is two different machines with two different brands of graphics cards, it's hard to simply call this a driver problem. For the desktop, the log line I see is:
All I have to do to trigger it is change inputs on the TV/monitor and then come back. My workaround is to change virtual terminals to the one where gdm is running, which brings the monitor back to live, and then back to the sway vt. Tomorrow or tuesday, when I have the laptop connected, I'll add the log lines for that as well. |
This the same workaround I use with my Dell P2715Q |
I've had a chance to test on the laptop with an intel cpu and gpu. I'm in a state right now where one of the outputs won't come on, and this is what I see in the log when I try
|
Did this workaround stop working for anyone else with the recent sway 1.7 and wlroots 0.15 releases? On 1.6 I was doing CTRL+ALT+F2 to switch to the non-sway tty (it wasn't running gdm, it's just the default login tty) then switch back with CTRL+ALT+F1 and the external monitor would work |
I have the same issue on 1.7. Only one of my monitors will turn back on. Does this work for amd and intel GPUs? |
Here I said that this is caused by setting a non-default mode, but today I realized that this is related to #6711 (comment) The solution for me was to go to an even lower resolution mode - 1920x1080. Now that is pretty crowded, so I change the scaling. This is not a great solution, but it's a lot better than having the monitor not turn on at all. I'm on sway 1.7 and wlroots 0.15.1. All environment vars are disabled, so WLR_DRM_NO_ATOMIC and WLR_DRM_NO_MODIFIERS are not present in /etc/environment
|
I have the same (or similar) problem with sway 1.7 and one external monitor connected to an X200 (Intel GMA X4500MHD), where the external monitor and the laptop screen would not wake up after swaylock and DPMS off/on. In my case, the laptop lid is closed all the time during normal usage. My config:
My current workaround (to bring both monitors back online):
|
I have a similar issue with a Notebook which has an Intel CPU. My screens (3) are connected to a Dell docking station. Left and Right function properly, connected via DP but the HDMI screen in the middle is black after the first time I disabled dpms. I do not get it back on and if I connect it directly to the HDMI port it works but then one of the other screens stays off. May case was solved through #5008 by swaywm/wlroots#1877 |
I am having the same issue. screen won't wakeup after swaylocked and dpms off. I have to reboot it. |
@akhiljalagam does your monitor wakes up after running |
@Iss-in yes. this is what worked for me with waylock. (sleep only when locked)
|
@akhiljalagam can you pls explain it a bit more, you are using this script to lock sway session manually , right ? edit: turns out to be an issue in nouveau driver which was solved after adding |
this is my config for auto suspend. this is working too. (but iam not using this now)
the problem is that if i lock manually using this -> #5759 (comment) with swaylock then screen is not waking up. i replaced it with waylock and it worked. |
Similar issue happens on just one of my MDP display when i turn it off physically. Sometimes, rarely, it won't wake up after turning it on. Basically only full reboot helps. Never had no issues with |
I use "suspend" instead of dpms off: |
Could the people affected please check:
It didn't solve this problem for me (this is a long time issue for me), but I use an old-school non-usb-c dock. I noticed my monitor firmware version (in the built-in overlay monitor menu) is M2103, but then I went to Dell's page for my 4317Q model and there was a M2104 version whose changelog says "fix issue with wake-up with USB-C docks" so I was hopeful, but as I said, it didn't work. Please react with thumbs down to this comment if either your firmware is the newest possible and this issue is still happening, or if you updated from old FW (where it didn't work) to newest, and the issue persists |
Relevant DRM/AMD (kernel driver) bug for the people still subscribed to this issue: https://gitlab.freedesktop.org/drm/amd/-/issues/1376 Please react to this comment with a thumbs up if you are experiencing this bug on AMD hardware or a thumbs down if you are experiencing it on non-AMD hardware |
Not sure is it related there, but sometimes I can't get one of my displays wake up after i turn it off in the middle of work. |
I've noticed that after upgrading to sway 1.8 & wlroots 0.16.0 this issue occurs every time the monitor goes to sleep, regardless of the delay between Please react with a thumbs up if you experience this change in behavior after upgrading to sway 1.8 and/or wlroots 0.16.0 or a thumbs down if you have both sway 1.8 and wlroots 0.16.0 and you are not seeing this change in behavior |
so far it looks like the sound is not broken, just the enumeration of HDMI outputs changes. Here is also a discussion about it. |
The amdgpu / mesa bug is a thing and very annoying but this bug massively predates it and is present on Intel and Nvidia as well. |
I had noticed that display turns on after a while. Like... 3-5 minutes. SOMETIMES |
I experienced this same problem with current master branch version of sway (90c2d63). The problem started occurring after I updated my (archlinux) AUR sway-git package. The fix for me was to build and install sway from 1.8 release branch combined with wlroots release 0.16.2. Simplest repro: $ swaymsg "output * dpms off" && sleep 1 && swaymsg "output * dpms on" With the newest version I got this error in sway log:
The machine is Lenovo Thinkpad X1C Gen 7, Intel Whiskey Lake, UHD 620 iGPU using "i915" kernel driver. I tested with kernels 6.2 (6.2.6-arch1-1) and 6.1 (arch "linux-lts"). Interestingly this is different from @RunningDroid 's issue, since they experienced problems with sway version 1.8 while for me going from 1.9=>1.8 fixed the issue. When I have some free time I might try bisecting this further. |
@ahartik, if you cannot reproduce with latest release, then it's a different bug. Please open a separate issue with full debug logs. |
Hi chaps, until there is an actual solution, I got a perfectly working (for me) workaround ( Debian 11 bullseye / Kernel: 6.1.0-0.deb11.5-amd64) : In your sway config: And the sway-resume.sh contains: #!/usr/bin/env bash
sway_tty=$(ps aux | grep '[0-9] sway$' | tr ' ' '\n' | grep tty | head -n 1 | xargs | sed 's/tty//g')
other_tty=$(ps aux | grep -v tty$sway_tty | grep '^root.* tty' | tr ' ' '\n' | grep ^tty | sort | uniq | head -n 1 | xargs | sed 's/tty//g')
swaymsg "output * dpms on"
if [ ! -z "$sway_tty" ]; then
if [ -z "$other_tty" ]; then
other_tty=$(($sway_tty+1))
fi
#echo $other_tty
#echo $sway_tty
sudo chvt $other_tty && sleep 2
sudo chvt $sway_tty
fi
swaymsg "output * dpms on"
swaymsg "reload"
If for your system the sway_tty number is known, you can replace the logic in the script with static assignments. Don't forget to visudo and make the use of 'chvt' not requiring a passwd for your user (or sudoers group): |
Running ubuntu lunar 13.10 and sway 1.7, had this issue. Installed sway 1.8.1 and swayidle 1.8.0 to see if the problems were resolved, but this bug is still there. When I resume from The following set of commands reliably restores both of my displays displays to their pre-idle states:
I put those commands in a script and run something like Thanks @dimosped for the inspiration. |
I'm experiencing a similar issue but in my case it's not a laptop but a desktop with only one monitor. I can reproduce it 100% of the time by running:
I didn't know where to post the debug logs since I'm not sure it's the same issue or not. I posted my results here. |
Some time ago in Bios I changed SOME CPU related setting which I don't remember which one it was exactly. Since then (6+ months) I never encountered this monitor thing anymore. Same GPU. Same configs. Same everything. |
I doubt this could be a BIOS config issue, since I have Windows installed in this system too and resuming from DPMS works fine there. |
Sorry, I didn't meant my comment as response to @itaranto. I just got notified and decided to leave this breadcrumb. I see such issue mentioned there and there in the WEB, but no clear answer to it. Might be some Kernel thing. Not an expert. But what I said above definitely influenced the behavior of my system. I will try to explore it on my next reinstall. |
Still seeing this in sway 1.9. Is this possibly a race where sway is reacting to the first event for the outputs coming back, but the others may or may not get coalesced depending on scheduler timing? |
sway version
sway version v1.5
log
log
Note the log is quite big as sway was running for a few hours before it happened.
config
config
Description
Using a dual monitor setup and about 1 in 10 times one of the monitors wont wake up after swayidle have put them to sleep. Which monitor that fails to wake up varies. After I've unlocked the swaylock screen it usually comes back but will blink every 10s or so. This time it didn't come back after unlock. I have a mode in my config:
That allows me to toggle each monitor off and on. And toggling the monitor that failed to wake up off and on will fix the issue.
It's really hard to reproduce, only seem to happen after swayidle have put them to sleep. I have had no issue toggling a monitor off and on manually using the mode above.
Thanks
The text was updated successfully, but these errors were encountered: