sway icon indicating copy to clipboard operation
sway copied to clipboard

DP/HDMI Monitors do not resume from Power Off state.

Open iDigitalFlame opened this issue 7 months ago • 5 comments

Background:

I used SwayFx and after the upgrade from 0.3.2 to 0.4, two of my displays (out of three, 1 HDMI, 1 DP, 1 VGA), the DP and HDMI, would not return after a swaymsg "output * power off" command. Only the VGA display would come back up (as well as the built-in display, but that's disabled 99% of the time).

Debugging this issue, I uninstalled SwayFx and installed Sway, and with Sway 1.9 the issue exists and does NOT exist in 1.8 (which makes sense, SwayFX 0.32 is 1.8 and 0.4 is 1.9).

Reverting to the older version (1.8) solves the issue completely, but once on 1.9 it happens 100% of the time when the displays are powered off.

I've tried every display config (one off, two off, each display at a time) with the same results. In order to get the displays to work, I have to disable and re-enable all the displays using a command like the one below. (Which honestly does not work 100% of the time either).

swaymsg "output 'Microstep MSI MP243X PB5H403A00291' enable pos 0 0 res --custom 1920x1080@30Hz" # DP
swaymsg "output 'Microstep MSI MP243X PB5H403A00098' enable pos 1920 0 res --custom 1920x1080@30Hz" # HDMI
swaymsg "output 'LG Electronics LG FULL HD 208NTHM8S705' enable pos 3840 0 res --custom 1920x1080@60Hz" # VGA

(I'm using custom resolutions as the docking station I use won't allow two monitors over 30Hz, it's weird, that's a hardware not a sway issue tho, and worked fine in 1.8 anyway)

Doing some debugging myself and parsing through the log files, I noticed these snippets that may help in figuring out what's going on.

DP-6 is the VGA, DP-4 is the DP and DP-5 is the HDMI.

[..snip..]
Swapchain for output 'DP-5' failed test # I see this alot in the logs.
[..snip..]
00:00:19.374 [DEBUG] [wlr] [backend/drm/drm.c:652] connector DP-5: Can't enable an output without a mode
00:00:19.374 [ERROR] [wlr] [types/output/swapchain.c:109] Swapchain for output 'DP-5' failed test
[..snip..]
00:00:19.379 [DEBUG] [wlr] [backend/drm/drm.c:652] connector DP-4: Can't enable an output without a mode
00:00:19.379 [DEBUG] [wlr] [types/output/swapchain.c:98] Output test failed on 'DP-4', retrying without modifiers
00:00:19.379 [DEBUG] [wlr] [types/output/swapchain.c:27] Choosing primary buffer format XR24 (0x34325258) for output 'DP-4'
00:00:19.379 [DEBUG] [wlr] [types/output/swapchain.c:107] Testing modifier-less swapchain for output 'DP-4'
00:00:19.379 [DEBUG] [wlr] [render/swapchain.c:106] Allocating new swapchain buffer
00:00:19.380 [DEBUG] [wlr] [render/allocator/gbm.c:145] Allocated 1920x1080 GBM buffer with format XR24 (0x34325258), modifier INVALID (0x00FFFFFFFFFFFFFF)
00:00:19.380 [DEBUG] [wlr] [backend/drm/drm.c:652] connector DP-4: Can't enable an output without a mode
00:00:19.380 [ERROR] [wlr] [types/output/swapchain.c:109] Swapchain for output 'DP-4' failed test

Also went through the issues list to see if anyone else had something similar. Tried the fix WLR_DRM_NO_MODIFIERS=1, and installed wlroots-git but no luck.

Links to Gists of the logs (sway -d/dmesg -w) below and my config also.

Thanks in advance for the help and thanks for making and maintaining Sway <3

Please fill out the following:

  • Sway Version:: sway version 1.9

  • Debug Log::

  • Configuration File:: Config Additional config (separate file)

     set $DOCK1 'Microstep MSI MP243X PB5H403A00291'
     set $DOCK2 'Microstep MSI MP243X PB5H403A00098'
     set $DOCK3 'LG Electronics LG FULL HD 208NTHM8S705'
    
     output {
         $DOCK1  enable pos 0    0 res --custom 1920x1080@30Hz adaptive_sync off
         $DOCK2  enable pos 1920 0 res --custom 1920x1080@30Hz adaptive_sync off
         $DOCK3  enable pos 3840 0 res --custon 1920x1080@60Hz adaptive_sync off
     }
    
  • Stack Trace:: n/a

  • Description:

    • Running swaymsg "output * power off" && sleep 5 && swaymsg "output * power on" will cause it everytime.

iDigitalFlame avatar Jul 23 '24 20:07 iDigitalFlame