alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
241 stars 12 forks source link

Display Enabled With Lid Closed At Startup #27

Closed alex-courtis closed 2 years ago

alex-courtis commented 2 years ago
I [16:47:50] Found configuration file: /home/alex/.dotfiles/config/way-displays/cfg.yaml
I [16:47:50]   Arrange in a ROW aligned at the TOP
I [16:47:50]   Order:
I [16:47:50]     HDMI-A-1
I [16:47:50]   Auto scale: ON
I [16:47:50]
I [16:47:50] HDMI-A-1 Arrived:
I [16:47:50]   info:
I [16:47:50]     name:     'HDMI-A-1'
I [16:47:50]     desc:     'Unknown ASUS XG32V 0x0000CF52 (HDMI-A-1)'
I [16:47:50]     width:    700mm
I [16:47:50]     height:   390mm
I [16:47:50]   current:
I [16:47:50]     scale:    1.000
I [16:47:50]     position: 0,0
I [16:47:50]     mode:     2560x1440@60Hz
I [16:47:50]
I [16:47:50] eDP-1 Arrived:
I [16:47:50]   info:
I [16:47:50]     name:     'eDP-1'
I [16:47:50]     desc:     'Unknown 0x05EF 0x00000000 (eDP-1)'
I [16:47:50]     width:    310mm
I [16:47:50]     height:   170mm
I [16:47:50]     dpi:      212.45 @ 2560x1440
I [16:47:50]   current:
I [16:47:50]     (disabled)
I [16:47:50]
I [16:47:50] eDP-1 Changing:
I [16:47:50]   from:
I [16:47:50]     (disabled)
I [16:47:50]   to:
I [16:47:50]     scale:    2.250
I [16:47:50]     position: 2560,0
I [16:47:50]     mode:     2560x1440@60Hz (preferred)
I [16:47:50]     (enabled)
I [16:47:50]
I [16:47:50] Changes successful
I [16:47:51]
I [16:47:51] Monitoring lid device: /dev/input/event1
alex-courtis commented 2 years ago

Display state does not change after prefix change in cfg.yaml.

Possibly resolved by dirty removal in #22

alex-courtis commented 2 years ago

Lid state is not being notified until after the first round of output layout changes.

Perform lid discovery without polling fd before main loop.

alex-courtis commented 2 years ago

Only occurring on 2019 Thinkpad X1. Similar age Dell is OK.

alex-courtis commented 2 years ago

Hacking libinput indicates that AttrLidSwitchReliability=reliable is necessary for the initial state to be sent and functions on the thinkpad when forced on.

/usr/share/libinput/10-generic-lid.quirks will set reliable for devices with a dmi containing ct9 and ct10 only. The thinkpad is ct31.

alex-courtis commented 2 years ago

Raised https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/753 for the ct31 switch. Changing the default would be preferable...

alex-courtis commented 2 years ago

Added workaround to readme.