Open gregath opened 10 months ago
I have a similar issue with a 165Hz FreeSync monitor: Sentey MS2711
I can reproduce this 100% of the time with:
swaymsg "output * dpms off" && sleep 60 && swaymsg "output * dpms on"
I had to use big timeout of 60 seconds or so, since sleeping for 1 second wasn't enough to reproduce the issue. I think this has to do with the monitor going to "power-save" after a few seconds.
The sway log doesn't show any error.
And, I forgot to mention, a workaround for this issue is to switch back and forth TTYs. In my system the graphical session is on TTY1, so switching to TTY2 and then TTY1 turns the monitor on again.
Here are the debug logs:
(The handling of the dpms off
command is at line 1547).
This is probably video card issue, let me guess you have AMD? and it's using DisplayPort?
This is probably video card issue, let me guess you have AMD? and it's using DisplayPort?
Yes, I have an AMD Radeon RX 5600 connected through DisplayPort.
@itaranto Yeah I've been having issues with my 5700 and Vega laptop, there's many bug reports on the tracker. I think the Display core rewrite they did like a year ago was a mistake, it's been nothing but trouble.
I'm having the same issue on Intel Iris graphics and Apple XDR display. Latest kernel and sway on nixos. Pretty much if I disconnect the display and reconnect, or if it goes to sleep via swayidle and power off, it doesn't come back up. The only way to get the display back working is to kill sway completely, reconnect the screen in a tty, then exec sway. The issue doesn't persist with PopOS in a dual boot which is using GNOME. Not sure where to start with this one: is it kernel params, power management settings that are different with nixos and popos, a bug in sway, something else?
Narrowed it down a bit: installed GNOME side by side on the same kernel, and GNOME handles it correctly under wayland. So it's not any boot or kernel params, seems like wlroots or sway issue.
Are you able to reproduce on Sway+wlroots latest commits?
@emersion yes, with a new issue: can't use the screen anymore in full res. Compiled today with sway and wlroots HEAD.
I've noticed improvements in hot plug behavior, as in the first couple of times the monitor would come back up.
I'll do some more testing on this. Usually this monitor reports DP-3 and DP-4 when plugged in for the first time.
On sway 1.8.1, DP-4 does nothing and I need to swaymsg output DP-4 disable
in order for workspaces not to randomly end up on it. DP-3 behaves like the monitor should, has full 6k resolution and no problems until the laptop locks.
Here's get_outputs output in the broken state ATM on sway HEAD:
$ swaymsg -t get_outputs
Output eDP-1 'Chimei Innolux Corporation 0x1301 Unknown' (focused)
Current mode: 2160x1350 @ 59.744 Hz
Power: on
Position: 1595,1540
Scale factor: 1.250000
Scale filter: linear
Subpixel hinting: unknown
Transform: normal
Workspace: 3
Max render time: off
Adaptive sync: disabled
Available modes:
2160x1350 @ 59.744 Hz
2160x1350 @ 30.005 Hz
Output DP-3 'Apple Computer Inc ProDisplayXDR 0x160F1308'
Current mode: 0x0 @ 0.000 Hz
Power: off
Position: 0,0
Scale factor: 1.000000
Scale filter: nearest
Subpixel hinting: unknown
Transform: normal
Workspace: 5
Max render time: off
Adaptive sync: disabled
Available modes:
6016x3384 @ 60.000 Hz
3840x2160 @ 60.000 Hz
6016x3384 @ 59.940 Hz
6016x3384 @ 50.000 Hz
6016x3384 @ 48.000 Hz
6016x3384 @ 47.952 Hz
5120x2880 @ 60.000 Hz
5120x2880 @ 59.940 Hz
5120x2880 @ 50.000 Hz
5120x2880 @ 48.000 Hz
5120x2880 @ 47.952 Hz
3840x2160 @ 60.000 Hz
3840x2160 @ 59.939 Hz
3840x2160 @ 50.000 Hz
3840x2160 @ 47.952 Hz
3840x2160 @ 47.999 Hz
2560x2880 @ 59.999 Hz
2560x2880 @ 59.939 Hz
2560x2880 @ 50.000 Hz
2560x2880 @ 48.000 Hz
2560x2880 @ 47.951 Hz
2560x1440 @ 59.999 Hz
Tried turning it on with swaymsg output DP-3 enable
, swaymsg output DP-3 power on
but no luck.
I've been having the same issue, sometimes I can reproduce it with swaymsg "output * dpms off" && sleep 60 && swaymsg "output * dpms on"
, sometimes not. I'm on nixos, AMD 7600, sway 1.8.1 and wlroots 0.16.2. It's a desktop machine with only 3840x2160 monitor, connected via HDMI.
When disabling the display via swayidle, ~90% of the time I encounter this problem, 100% of the time if I lock the screen in swayidle too, using swaylock. It looks like the monitor tries to turn on, but it stays black for a short period and turns off again.
The logs looks kinda weird:
When sway receives the power on command:
...
03:39:04.385 [DEBUG] [sway/config/output.c:217] Merging on top of existing output config
03:39:04.385 [DEBUG] [sway/config/output.c:240] Config stored for output * (enabled: -1) (-1x-1@-1.000000Hz position -1,-1 scale -1.000000 subpixel unknown transform -1) (bg /nix/store/4nr159kwwlah87b1vqsabvzb4x2aiivp-wallpaper.png fill) (power 1) (max render time: -1)
03:39:04.385 [DEBUG] [sway/config/output.c:395] Turning on output HDMI-A-1
03:39:04.385 [DEBUG] [sway/config/output.c:408] Set preferred mode
03:39:04.385 [DEBUG] [wlr] [types/output/render.c:229] Attaching empty buffer to output for modeset
03:39:04.385 [DEBUG] [wlr] [types/output/render.c:75] Choosing primary buffer format XR24 (0x34325258) for output 'HDMI-A-1'
03:39:04.385 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer
03:39:04.386 [DEBUG] [wlr] [render/allocator/gbm.c:143] Allocated 3840x2160 GBM buffer with format XR24 (0x34325258), modifier GFX11,GFX9_64K_R_X,DCC,DCC_RETILE,DCC_INDEPENDENT_64B,DCC_INDEPENDENT_128B,DCC_MAX_COMPRESSED_BLOCK=64B,PIPE_XOR_BITS=3 (0x0200000018637B04)
03:39:04.386 [DEBUG] [wlr] [render/gles2/renderer.c:148] Created GL FBO for buffer 3840x2160
03:39:04.386 [DEBUG] [sway/config/output.c:441] Auto-detected output transform: 0
03:39:04.386 [DEBUG] [sway/config/output.c:356] Output DPI: 154.819048x152.400000
03:39:04.386 [DEBUG] [sway/config/output.c:455] Auto-detected output scale: 1.000000
03:39:04.386 [DEBUG] [sway/config/output.c:463] Set HDMI-A-1 adaptive sync to 1
03:39:04.386 [DEBUG] [wlr] [types/output/render.c:229] Attaching empty buffer to output for modeset
03:39:04.386 [DEBUG] [sway/config/output.c:506] Committing output HDMI-A-1
03:39:04.386 [DEBUG] [wlr] [types/output/render.c:229] Attaching empty buffer to output for modeset
03:39:04.386 [INFO] [wlr] [backend/drm/drm.c:586] connector HDMI-A-1: Modesetting with 3840x2160 @ 60.000 Hz
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported maximum keycode 708, clipping.
> X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
03:39:04.422 [DEBUG] [wlr] [types/output/render.c:282] Enabling direct scan-out on output 'HDMI-A-1' (locks: 0)
03:39:04.422 [DEBUG] [wlr] [types/output/cursor.c:43] Enabling hardware cursors on output 'HDMI-A-1' (locks: 0)
03:39:04.422 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2128@0,0
03:39:04.422 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '1' at 0.000000, 0.000000
03:39:04.422 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c10 horizontally
03:39:04.422 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2128@0,0
03:39:04.422 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '2' at 0.000000, 0.000000
03:39:04.422 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c10 horizontally
03:39:04.422 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2128@0,0
03:39:04.422 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '3' at 0.000000, 0.000000
03:39:04.422 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c10 horizontally
03:39:04.422 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2128@0,0
03:39:04.422 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '6' at 0.000000, 0.000000
03:39:04.422 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c10 horizontally
03:39:04.422 [DEBUG] [sway/desktop/transaction.c:398] Transaction 0x25f9d10 committing with 10 instructions
03:39:04.422 [DEBUG] [sway/desktop/transaction.c:294] Applying transaction 0x25f9d10
03:39:04.422 [DEBUG] [sway/input/seat.c:722] Applying input config to 9610:42:SINO_WEALTH_Gaming_KB__Mouse
03:39:04.424 [DEBUG] [sway/input/seat.c:722] Applying input config to 9610:42:SINO_WEALTH_Gaming_KB__Consumer_Control
03:39:04.431 [DEBUG] [sway/input/seat.c:722] Applying input config to 13652:62858:Compx_VXE_NordicMouse_1K_Dongle
03:39:04.434 [DEBUG] [sway/input/seat.c:722] Applying input config to 13652:62858:Compx_VXE_NordicMouse_1K_Dongle_Consumer_Control
03:39:04.441 [DEBUG] [sway/input/seat.c:722] Applying input config to 9639:64017:Nordic_2.4G_Wireless_Receiver_Consumer_Control
03:39:04.443 [DEBUG] [sway/input/libinput.c:208] sway_input_configure_libinput_device('9639:64017:Nordic_2.4G_Wireless_Receiver_Mouse' on '9639:64017:Nordic_2.4G_Wireless_Receiver_Mouse')
03:39:04.443 [DEBUG] [sway/input/seat.c:722] Applying input config to 9639:64017:Nordic_2.4G_Wireless_Receiver_Mouse
03:39:04.454 [DEBUG] [wlr] [xwayland/xwm.c:1549] unhandled X11 event: MappingNotify (34)
03:39:04.454 [DEBUG] [wlr] [xwayland/xwm.c:1549] unhandled X11 event: MappingNotify (34)
03:39:04.455 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer
03:39:04.455 [DEBUG] [wlr] [render/allocator/gbm.c:143] Allocated 3840x2160 GBM buffer with format XR24 (0x34325258), modifier GFX11,GFX9_64K_R_X,DCC,DCC_RETILE,DCC_INDEPENDENT_64B,DCC_INDEPENDENT_128B,DCC_MAX_COMPRESSED_BLOCK=64B,PIPE_XOR_BITS=3 (0x0200000018637B04)
03:39:04.455 [DEBUG] [wlr] [render/gles2/renderer.c:148] Created GL FBO for buffer 3840x2160
03:39:04.455 [DEBUG] [wlr] [render/swapchain.c:105] Allocating new swapchain buffer
03:39:04.455 [DEBUG] [wlr] [render/allocator/gbm.c:143] Allocated 3840x2160 GBM buffer with format XR24 (0x34325258), modifier GFX11,GFX9_64K_R_X,DCC,DCC_RETILE,DCC_INDEPENDENT_64B,DCC_INDEPENDENT_128B,DCC_MAX_COMPRESSED_BLOCK=64B,PIPE_XOR_BITS=3 (0x0200000018637B04)
03:39:04.455 [DEBUG] [wlr] [render/gles2/renderer.c:148] Created GL FBO for buffer 3840x2160
03:39:04.455 [INFO] [sway/ipc-server.c:558] IPC Client 65 disconnected
03:39:04.456 [DEBUG] [wlr] [types/output/render.c:282] Disabling direct scan-out on output 'HDMI-A-1' (locks: 1)
03:39:04.456 [DEBUG] [wlr] [types/output/cursor.c:43] Disabling hardware cursors on output 'HDMI-A-1' (locks: 1)
03:39:04.461 [DEBUG] [wlr] [types/output/render.c:282] Enabling direct scan-out on output 'HDMI-A-1' (locks: 0)
03:39:04.461 [DEBUG] [wlr] [types/output/cursor.c:43] Enabling hardware cursors on output 'HDMI-A-1' (locks: 0)
03:39:04.472 [DEBUG] [wlr] [types/output/render.c:282] Disabling direct scan-out on output 'HDMI-A-1' (locks: 1)
03:39:04.472 [DEBUG] [wlr] [types/output/cursor.c:43] Disabling hardware cursors on output 'HDMI-A-1' (locks: 1)
03:39:04.478 [DEBUG] [wlr] [types/output/render.c:282] Enabling direct scan-out on output 'HDMI-A-1' (locks: 0)
03:39:04.478 [DEBUG] [wlr] [types/output/cursor.c:43] Enabling hardware cursors on output 'HDMI-A-1' (locks: 0)
03:39:04.489 [DEBUG] [wlr] [types/output/render.c:282] Disabling direct scan-out on output 'HDMI-A-1' (locks: 1)
03:39:04.489 [DEBUG] [wlr] [types/output/cursor.c:43] Disabling hardware cursors on output 'HDMI-A-1' (locks: 1)
...
For some reason, the display is disables right after:
...
03:39:04.607 [DEBUG] [wlr] [backend/session/session.c:181] udev event for card0 (change)
03:39:04.607 [DEBUG] [wlr] [backend/session/session.c:210] DRM device card0 changed
03:39:04.607 [DEBUG] [wlr] [backend/drm/backend.c:155] Received hotplug event for /dev/dri/card0
03:39:04.607 [INFO] [wlr] [backend/drm/drm.c:1335] Scanning DRM connector 89 on /dev/dri/card0
03:39:04.607 [INFO] [wlr] [backend/drm/drm.c:1419] 'HDMI-A-1' disconnected
03:39:04.607 [DEBUG] [sway/tree/output.c:264] Disabling output 'HDMI-A-1'
03:39:04.607 [DEBUG] [sway/desktop/layer_shell.c:347] Layer surface destroyed (wallpaper)
03:39:04.607 [DEBUG] [sway/desktop/layer_shell.c:347] Layer surface destroyed (panel)
03:39:04.607 [DEBUG] [sway/desktop/layer_shell.c:195] Usable area changed, rearranging output
03:39:04.607 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2160@0,0
03:39:04.607 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '1' at 0.000000, 0.000000
03:39:04.607 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c40 horizontally
03:39:04.607 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2160@0,0
03:39:04.607 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '2' at 0.000000, 0.000000
03:39:04.607 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c40 horizontally
03:39:04.607 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2160@0,0
03:39:04.607 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '3' at 0.000000, 0.000000
03:39:04.607 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c40 horizontally
03:39:04.607 [DEBUG] [sway/tree/arrange.c:263] Usable area for ws: 3840x2160@0,0
03:39:04.607 [DEBUG] [sway/tree/arrange.c:293] Arranging workspace '6' at 0.000000, 0.000000
03:39:04.607 [DEBUG] [sway/tree/arrange.c:77] Arranging 0x7ffc19472c40 horizontally
03:39:04.607 [DEBUG] [sway/desktop/transaction.c:398]
[sway.log.txt](https://github.com/swaywm/sway/files/15096640/sway.log.txt)
Transaction 0x258f640 committing with 10 instructions
03:39:04.607 [DEBUG] [sway/desktop/layer_shell.c:347] Layer surface destroyed (notifications)
...
Heres the full log, its kinda noisy:
Sway Version:
Debug Log: https://gist.github.com/gregath/84f6f187bf790d969e441e77bb94b987
Configuration File: https://gist.github.com/gregath/84f6f187bf790d969e441e77bb94b987
Description: Power off monitor and power it back on and the screen will be blank. It happens when changing inputs on the monitor as well, but not when turning dpms off for 5 seconds.