Comment 21 for bug 1626689

Revision history for this message
Michal Hagara (haagrid) wrote :

Hi,

I've came across this bug report, when dealing with the same problem on Dell E7450 (pretty much always docked) on kernel 5.9.11.

For anyone who stumbles upon this:

button.lid_init_state=open itself wasn't satisfactory, because it left my laptop display ON of course, making it the main one. I've took the naive approach, as my laptop is pretty much docker all the time.

cat /etc/X11/xinit/xinitrc.d/10-lid-workaround.sh
#!/usr/bin/bash

display_cnt=$(xrandr | grep -c " connected")
if [ $display_cnt -eq 3 ]; then
  xrandr --output DP1-1 --auto --left-of DP1-2 --output eDP1 --off
fi

which turns the laptop display off after login, while maintaing monitor arrangemment I want ....display names might differ in your case.