[Xfce-bugs] [Bug 15488] New: When unplugging the external monitor, the laptop does not switch to its own screen (DP-0)

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue May 28 12:52:03 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15488

            Bug ID: 15488
           Summary: When unplugging the external monitor, the laptop does
                    not switch to its own screen (DP-0)
    Classification: Xfce Core
           Product: Xfce4-settings
           Version: 4.13.4
          Hardware: HP
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: Xfsettingsd
          Assignee: xfce-bugs at xfce.org
          Reporter: kyegupov4 at gmail.com
  Target Milestone: Xfce 4.14

This looks like another version of
https://bugzilla.xfce.org/show_bug.cgi?id=9501

After unplugging the external HDMI monitor, the laptop (HP Elitebook 1050
running xubuntu 19.04) fails to switch to its own screen, leaving me with no
display whatsoever.

Event log from the daemon:

xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 442.
xfce4-settings(displays): Detected CRTC 443.
xfce4-settings(displays): Detected CRTC 444.
xfce4-settings(displays): Detected CRTC 445.
xfce4-settings(displays): Detected output 471 DP-0.
xfce4-settings(displays): Noutput: before = 2, after = 1.
xfce4-settings(displays): Output disconnected: HDMI-0
xfce4-settings(displays): Disabling CRTC 442.
xfce4-settings(displays): No active output anymore! Attempting to re-enable the
internal output.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 442.
xfce4-settings(displays): Detected CRTC 443.
xfce4-settings(displays): Detected CRTC 444.
xfce4-settings(displays): Detected CRTC 445.
xfce4-settings(displays): Detected output 471 DP-0.
xfce4-settings(displays): Noutput: before = 1, after = 1.

The likely culprit is this condition:

https://codesearch.isocpp.org/actcd19/main/x/xfce4-settings/xfce4-settings_4.12.4-1/xfsettingsd/displays.c

if (g_str_has_prefix (output->info->name, "LVDS")
            || g_str_has_prefix (output->info->name, "eDP")
            || strcmp (output->info->name, "PANEL") == 0)

Apparently, only these hardcoded markers are expected and my "DP-0" is not good
enough.

I think more sensible behaviour would be to try and switch to the only
available output, regardless of whether it looks like the laptop panel or not.
Or allow to override the marker values.
At the very least, this code can use comments as to why these values have been
chosen.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list