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 719790 - Mutter should trap and ignore any errors when setting the primary output
Mutter should trap and ignore any errors when setting the primary output
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-03 17:31 UTC by Alberto Milone
Modified: 2013-12-06 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Trap and ignore the error (1.75 KB, patch)
2013-12-03 17:31 UTC, Alberto Milone
reviewed Details | Review
Trap and ignore the error v2 (3.89 KB, patch)
2013-12-06 15:24 UTC, Alberto Milone
none Details | Review
Trap and ignore the error v3 (3.95 KB, patch)
2013-12-06 15:26 UTC, Alberto Milone
accepted-commit_now Details | Review

Description Alberto Milone 2013-12-03 17:31:17 UTC
Created attachment 263409 [details] [review]
Trap and ignore the error

Some drivers which support RandR 1.4 may not support setting or getting the primary output, therefore mutter should trap and ignore any relevant errors.

The modesetting driver exposes this problem when used in combination with the nvidia binary driver using RandR 1.4 offloading.

I haven't tried the latest mutter from git, and I've only worked around the issue in gnome-desktop (see https://bugzilla.gnome.org/show_bug.cgi?id=719784, and the downstream bug report https://bugs.launchpad.net/ubuntu/+source/gnome-desktop3/+bug/1224254) but I thought that porting the workaround would be a good thing for mutter too.

I wrote the attached patch (just 4 lines of code) using git master.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-12-06 15:10:14 UTC
Review of attachment 263409 [details] [review]:

::: src/core/monitor-xrandr.c
@@ +454,3 @@
     }
 
+  meta_error_trap_push (meta_get_display ());

Could you put: MetaDisplay *display = meta_get_display ();

and replace all of the ad-hoc meta_get_display () calls with display?
Comment 2 Alberto Milone 2013-12-06 15:24:40 UTC
Created attachment 263674 [details] [review]
Trap and ignore the error v2

I didn't do it in the first patch only to keep the changes minimal. Here's the new patch.
Comment 3 Alberto Milone 2013-12-06 15:26:03 UTC
Created attachment 263675 [details] [review]
Trap and ignore the error v3

Sorry, I forgot to sign it off.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-12-06 15:28:16 UTC
Review of attachment 263675 [details] [review]:

Looks good.

We don't need a Signed-off-by, but feel free to commit with it.
Comment 5 Alberto Milone 2013-12-06 15:41:04 UTC
Ok, I'll push my changes then. Thanks for reviewing my work.
Comment 6 Alberto Milone 2013-12-06 15:49:21 UTC
Committed