Skip to content

Guess if an unknown monitor can be external when suspending by lid close

Fabio Bas requested to merge ctrlaltca/powerdevil:fix_lidclose into master

On lid close event, suspension in triggered unless m_triggerLidActionWhenExternalMonitorPresent is true and an external monitor is present. In previous bug 357868 some users reported that the internal panel of their laptop was detected as type "unknown" (instead of "panel"), so their laptop didn't suspend when closing the lid. This problem was fixed by considering "unknown" monitors as internal. Unfortunately some (most? all I could find in my office, at least) external monitors when connect using HDMI are reported as "unknown". This causes the opposite problem: my laptop suspends even when connected to an external monitor. This MR tries to make the funtionality a little bit smarter by checking if the "unknown" monitor is the only output currently present. If it's the only one, than it's quite surely the internal laptop panel, and suspend should trigger. If there's more than one output, then one of then must be external, so don't suspend.

Reworks commit d3162725 that fixes bug 357868. BUG: 438716

Merge request reports

Loading