! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
When unplugging the external monitor, the laptop does not switch to its own s...
Status:
RESOLVED: MOVED
Product:
Xfce4-settings
Component:
Xfsettingsd

Comments

Description Konstantin Yegupov 2019-05-28 12:52:03 CEST
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.
Comment 1 Git Bot editbugs 2020-05-28 23:13:06 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/133.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15488

Reported by:
Konstantin Yegupov
Reported on: 2019-05-28
Last modified on: 2020-05-28

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Version:
4.13.4

Attachments

Additional information