~emersion/kanshi#46: 
Doesn't restore laptop display when switching TTYs+undocking

I have two accounts on my machine (both using sway) and I switch between them using control+alt+f{1,2}. Kanshi remembers the state of the TTY when I switch but doesn't detect any changes when I switch back. My kanshi config is:

{
    output "Unknown 0x109D 0x00000000" enable  # Laptop
}

{
    output "Unknown 0x109D 0x00000000" disable  # Laptop
    output "ViewSonic Corporation VP2768 Series UY5182100007" enable  # external monitor
}

To illustrate the issue, here's a scenario:

  • Work in TTY1 undocked
  • dock laptop (external monitor)
  • Switch to TTY2 and work
  • Undock laptop while in TTY2
  • Switch to TTY1 and notice a dead screen

At this point, Kanshi hasn't returned the display back to the laptop. TTY1 is also unresponsive, i.e. I'm unable to blindly type commands to save the situation - something's blocking (perhaps not a Kanshi bug, then?).

The situation then gets more awkward because, while I can rescue the session by docking the laptop and undocking again, Kanshi somehow does detect the dock on TTY2 and then activates the external monitor/disables the laptop display in the background.

Status
REPORTED
Submitter
github.com:ainola (unverified)
Assigned to
No-one
Submitted
5 years ago
Updated
1 year, 10 months ago
Labels
No labels applied.

github.com:ainola (unverified) 3 years ago ยท edit

This seems to have not been an issue for me for some weeks now - I'm guessing this was a kernel issue after all? Can anyone confirm?

~ainola 3 years ago

It seems there was a glorious period where this was 100% reliable, and then as the system updates came through eventually this broke again. So it definitely seems to caused by something else but I'm not sure what. Sadly, it's at the point where it's exhibiting the behavior despite for some time now.

$ glxinfo | grep Device
    Device: Mesa Intel(R) HD Graphics 630 (KBL GT2) (0x591b)

~fritzrehde 1 year, 10 months ago

I have this same issue as well, and wanted to ask whether this has been fixed, as this issue is quite old. My config file is:

profile Laptop {
  output eDP-1 mode 1920x1080@60Hz scale 1.2 position 0,0
}


profile HomeDocked {
  output "Dell Inc. DELL P2419H GQDLH73" mode 1920x1080 position 0,0
  output eDP-1 disable
}

When I dock the laptop, everything works fine, the laptop's display is turned off and only the monitor is used. However, when I undock the laptop (i.e. disconnect the displayport cable), the laptop screen stays black. I find this especially weird because the kanshi logs (the stdout when running it from the command line) shows that the Laptop config was applied, which should have turned the screen back on. Any ideas (if this is a bug, how do others find a different way that works until the bug is fixed)?

~ainola 1 year, 10 months ago

Just for clarification, this issue involves TTY switching, not just general docking issues. I would look elsewhere if this is the latter :)