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 741581 - gnome-shell crash on startup with fglrx on laptops
gnome-shell crash on startup with fglrx on laptops
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
3.14.x
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-16 02:25 UTC by Norbert Pfeiler
Modified: 2021-07-05 13:47 UTC
See Also:
GNOME target: ---
GNOME version: 3.23/3.24


Attachments
Proposed patch (3.39 KB, patch)
2015-09-23 11:31 UTC, Jan Holthuis
none Details | Review

Description Norbert Pfeiler 2014-12-16 02:25:25 UTC
Reason for the crash is an X error asserting arguments to 
XRRChangeOutputProperty called from 
mutter-3.14.2/src/backends/x11/meta-monitor-manager-xrandr.c:output_set_presentation_xrandr

The bug was essentially reported here: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767673
The only difference being, that in my case the value for MetaOutput::winsys_id is not 0x97 but 0x77. 

This problem was introduced with gnome 3.14, I personally experienced it with Catalyst 14.12 (current release) and the previous beta and stable release. 

My personal workaround was to comprise this call with 
gdk_error_trap_push() and gdk_error_trap_pop_ignored() 
which I found in use in the very same function here: 
https://github.com/parinporecha/mutter-compiz/blob/b61e318d74b02145b6c089c0dcbfcb92cd7087ce/src/monitor-xrandr.c#L675

I don’t know which value this variable is supposed to have and where it came from. 
So if this is an issue with fglrx, please report here: http://ati.cchtml.com/query.cgi 
Or explain and I will do so.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-12-16 02:37:22 UTC
I have no idea why an RRChangeOutputProperty would cause fglrx to fall over. Is it handing us invalid output IDs?

The error traps just work around the error, which we should track down. Can you report a bug to the fglrx developers? I don't have a Radeon card I can test with.
Comment 2 Norbert Pfeiler 2014-12-16 03:19:09 UTC
Can you tell me where/how the value is populated and is there a way to check the expected range so I can get some test data?
Comment 3 Chris 2014-12-17 17:08:55 UTC
It does not cause fglrx to fall over, gnome-session crashes. I've got the same issue, had it with the previous catalyst, too. Don't have any clue what that stuff actually does though. For me it's a Asus U38N Laptop - Amd Trinity APU (A8 4555m or so).

I'd really appreciate a solution, since I can't use my Laptop right now because of this, which is kinda annoying. Or rather, I could use it with KDE, but I simply can't use KDE any more due to a number of usability issues I just can't cope with. And the open source radeon driver can't power my integrated panel, which kinda makes it unusable too.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-12-17 17:47:13 UTC
(In reply to comment #2)
> Can you tell me where/how the value is populated and is there a way to check
> the expected range so I can get some test data?

It's an output ID. It's gotten from RRGetScreenResourcesCurrent:

https://git.gnome.org/browse/mutter/tree/src/backends/x11/meta-monitor-manager-xrandr.c#n483
Comment 5 Jasper St. Pierre (not reading bugmail) 2015-06-27 07:20:14 UTC
Has there been any update here? Is gnome-shell working with fglrx again?
Comment 6 Norbert Pfeiler 2015-06-27 16:36:51 UTC
Unfortunately not. 
I just tested the latest driver on my laptop and it’s not working. (gnome 3.16.2 + catalyst up to 15.5)
This is with xorg 1.16.4, since catalyst doesn’t support 1.17. 

The thing is that i also have an ASUS U38N, so i wasn’t sure if it’s just a very limited problem. 
And indeed on my desktop it works, on another laptop it doesn’t though. 
So the question is, is `output_set_presentation_xrandr` only used on laptops or is this another driver quirk? 

I’d also like to know what the purpose of `output_set_presentation_xrandr` is anyway. 

fglrx bug is here: http://ati.cchtml.com/show_bug.cgi?id=1136
Comment 7 Jasper St. Pierre (not reading bugmail) 2015-06-28 16:01:08 UTC
It sets a property on the output about it being a "presentation" output or not. But RRGetScreenResourcesCurrent gives us a bogus output there. I'll work around it soon.
Comment 8 Jasper St. Pierre (not reading bugmail) 2015-06-28 20:27:23 UTC
Worked around with

https://git.gnome.org/browse/mutter/commit/?id=8da5761ffce40ff0737c49b0a29a5dda4c537a10

Can you test with this?
Comment 9 Norbert Pfeiler 2015-06-28 21:20:20 UTC
I installed mutter-git with your commit alongside my gnome 3.16 – same error: 

gnome-session[874]: X Error of failed request:  BadValue (integer parameter out of range for operation)
gnome-session[874]: Major opcode of failed request:  141 (RANDR)
gnome-session[874]: Minor opcode of failed request:  13 (RRChangeOutputProperty)
gnome-session[874]: Value in failed request:  0x77
gnome-session[874]: Serial number of failed request:  332


Is this presentation property only applicable on laptops or also on desktops?
Comment 10 Evan Langlois 2015-07-13 21:41:57 UTC
I don't see a "This bug affects me" button.  Is there any progress on this?  I use Gnome 3.16 and using fglrx would fix a couple other issues I'm having, but if I can't get my desktop up because fglrx and mutter don't get along over XRANDR (and I use both a monitor and laptop screen at once), then this is a blocker.  Fglrx works with this setup and other window managers and desktops, just not Gnome.
Comment 11 Jasper St. Pierre (not reading bugmail) 2015-07-13 21:50:52 UTC
When fglrx gives us absolute bogus data, there's not much we can do. As I mentioned, I committed a patch to try to work around it, but it apparently didn't succeed. I don't have any Radeon cards to test with here.
Comment 12 Evan Langlois 2015-07-13 21:57:17 UTC
What bogus data?   This is working fine with other window managers.  I think the fglrx driver sees the external monitor as a projector instead of a monitor, but it worked.  What is mutter trying to do that the other wm's aren't?   Can it work via some sort of fallback where this extra functionality is removed?  Gala from elementaryOS is a sibling of mutter isn't it?  And it worked fine.  I'd just rather have Gnome.
Comment 13 Norbert Pfeiler 2015-07-13 22:28:09 UTC
I just want to add that the `gdk_error_trap` from the initial post didn’t seem to work reliably or at all later on, so since then I and other users of this package (https://aur.archlinux.org/packages/mutter-catalyst/) are living without the call to `output_set_presentation_xrandr`. 

I just assume this only happens on laptops now and therefore updated the fglrx bug report accordingly.
Comment 14 Norbert Pfeiler 2015-07-13 22:37:46 UTC
Also, i think since 3.16, gdm now crashes directly because of this whereas previously it only came to effect after login (with the sad computer screen – containing no further information, an issue for another place). Now you’re stuck without output even before being able to login.
Comment 15 Evan Langlois 2015-07-14 01:33:10 UTC
Yes, trouble-shooting the driver install is absolutely insane!  I had to turn off GDM and use startx/twm until glxinfo showed 3D was running.  I kept thinking the drivers weren't working when it was Gnome the whole time.
Comment 16 Alan Hourihane 2015-09-04 09:35:42 UTC
I've traced this issue and have a patch just to get things working for me, but it turns out it's an issue when overwriting the X atom for _MUTTER_PRESENTATION_OUTPUT, even though we're specifying PropModeReplace. I suspect the AMD Catalyst driver isn't honouring the PropModeReplace and won't allow overwriting this X atom.
Comment 17 Norbert Pfeiler 2015-09-04 11:46:36 UTC
@Alan Could you any information on the fglrx bug too:  http://ati.cchtml.com/show_bug.cgi?id=1136? 
Can you confirm that this only affects laptops? 

@Jasper I understand, that this is rather annoying, but even if the bug is fixed in a future catalyst release, it means that future gnome releases will only work when they have this driver available or not at all for legacy graphics cards. 
This only affects one function call (whose purpose in the greater picture i’m still unable to realize) and it seems gnome works fine without it, so isn’t it possible to omit it or something like that for affected drivers.
Comment 18 Alan Hourihane 2015-09-04 11:52:39 UTC
It affects machines with multiple outputs. So it should affect more than just laptops.

I'm not entirely sure what _MUTTER_PRESENTATION_OUTPUT is used for, but given my temporary patch aborts after the first use of this, I haven't seen any issue within gnome.
Comment 19 Norbert Pfeiler 2015-09-04 12:08:09 UTC
Well, the issue didn’t affect my desktop pc with 2 monitors but 2 of my laptops. 
Since there don’t seem to be that much people having this issue i figured it’s only an issue on laptops.
Comment 20 Jan Holthuis 2015-09-23 11:31:05 UTC
Created attachment 311938 [details] [review]
Proposed patch

This patch works around the issue by checking /proc/modules if the fglrx
module has been loaded (and thus the AMD Catalyst driver is used) and
skips the output_set_presentation_xrandr function call.

This shouldn't cause any major problems since a lot of people who
encountered this issue use a patched mutter version that just comments
the according line completely[1] to get mutter working with that driver.

[1] https://aur.archlinux.org/cgit/aur.git/tree/catalyst-comment.patch?h=mutter-catalyst
Comment 21 Norbert Pfeiler 2017-04-30 12:13:40 UTC
I used the proposed patch instead of the comment patch for the mutter-catalyst package for 1.5 years, and had to rebase it for gnome 3.24 now. 

I noticed that there are other places where xcb_randr_change_output_property is used (not sure if this is new) and they don’t seem to cause problems, although i’m not sure if they are ever called. 

I would test if there was something more to test…
Comment 22 GNOME Infrastructure Team 2021-07-05 13:47:51 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.