Hi, first of all thank you for your work in kanshi, I noticed this behaviour when attaching a usb-c dock.
Laptop: Thinkpad X13 AMD Gen 1 (4750U) OS: Debian 12 + sway + swayidle Kernel: same behaviour with official debian kernel and with 6.4.4 compiled from source Dock: Lenovo USB-C Docking Station (40AY)
profile default { output "eDP-1" enable } profile dock { output "Lenovo Group Limited LEN L27q-10 U4330047" enable output "eDP-1" disable }
kanshi configuration applied: laptop screen disabled and external display enabled
primary display off, external monitor off. unplug and replug doesn't work, no signal on both screens.
I found this workaround effective apparently: a udev rule that activates via dpms both monitors at drm status change
KERNEL=="card0", SUBSYSTEM=="drm", RUN+="/bin/su $user -c /etc/conf.d/kanshi-fix.sh"
#!/bin/sh export SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" swaymsg "output * dpms on"
Please let me know if I can help. Thank you again
kanshi does not manage the DPMS state. swayidle is responsible for powering on all outputs again.
Thank you, unfortunately swayidle doesn't seems to handle the resume when an usb-c display/dock is added, so there is no way to wake up the display before applying the kanshi profile (except with the udev workaround I mentioned early). I tried to exec "swaymsg output * dpms on" in kanshi config, but I think (correct me if I'm wrong) that kanshi executes all commands after applying the output profile, so it's too late.
on 20/07/2023 16.24, ~emersion wrote:
kanshi does not managed the DPMS state. swayidle is responsible for powering on all outputs again.