way-displays: application stuck in loop & 100% cpu
Hi, thanks for this application.
I am trying to get it working with a Framework laptop connected to two 1440p displays via Thunderbolt3 dock. It worked as expected at first. I played around with some scaling settings in cfg and so on. Then I connected the displays to the dock, one by one, and they also worked as expected, and closing the lid disabled the internal display.
However, then I tried to change the refresh rate. One display auto-selected ~144hz by default, and the other ~100hz, so I wanted to experiment and try 144 or 120hz on the other. Now, there might be some incompatibility between this high refresh rate through the dock, or maybe the HDMI connection, but i still wanted to experiment. Once I saved the config, the all system got very slow, fans spun up and from what I could tell, the CPU was 100% loaded. In logs I see that the program is failing to set some modes, and then falls back to the preferred mode, and reports (no mode)
on this display, but at the same time reports that the mode is changed successfully. This happens many times per second.
Worth noting that during this, even though it reported (no mode)
, both external displays were still working, and I could successfully open terminals on either of them (though they were near unusable, as you would expect with an overloaded cpu). During this problem, I was able to change the cfg file to attempt removing the custom mode/refresh setting, but that did not help.
This went on until I unplugged the dock with the displays. A similar behaviour happened later when I powered off/on the dock (after clean PC restart), without playing with the config settings, but I did not save the log from that time.
While it’s possible that this was caused by some incompatibility between dock/display, I think the program should not cause a never-ending cpu overloaded loop in any cases.\
Attaching partial log from when the issue started (full log is ~45k lines)
I [21:30:11] DP-5 Arrived:
I [21:30:11] info:
I [21:30:11] name: 'DP-5'
I [21:30:11] desc: 'Goldstar Company Ltd 27GL850 912NTLEBE528 (DP-5)'
I [21:30:11] width: 700mm
I [21:30:11] height: 390mm
I [21:30:11] dpi: 93.34 @ 2560x1440
I [21:30:11] mode: 3840 x 2160 @ 60 Hz 60,000 mHz 59,940 mHz
I [21:30:11] mode: 3840 x 2160 @ 50 Hz 50,000 mHz
I [21:30:11] mode: 3840 x 2160 @ 30 Hz 30,000 mHz 29,970 mHz
I [21:30:11] mode: 3840 x 2160 @ 25 Hz 25,000 mHz
I [21:30:11] mode: 3840 x 2160 @ 24 Hz 24,000 mHz 23,976 mHz
I [21:30:11] mode: 2560 x 1440 @ 144 Hz 143,999 mHz
I [21:30:11] mode: 2560 x 1440 @ 120 Hz 119,998 mHz
I [21:30:11] mode: 2560 x 1440 @ 100 Hz 99,946 mHz (preferred)
I [21:30:11] mode: 2560 x 1440 @ 60 Hz 59,951 mHz
I [21:30:11] mode: 1920 x 1080 @ 120 Hz 120,000 mHz 119,880 mHz
I [21:30:11] mode: 1920 x 1080 @ 60 Hz 60,000 mHz 60,000 mHz 59,940 mHz
I [21:30:11] mode: 1920 x 1080 @ 50 Hz 50,000 mHz
I [21:30:11] mode: 1680 x 1050 @ 60 Hz 59,883 mHz
I [21:30:11] mode: 1600 x 900 @ 60 Hz 60,000 mHz
I [21:30:11] mode: 1280 x 1024 @ 75 Hz 75,025 mHz
I [21:30:11] mode: 1280 x 1024 @ 60 Hz 60,020 mHz
I [21:30:11] mode: 1280 x 800 @ 60 Hz 59,910 mHz
I [21:30:11] mode: 1280 x 720 @ 60 Hz 60,000 mHz 60,000 mHz 59,940 mHz
I [21:30:11] mode: 1280 x 720 @ 50 Hz 50,000 mHz
I [21:30:11] mode: 1024 x 768 @ 75 Hz 75,029 mHz
I [21:30:11] mode: 1024 x 768 @ 60 Hz 60,004 mHz
I [21:30:11] mode: 800 x 600 @ 75 Hz 75,000 mHz
I [21:30:11] mode: 800 x 600 @ 60 Hz 60,317 mHz
I [21:30:11] mode: 720 x 576 @ 50 Hz 50,000 mHz
I [21:30:11] mode: 720 x 480 @ 60 Hz 60,000 mHz 59,940 mHz
I [21:30:11] mode: 640 x 480 @ 75 Hz 75,000 mHz
I [21:30:11] mode: 640 x 480 @ 60 Hz 60,000 mHz 59,940 mHz 59,940 mHz
I [21:30:11] current:
I [21:30:11] scale: 1.000
I [21:30:11] position: 1504,0
I [21:30:11] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:30:11]
I [21:30:11] eDP-1 Changing:
I [21:30:11] from:
I [21:30:11] scale: 1.500
I [21:30:11] position: 0,0
I [21:30:11] mode: 2256x1504@60Hz (59,999mHz) (preferred)
I [21:30:11] to:
I [21:30:11] position: 0,437
I [21:30:13]
I [21:30:13] DP-6 Arrived:
I [21:30:13] info:
I [21:30:13] name: 'DP-6'
I [21:30:13] desc: 'Goldstar Company Ltd LG ULTRAGEAR 110MADHLT466 (DP-6)'
I [21:30:13] width: 700mm
I [21:30:13] height: 390mm
I [21:30:13] dpi: 93.34 @ 2560x1440
I [21:30:13] mode: 3840 x 2160 @ 60 Hz 60,000 mHz 59,940 mHz
I [21:30:13] mode: 3840 x 2160 @ 50 Hz 50,000 mHz
I [21:30:13] mode: 3840 x 2160 @ 30 Hz 30,000 mHz 29,970 mHz
I [21:30:13] mode: 3840 x 2160 @ 25 Hz 25,000 mHz
I [21:30:13] mode: 3840 x 2160 @ 24 Hz 24,000 mHz 23,976 mHz
I [21:30:13] mode: 2560 x 1440 @ 144 Hz 143,933 mHz (preferred)
I [21:30:13] mode: 2560 x 1440 @ 120 Hz 119,998 mHz
I [21:30:13] mode: 2560 x 1440 @ 60 Hz 59,951 mHz
I [21:30:13] mode: 1920 x 1080 @ 120 Hz 120,000 mHz 119,880 mHz
I [21:30:13] mode: 1920 x 1080 @ 60 Hz 60,000 mHz 60,000 mHz 59,940 mHz
I [21:30:13] mode: 1920 x 1080 @ 50 Hz 50,000 mHz
I [21:30:13] mode: 1280 x 720 @ 60 Hz 60,000 mHz 59,940 mHz
I [21:30:13] mode: 1280 x 720 @ 50 Hz 50,000 mHz
I [21:30:13] mode: 1024 x 768 @ 60 Hz 60,004 mHz
I [21:30:13] mode: 800 x 600 @ 60 Hz 60,317 mHz
I [21:30:13] mode: 720 x 576 @ 50 Hz 50,000 mHz
I [21:30:13] mode: 720 x 480 @ 60 Hz 60,000 mHz 59,940 mHz
I [21:30:13] mode: 640 x 480 @ 60 Hz 60,000 mHz 59,940 mHz 59,940 mHz
I [21:30:13] current:
I [21:30:13] scale: 1.000
I [21:30:13] position: 1504,0
I [21:30:13] mode: 2560x1440@144Hz (143,933mHz) (preferred)
W [21:30:13]
W [21:30:13] WARNING: Changes cancelled, retrying
I [21:31:59]
I [21:31:59] Lid closed
I [21:31:59]
I [21:31:59] eDP-1 Changing:
I [21:31:59] from:
I [21:31:59] scale: 1.500
I [21:31:59] position: 0,0
I [21:31:59] mode: 2256x1504@60Hz (59,999mHz) (preferred)
I [21:31:59] (lid closed)
I [21:31:59] to:
I [21:31:59] (disabled)
I [21:31:59]
I [21:31:59] DP-5 Changing:
I [21:31:59] from:
I [21:31:59] scale: 1.000
I [21:31:59] position: 4064,0
I [21:31:59] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:31:59] to:
I [21:31:59] position: 0,0
I [21:31:59]
I [21:31:59] DP-6 Changing:
I [21:31:59] from:
I [21:31:59] scale: 1.000
I [21:31:59] position: 1504,0
I [21:31:59] mode: 2560x1440@144Hz (143,933mHz) (preferred)
I [21:31:59] to:
I [21:31:59] position: 2560,0
I [21:31:59]
I [21:31:59] Changes successful
I [21:41:29]
I [21:41:29] Reloading configuration file: /home/black/.config/way-displays/cfg.yaml
I [21:41:29] Arrange in a ROW aligned at the BOTTOM
I [21:41:29] Auto scale: ON
I [21:41:29] Scale:
I [21:41:29] eDP-1: 1.500
I [21:41:29] Mode:
I [21:41:29] Goldstar Company Ltd 27GL850 912NTLEBE528: 2560x1440
I [21:41:29]
I [21:41:29] DP-5 Changing:
I [21:41:29] from:
I [21:41:29] scale: 1.000
I [21:41:29] position: 0,0
I [21:41:29] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:41:29] to:
I [21:41:29] mode: 2560x1440@144Hz (143,999mHz)
E [21:41:29]
E [21:41:29] ERROR: Changes failed
E [21:41:29] ERROR: DP-5:
E [21:41:29] ERROR: mode: 2560x1440@144Hz (143,999mHz)
I [21:41:29]
I [21:41:29] DP-5 Changing:
I [21:41:29] from:
I [21:41:29] scale: 1.000
I [21:41:29] position: 0,0
I [21:41:29] (no mode)
I [21:41:29] to:
I [21:41:29] mode: 2560x1440@120Hz (119,998mHz)
E [21:41:29]
E [21:41:29] ERROR: Changes failed
E [21:41:29] ERROR: DP-5:
E [21:41:29] ERROR: mode: 2560x1440@120Hz (119,998mHz)
I [21:41:29]
I [21:41:29] DP-5 Changing:
I [21:41:29] from:
I [21:41:29] scale: 1.000
I [21:41:29] position: 0,0
I [21:41:29] (no mode)
I [21:41:29] to:
I [21:41:29] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:41:29]
I [21:41:29] Changes successful
I [21:41:29]
I [21:41:29] DP-5 Changing:
I [21:41:29] from:
I [21:41:29] scale: 1.000
I [21:41:29] position: 0,0
I [21:41:29] (no mode)
I [21:41:29] to:
I [21:41:29] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:41:29]
I [21:41:29] Changes successful
I [21:41:29]
I [21:41:29] DP-5 Changing:
I [21:41:29] from:
I [21:41:29] scale: 1.000
I [21:41:29] position: 0,0
I [21:41:29] (no mode)
I [21:41:29] to:
I [21:41:29] mode: 2560x1440@100Hz (99,946mHz) (preferred)
I [21:41:30]
I [21:41:30] Changes successful
[....] truncated
[....] end of log follows:
I [21:45:40] DP-5 Changing:
I [21:45:40] from:
I [21:45:40] scale: 1.000
I [21:45:40] position: 0,0
I [21:45:40] (no mode)
I [21:45:40] to:
I [21:45:40] mode: 3840x2160@60Hz (59,940mHz)
E [21:45:40]
E [21:45:40] ERROR: Changes failed
E [21:45:40] ERROR: DP-5:
E [21:45:40] ERROR: mode: 3840x2160@60Hz (59,940mHz)
I [21:45:40]
I [21:45:40] DP-5 Changing:
I [21:45:40] from:
I [21:45:40] scale: 1.000
I [21:45:40] position: 0,0
I [21:45:40] (no mode)
I [21:45:40] to:
I [21:45:40] mode: 3840x2160@50Hz (50,000mHz)
I [21:45:51]
I [21:45:51] DP-5 Departed:
I [21:45:51] name: 'DP-5'
I [21:45:51] desc: 'Goldstar Company Ltd 27GL850 912NTLEBE528 (DP-5)'
I [21:45:51]
I [21:45:51] DP-6 Departed:
I [21:45:51] name: 'DP-6'
I [21:45:51] desc: 'Goldstar Company Ltd LG ULTRAGEAR 110MADHLT466 (DP-6)'
wl_display@1: error 1: invalid arguments for zwlr_output_configuration_v1@3.enable_head
E [21:45:51]
E [21:45:51] ERROR: wl_display_dispatch_pending failed at src/server.c:148, exiting: 22 Invalid argument
E [21:45:51]
E [21:45:51] ERROR: Please raise an issue: https://github.com/alex-courtis/way-displays/issues
E [21:45:51] ERROR: Attach this log and describe the events that occurred before this failure.
I will test some more tomorrow, let me know if any additional info is needed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (16 by maintainers)
Commits related to this issue
- #33 prevent infinite loop following some mode change failures — committed to alex-courtis/way-displays by alex-courtis 2 years ago
- #33 clarify laptop display disable — committed to alex-courtis/way-displays by alex-courtis 2 years ago
Actually, on reconsideration, lack of error messages in that log is due to me only calling
tee
for the default stdout stream. I did not redirect the stderr stream, so it’s expected that the second output where the program immediately crashes, contains no error log. The other logs include the error stream as those instances were started by Sway on startup, with stderr redirection.I will make sure to save the error stream as well when I do the next tests.
Native resolution is 1440p for both. The displays support 2160p input, in which case the full image gets downscaled to native resolution, effectively making items appear smaller and blurry. Not something one would want, I think it’s maybe meant to handle media devices that only output in 4K.