crash: unplugging external monitor causes fatal error in re-enabling conditionally disabled monitor
hello! I didn't think I'd be back so soon, but after updating my way-displays config to conditionally disable my built-in monitor when an external monitor is connected, I've been encountering fatal way-displays errors when unplugging that external monitor.
I am able to reproduce the issue in the following ways:
1. start session with only built-in monitor
2. connect external monitor over hdmi-a-1 => built-in monitor is correctly disabled according to conditional
3. disconnect external monitor => built-in monitor is not re-enabled due to way-displays crash
a method that feels slightly shorter:
1. start session with built-in monitor and external monitor (built-in monitor is correct disabled according to conditional)
2. disconnect external monitor => built-in monitor is not re-enabled due to way-displays crash
Attached logs describe a crash according to the second case, because the steps to reproduce are slightly shorter, but idk if that actually simplifies the logs, so let me know if a different test case would work better. :)
I'm beginning my sessions using a display manager (whatever the GNOME default one is). way-displays is being run by river via the following `.config/river/init` file:
```
# running channel for seat management & a status bar (presumably unimportant but I left it in just in case)
~/dev/local/statusbar/target/release/statusbar &
~/dev/public/channel/zig-out/bin/channel &> ~/.config/river/channel.log &
# running way-displays (the important part)
way-displays --log-threshold debug > /tmp/way-displays.${XDG_VTNR}.${USER}.log 2>&1 &
# running the river window manager (presumably unimportant)
~/dev/local/wm/target/release/wm &> ~/.config/river/wm.log
```
here's my way-displays config file (some comments removed):
```
# yaml-language-server: $schema=https://raw.githubusercontent.com/alex-courtis/way-displays/refs/heads/master/schema/cfg-1.1.0.yaml
ARRANGE: ROW
ALIGN: TOP
ORDER:
- HDMI-A-1
- eDP-1
VRR_OFF:
- '!.*$'
DISABLED:
- NAME_DESC: eDP-1
IF:
- PLUGGED: ['HDMI-A-1']
SCALING: TRUE
AUTO_SCALE: TRUE
AUTO_SCALE_MIN: 1
AUTO_SCALE_MAX: -1
SCALE:
- NAME_DESC: eDP-1
SCALE: 1.5
- NAME_DESC: HDMI-A-1
SCALE: 1.5
CALLBACK_CMD: notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
LOG_THRESHOLD: INFO
```
and here is a log:
```
I [14:37:58] way-displays version 1.15.1-SNAPSHOT
I [14:37:58]
I [14:37:58] Found configuration file: /home/clado/.config/way-displays/cfg.yaml
I [14:37:58]
I [14:37:58] Active configuration:
I [14:37:58] Arrange in a ROW aligned at the TOP
I [14:37:58] Order:
I [14:37:58] HDMI-A-1
I [14:37:58] eDP-1
I [14:37:58] Scaling: ON
I [14:37:58] Auto scale: ON (min: 1.000)
I [14:37:58] Scale:
I [14:37:58] eDP-1: 1.500
I [14:37:58] HDMI-A-1: 1.500
I [14:37:58] Disabled:
I [14:37:58] eDP-1 (conditionally)
I [14:37:58] Change success command:
I [14:37:58] notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
W [14:37:58]
W [14:37:58] WARNING: libinput open /dev/input/event2 failed: 13 Permission denied
W [14:37:58]
W [14:37:58] WARNING: libinput open /dev/input/event1 failed: 13 Permission denied
W [14:37:58]
W [14:37:58] WARNING: libinput open /dev/input/event0 failed: 13 Permission denied
W [14:37:58]
W [14:37:58] WARNING: libinput open /dev/input/event4 failed: 13 Permission denied
W [14:37:58]
W [14:37:58] WARNING: libinput open /dev/input/event3 failed: 13 Permission denied
D [14:37:58]
D [14:37:58] Compositor supports wp_fractional_scale_manager_v1 version 1
D [14:37:58] LOOP START
D [14:37:58] LOOP pfds_init
D [14:37:58] LOOP _wl_display_prepare_read
D [14:37:58] LOOP _wl_display_flush
D [14:37:58] LOOP poll
D [14:37:58] LOOP _wl_display_read_events
D [14:37:58] LOOP _wl_display_dispatch_pending__read_events
D [14:37:58] LOOP layout
I [14:37:58]
I [14:37:58] eDP-1 Arrived:
I [14:37:58] info:
I [14:37:58] name: 'eDP-1'
I [14:37:58] desc: '(null) (null) (eDP-1)'
I [14:37:58] width: 346mm
I [14:37:58] height: 216mm
I [14:37:58] dpi: 253.85 @ 3456x2160
I [14:37:58] mode: 3456 x 2160 @ 120 Hz 120,000 mHz (preferred)
I [14:37:58] mode: 3456 x 2160 @ 60 Hz 60,000 mHz 59,940 mHz
I [14:37:58] mode: 3456 x 2160 @ 50 Hz 50,000 mHz
I [14:37:58] mode: 3456 x 2160 @ 48 Hz 48,000 mHz 47,952 mHz
I [14:37:58] current:
I [14:37:58] scale: 1.000 (2.644)
I [14:37:58] size: 3456x2160
I [14:37:58] position: 0,0
I [14:37:58] mode: 3456x2160@120Hz (120,000mHz) (preferred)
I [14:37:58] VRR: off
I [14:37:58]
I [14:37:58] HDMI-A-1 Arrived:
I [14:37:58] info:
I [14:37:58] name: 'HDMI-A-1'
I [14:37:58] make: 'DSC'
I [14:37:58] model: 'Paperlike H D'
I [14:37:58] desc: 'DSC Paperlike H D (HDMI-A-1)'
I [14:37:58] width: 200mm
I [14:37:58] height: 150mm
I [14:37:58] dpi: 279.40 @ 2200x1650
I [14:37:58] mode: 2200 x 1650 @ 40 Hz 40,001 mHz (preferred)
I [14:37:58] mode: 1600 x 1200 @ 60 Hz 60,000 mHz
I [14:37:58] current:
I [14:37:58] scale: 1.000 (2.910)
I [14:37:58] size: 2200x1650
I [14:37:58] position: 3456,0
I [14:37:58] mode: 2200x1650@40Hz (40,001mHz) (preferred)
I [14:37:58] VRR: off
D [14:37:58] LAYOUT IDLE 2
D [14:37:58] LAYOUT desired IDLE 2
D [14:37:58] APPLY remainder
I [14:37:58]
I [14:37:58] eDP-1 Changing:
I [14:37:58] from:
I [14:37:58] scale: 1.000 (2.644)
I [14:37:58] size: 3456x2160
I [14:37:58] position: 0,0
I [14:37:58] mode: 3456x2160@120Hz (120,000mHz) (preferred)
I [14:37:58] VRR: off
I [14:37:58] to:
I [14:37:58] (disabled)
I [14:37:58]
I [14:37:58] HDMI-A-1 Changing:
I [14:37:58] from:
I [14:37:58] scale: 1.000 (2.910)
I [14:37:58] size: 2200x1650
I [14:37:58] position: 3456,0
I [14:37:58] mode: 2200x1650@40Hz (40,001mHz) (preferred)
I [14:37:58] VRR: off
I [14:37:58] to:
I [14:37:58] scale: 1.500
I [14:37:58] position: 0,0
D [14:37:58] LAYOUT applied OUTSTANDING 2
D [14:37:58] LOOP pfds_destroy
D [14:37:58] LOOP END
D [14:37:58] LOOP START
D [14:37:58] LOOP pfds_init
D [14:37:58] LOOP _wl_display_prepare_read
D [14:37:58] LOOP _wl_display_flush
D [14:37:58] LOOP poll
D [14:37:58] LOOP _wl_display_read_events
D [14:37:58] LOOP _wl_display_dispatch_pending__read_events
D [14:37:58] LOOP layout
D [14:37:58] LAYOUT SUCCEEDED 0
I [14:37:58]
I [14:37:58] Changes successful
I [14:37:58]
I [14:37:58] Executing CALLBACK_CMD:
I [14:37:58] notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
D [14:37:58] LAYOUT desired IDLE 0
D [14:37:58] LAYOUT applied IDLE 0
D [14:37:58] LOOP pfds_destroy
D [14:37:58] LOOP END
D [14:37:58] LOOP START
D [14:37:58] LOOP pfds_init
D [14:37:58] LOOP _wl_display_prepare_read
D [14:37:58] LOOP _wl_display_flush
D [14:37:58] LOOP poll
Failed to show notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
D [14:38:47] LOOP _wl_display_read_events
D [14:38:47] LOOP _wl_display_dispatch_pending__read_events
D [14:38:47] LOOP layout
I [14:38:47]
I [14:38:47] HDMI-A-1 Departed:
I [14:38:47] name: 'HDMI-A-1'
I [14:38:47] desc: 'DSC Paperlike H D (HDMI-A-1)'
D [14:38:47] LAYOUT IDLE 0
D [14:38:47] LAYOUT desired IDLE 1
D [14:38:47] APPLY remainder
I [14:38:47]
I [14:38:47] eDP-1 Changing:
I [14:38:47] from:
I [14:38:47] mode: 3456x2160@120Hz (120,000mHz) (preferred)
I [14:38:47] VRR: off
I [14:38:47] (disabled)
I [14:38:47] to:
I [14:38:47] scale: 1.500
I [14:38:47] position: 0,0
I [14:38:47] transform: none
I [14:38:47] (enabled)
D [14:38:47] LAYOUT applied OUTSTANDING 1
D [14:38:47] LOOP pfds_destroy
D [14:38:47] LOOP END
D [14:38:47] LOOP START
D [14:38:47] LOOP pfds_init
D [14:38:47] LOOP _wl_display_prepare_read
D [14:38:47] LOOP _wl_display_flush
D [14:38:47] LOOP poll
D [14:38:47] LOOP _wl_display_read_events
D [14:38:47] LOOP _wl_display_dispatch_pending__read_events
D [14:38:47] LOOP layout
D [14:38:47] LAYOUT OUTSTANDING 1
D [14:38:47] LOOP pfds_destroy
D [14:38:47] LOOP END
D [14:38:47] LOOP START
D [14:38:47] LOOP pfds_init
D [14:38:47] LOOP _wl_display_prepare_read
D [14:38:47] LOOP _wl_display_flush
D [14:38:47] LOOP poll
D [14:38:47] LOOP _wl_display_read_events
D [14:38:47] LOOP _wl_display_dispatch_pending__read_events
D [14:38:47] LOOP layout
D [14:38:47] LAYOUT FAILED 1
F [14:38:47]
F [14:38:47] FATAL: Changes failed, exiting
I [14:38:47]
I [14:38:47] Executing CALLBACK_CMD:
I [14:38:47] notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
F [14:38:48]
F [14:38:48] FATAL: Please raise an issue: https://github.com/alex-courtis/way-displays/issues
F [14:38:48] FATAL: Attach this log and describe the events that occurred before this failure.
Failed to show notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
```
way-displays version `1.15.1-SNAPSHOT`
I'm happy to try to provide more context/debugging support if/as I can, please let me know! thank you for your time!!
9 条评论