After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 615805 - [PATCH] randr plugin's auto-config results in laptop's display getting turned off
[PATCH] randr plugin's auto-config results in laptop's display getting turned...
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: xrandr
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks: randr-tracker
 
 
Reported: 2010-04-15 02:17 UTC by Gabriel Burt
Modified: 2011-03-02 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding primary = TRUE (602 bytes, patch)
2010-11-12 17:51 UTC, Gabriel Burt
none Details | Review

Description Gabriel Burt 2010-04-15 02:17:35 UTC
If I plug in an external monitor to my laptop and run `xrandr`, it is auto-configured by g-s-d.  If I then unplug it and run `xrandr` again, the external display recognized as off by g-s-d, *but* it also turns off my laptop's screen.

This seems to happen because the laptop's "output" isn't set as "primary" in g-s-d.  If I set it as such in the auto_configure_outputs method (just setting all the "remained on" ones to primary, for now) it solves this issue.

Do you think that's the right approach?  Or should we get the laptop output in g-s-d's auto-configure with get_laptop_output_info and set primary = TRUE just for that?

One thing to note is when I call `xrandr`, the output name for the internal monitor is "PANEL" not LCD or LVDS; eg

    PANEL connected 1920x1200+0+0 (normal left inverted right x axis y axis)
287mm x 215mm
       1920x1200Scaled   60.4* 

But just changing g-s-d (in 2.28.2)'s is_laptop method to include PANEL in its string checks doesn't fix the problem.  I doubt fixing it in 2.30's gnome_rr_output_is_laptop would help either, based on examining from where that method is called.
Comment 1 Bastien Nocera 2010-11-12 13:23:06 UTC
There's actually nothing in the xrandr plugin in gnome-settings-daemon that uses the "primary" value. It doesn't set it, or unset it.

Seeing as you're not using the control-center preferences, I'm not sure you're actually testing gnome-settings-daemon's xrandr plugin.

Can you reproduce that after disabling the xrandr plugin (in GConf for GNOME 2.32, GSettings for GNOME 3)?

If you're using GNOME 2.32 or GNOME 3, you can get debug information by creating:
touch ~/gsd-debug-randr
The log will be in ~/gsd-debug-randr.log
Comment 2 Gabriel Burt 2010-11-12 17:51:07 UTC
Created attachment 174342 [details] [review]
Patch adding primary = TRUE

This patch fixes the bug for me.   gnome-desktop's *rr* code reads this value, IIRC.
Comment 3 Gabriel Burt 2010-11-12 17:52:09 UTC
I was definitely testing w/ gnome-control-center's display plugin which talks to gsd's xrandr plugin.
Comment 4 Bastien Nocera 2010-11-23 20:36:22 UTC
I believe your problem was fixed in another bug. Let us know if not.

commit 89c21494aec0a2feda705d4e4cca36ab4ebff9f8
Author: William Jon McCann <jmccann@redhat.com>
Date:   Mon Nov 22 21:40:11 2010 -0500

    xrandr: ensure a primary display is set
    
    https://bugzilla.gnome.org/show_bug.cgi?id=635455
Comment 5 Tobias Mueller 2011-03-02 17:20:09 UTC
Assuming this to be fixed as per last comment. Please reopen if this is not the case. Thanks.