Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#5307 - Xorg shouldn't lock up when indirect rendering is forced

Attached to Project: Arch Linux
Opened by name withheld (Gullible Jones) - Monday, 28 August 2006, 17:41 GMT
Last edited by Alexander Baldeck (kth5) - Friday, 09 November 2007, 14:27 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Alexander Baldeck (kth5)
Architecture All
Severity High
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If Xorg is forced to use indirect rendering for OpenGL stuff (by removing DRI section in xorg.conf and enabling LIBGL_ALWAYS_INDIRECT in /etc/profile), and AGPDMA is disabled, it will always lock up when an OpenGL application is started. If AGPDMA is enabled in xorg.conf (Option "EnableAGPDMA"), no lockups will occur; however, CPU usage will rise to almost 100%. As is typical for X hijinks like this, there's nothing suspect in the logs.

So far I've only observed this with the openchrome driver using the repo version of Xorg 7.1. However, I have observed something similar when using basilburn's PKGBUILDs - if user access to DRI is denied, but indirect rendering is not forced via LIBGL_ALWAYS_INDIRECT, then Xorg will lock up instead of using indirect rendering when you try to run an OpenGL application.

Anyway, I'll see if I can reproduce this with xf86-video-unichrome as well...
This task depends upon

Closed by  Alexander Baldeck (kth5)
Friday, 09 November 2007, 14:27 GMT
Reason for closing:  Deferred
Additional comments about closing:  Apparently fixed, reopen if need be.
Comment by name withheld (Gullible Jones) - Monday, 28 August 2006, 18:50 GMT
Okay, this is mostly fixed with the new xf86-video-via.

XOrg still locks on OpenGL stuff when you deny permission to /dev/dri without using LIBGL_ALWAYS_INDIRECT, although right now it at least claims to be reverting to indirect rendering. Something's still screwing up, but not as badly as before.

Regarding AGPDMA, it no longer has to be enabled to prevent freezes. However, glxgears causes 100% CPU usage (without freeze) using either direct or indirect rendering, with or without AGPDMA, so I think the problem with CPU usage lies in mesa-apps needing recompilation.

(I'm not sure how much other stuff, if any, is built against mesa, but I'm guessing some of it might need to be recompiled.)
Comment by Jan de Groot (JGC) - Monday, 28 August 2006, 20:49 GMT
mesa-apps contains just some programs that make use of the GL API to draw dome gears or to display some info. When I utilize software rendering via AIGLX, my server hangs almost completely, I can't use it for other things than looking at the spinning gears, there's hardly enough CPU time to respond to ESC or CTRL+C to quit it.
When utilizing software rendering with AIGLX turned off, things work just fine as it did with X.Org 7.0.
If your videocard can't do AIGLX properly, I guess it's best to just turn it off, you can disable AIGLX from xorg.conf.
Comment by name withheld (Gullible Jones) - Monday, 28 August 2006, 20:55 GMT
Interesting. Here it stays quite responsive even with CPU use at almost 100%.

I'll see if I can reproduce the 100% CPU thing using DRI with AIGLX off, and with PPRacer.
Comment by name withheld (Gullible Jones) - Monday, 28 August 2006, 21:06 GMT
GLXGears is still steady 100% CPU with DRI only, AIGLX disabled; system quite responsive despite CPU usage.
Comment by name withheld (Gullible Jones) - Monday, 28 August 2006, 21:25 GMT
PPRacer averages 87% CPU usage with DRI, just below 100% with AIGLX forced by LIBGL_ALWAYS_INDIRECT. System and game equally responsive in both cases, framerates the same (average 15 FPS).

I think there are 3 things going on here...
1. I have a crappy low-powered CPU.
2. I have crappy low-powered graphics hardware.
3. GLXGears is designed to be piggish, even if it's not a good benchmark.

The extra CPU usage when forcing AIGLX could probably be chalked up to less-than-optimal support by the drivers, or maybe just the way AIGLX works, not sure about that.

The problem with forcing indirect rendering is still irking me though. If the user can't use /dev/dri, Xorg should use AIGLX even if you haven't put 'export LIBGL_ALWAYS_INDIRECT=1' in /etc/profile, or at least fall back on software rendering, instead of locking.
Comment by name withheld (Gullible Jones) - Monday, 04 December 2006, 19:02 GMT
Whoops, put it in the wrong thread, my bad... Anyway LIBGL_ALWAYS_INDIRECT also produces lockups now. There are no hints as to what's going on, but I can guess it wouldn't be a stretch for some update to completely break AIGLX for this driver. Probably an upstream bug, so I guess this bug report is not much use...
Comment by name withheld (Gullible Jones) - Sunday, 17 December 2006, 21:59 GMT
Okay, I've figured out what's wrong! Apparently enabling AGPDMA in xorg.conf somehow conflicts with AIGLX in the current version, and causes a full lockup. With AGPDMA disabled, the lockup doesn't occur. However, glxgears (with accelerated indirect rendering forced) does freeze things up for about a second upon being terminated, and spits out this error message:

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 2036 requests (1072 known processed) with 0 events remaining.

Not sure what the significance of that is. I'll see if any other GL application generates it.
Comment by name withheld (Gullible Jones) - Sunday, 17 December 2006, 22:13 GMT
Neverball and PPRacer also both hang on exit, though they don't produce any error messages.
Comment by Jan de Groot (JGC) - Tuesday, 27 February 2007, 23:06 GMT
Is this still an issue with xorg-server 1.2.0?
Comment by name withheld (Gullible Jones) - Tuesday, 27 February 2007, 23:14 GMT
Unfortunately yes. AIGLX performance is better and GL applications no longer hang with it, but AGPDMA with AIGLX still causes lockups.
Comment by Alexander Baldeck (kth5) - Wednesday, 07 November 2007, 14:44 GMT
What's the status of this one?
Comment by name withheld (Gullible Jones) - Wednesday, 07 November 2007, 20:39 GMT
Can't say, I'm currently using Intel graphics. I think the i915 driver always uses AGPDMA though, and I can force indirect rendering without lockups, so this may be fixed... Or not. Best to get input from someone with Unichrome.

Loading...