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 670459 - gnome_rr_output_is_laptop returns FALSE for eDP outputs
gnome_rr_output_is_laptop returns FALSE for eDP outputs
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-20 16:24 UTC by Seth Forshee
Modified: 2012-02-23 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to workaround issue by recognizing outputs with eDP in name (843 bytes, patch)
2012-02-21 16:33 UTC, Seth Forshee
none Details | Review

Description Seth Forshee 2012-02-20 16:24:41 UTC
eDP (embedded display ports) is a display panel interface specifically for internal connections, e.g. built-in laptop panels. The i915 driver (and possibly others, although I haven't checked) names eDP outputs with a string that begins with "eDP". gnome_rr_output_is_laptop does not recognize these outputs as laptop panels.

I'm not entirely sure whether this is a libgnome-desktop problem or not, as it may be a problem with what's getting reported from RandR. Specifically [1] may be related, as it is (was?) preventing the i915 driver for xorg from doing some of the same things it does with LVDS.

I'm attaching a patch that does fix the issue however. Tested on a MacBook Pro 4,1.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=38012
Comment 1 Seth Forshee 2012-02-21 16:33:51 UTC
Created attachment 208150 [details] [review]
Patch to workaround issue by recognizing outputs with eDP in name

I guess the patch didn't make it. Attaching it now.
Comment 2 Federico Mena Quintero 2012-02-21 17:25:05 UTC
This makes sense, although I'd *REALLY REALLY REALLY* rather have xorg fix this properly, in the sub-bugs for https://bugs.freedesktop.org/show_bug.cgi?id=26736

RANDR 1.3 introduced the ConnectorType property for outputs, but only radeonhd implemented it properly.  All the other drivers already have the necessary information to implement this property, which is *the* property that clients are supposed to use to say, "is this a laptop's display?".

gnome_rr_output_is_laptop() already checks the ConnectorType property and gives it preference over the output names.
Comment 3 Seth Forshee 2012-02-22 14:17:47 UTC
Thanks for the information, that was helpful. I inquired with one of the people working on X for ubuntu, and he basically confirmed what you said and added that he didn't expect it to get fixed in the near future unless.

So it sounds like something along the lines of this patch makes sense, for now at least.
Comment 4 Federico Mena Quintero 2012-02-22 20:25:57 UTC
"... he didn't expect it to get fixed in the near future unless"... what? :)

Can we find out what's needed for drivers to implement this?  Maybe just a friendly poke to the driver authors...
Comment 5 Seth Forshee 2012-02-22 23:02:28 UTC
Sorry, I had started to type "unless someone gets sufficiently motivated," but that seemed obvious so I (incompletely) deleted it.

I'll poke at some people to see if there's any chance of generating some motivation. But even if it gets implemented in the near future there will still be broken versions of X.

What's really bad about this is that gnome-settings-daemon doesn't suspend a laptop when the lid is closed if it detects that an external monitor is attached, and it's using gnome_rr_output_is_laptop() to make this decision. So any laptop that used eDP for it's internal panel doesn't suspend when the lid closed.

So imho it would be good to get this workaround applied either way.
Comment 6 Federico Mena Quintero 2012-02-23 20:09:45 UTC
OK, I've pushed your patch as 11997d323 to the master branch.  I'll try to poke the Xorg people about fixing this properly.  Thanks for debugging this down to is_laptop() :)