Bug 7117 - openGL irregularly freezes radeon system
Summary: openGL irregularly freezes radeon system
Status: RESOLVED DUPLICATE of bug 12934
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: 6.4
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 03:53 UTC by Michael
Modified: 2008-12-23 08:19 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg configuration file (PCI-BusType) (15.94 KB, text/plain)
2006-08-29 15:10 UTC, Dark Shadow
Details

Description Michael 2006-06-05 03:53:14 UTC
(see also http://bugzilla.kernel.org/show_bug.cgi?id=6626, but no solution there)

The problem is that the computer system freezes completely in
irregular time intervals. The whole system freezes and is no longer responsive
to anything. BIOS still responds (at least I get sound signals when plugging in
or out the ac adaptor). No network either, screen just freezes, too.

The RAM has been checked thoroughly with memtest for more than 12 hours -> no
problem.

The freezes are totally infrequent and occur on average once or twice per week.
Sometimes the system has been running for only a few minutes, sometimes for days.

There are no system messages (dmesg, syslog, kern.log, messages, xorg.log)
related to the freeze. It just happens -> that´s why I suspect a kernel driver.

The only commonality I have found so far, is that all crashes seem to appear
when an OpenGL application is running (e.g. screensaver, enemy territory,
chromium). So I might suspect the ATI radeon dri driver. Here is some data:

Computer:
IBM Thinkpad X31
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY

xserver-xorg-video-ati 6.5.8.0-1
xserver-xorg 7.0.19

I have tried two different dri drivers:

OpenGL vendor string: Tungsten Graphics, Inc.
OpenGL renderer string: Mesa DRI Radeon 20050528 AGP 1x NO-TCL
OpenGL version string: 1.2 Mesa 6.4.1

(from debian unstable, libgl1-mesa-dri 6.4.1)

and

OpenGL vendor string: Tungsten Graphics, Inc.
OpenGL renderer string: Mesa DRI Radeon 20060327 AGP 1x NO-TCL
OpenGL version string: 1.3 Mesa 6.5.1

(from debian experimental, libgl1-mesa-dri 6.5.0beta)

I also tried to install binary builds from 060403 from
http://dri.sourceforge.net/snapshots/. However, the install script does not find
the correct directories on a debian system. 

ONE BIG PROBLEM IS THAT NOBODY COULD GIVE ME ANY METHOD HOW TO GET MORE
INFORMATION TO PIN DOWN THE PROBLEM!

So, unfortunately, there is not much info I can give about it, except that it is
extremely annoying. Sometimes there is data loss on the hard disks involved
(when the journaling did not suffice, I guess)!

I attach my complete xorg.conf:

Section "ServerLayout"
	Identifier     "XFree86 Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Keyboard0" "CoreKeyboard"
# PS/2 Mouse not detected
# Serial Mouse not detected
        InputDevice    "USB Mouse" "CorePointer"
# ALPS TouchPad not detected
# Synaptics TouchPad not detected
EndSection

Section "ServerFlags"
	Option "AllowMouseOpenFail"  "true"
	
EndSection

Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load  "ddc"  # ddc probing of monitor
#	Load  "GLcore"
	Load  "dbe"
	Load  "dri"
	Load  "extmod"
	Load  "glx"
        Load  "bitmap" # bitmap-fonts
	Load  "type1"
	Load  "freetype"
	Load  "record"
# TouchPad not detected
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "keyboard"
        Option      "CoreKeyboard"
	Option "XkbRules" "xorg"
	Option "XkbModel" "pc105"
	Option "XkbLayout" "de"
	Option "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
	Identifier  "Serial Mouse"
	Driver      "mouse"
	Option      "Protocol" "Microsoft"
	Option      "Device" "/dev/ttyS0"
	Option      "Emulate3Buttons" "true"
	Option      "Emulate3Timeout" "70"
	Option	    "SendCoreEvents"  "true"
EndSection

Section "InputDevice"
	Identifier  "PS/2 Mouse"
	Driver      "mouse"
	Option      "Protocol" "IMPS/2"
Option          "ZAxisMapping"          "4 5"
	Option      "Device" "/dev/psaux"
	Option      "Emulate3Buttons" "true"
	Option      "Emulate3Timeout" "70"
	Option	    "SendCoreEvents"  "true"
EndSection

Section "InputDevice"
        Identifier      "USB Mouse"
        Driver          "mouse"
        Option          "Device"                "/dev/input/mice"
	Option		"SendCoreEvents"	"true"
        Option          "Protocol"              "IMPS/2"
        Option          "ZAxisMapping"          "4 5"
        Option          "Buttons"               "5"
EndSection

Section "InputDevice"
        Identifier      "ALPS TouchPad"
        Driver          "synaptics"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "LeftEdge"              "120"
        Option          "RightEdge"             "830"
        Option          "TopEdge"               "120"
        Option          "BottomEdge"            "650"
        Option          "FingerLow"             "14"
        Option          "FingerHigh"            "15"
        Option          "MaxTapTime"            "180"
        Option          "MaxTapMove"            "110"
        Option          "EmulateMidButtonTime"  "75"
        Option          "VertScrollDelta"       "20"
        Option          "HorizScrollDelta"      "20"
        Option          "MinSpeed"              "0.2"
        Option          "MaxSpeed"              "0.5"
        Option          "AccelFactor"           "0.01"
        Option          "EdgeMotionMinSpeed"    "15"
        Option          "EdgeMotionMaxSpeed"    "15"
        Option          "UpDownScrolling"       "1"
        Option          "CircularScrolling"     "1"
        Option          "CircScrollDelta"       "0.1"
        Option          "CircScrollTrigger"     "2"
EndSection

Section "InputDevice"
        Identifier      "Synaptics TouchPad"
        Driver          "synaptics"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "LeftEdge"              "1700"
        Option          "RightEdge"             "5300"
        Option          "TopEdge"               "1700"
        Option          "BottomEdge"            "4200"
        Option          "FingerLow"             "25"
        Option          "FingerHigh"            "30"
        Option          "MaxTapTime"            "180"
        Option          "MaxTapMove"            "220"
        Option          "VertScrollDelta"       "100"
        Option          "MinSpeed"              "0.06"
        Option          "MaxSpeed"              "0.12"
        Option          "AccelFactor"           "0.0010"
        Option          "SHMConfig"             "on"
        Option          "Repeater"              "/dev/ps2mouse"
EndSection

Section "Device"
        Identifier      "ATI"
        Driver          "radeon"
	VendorName	"IBM Thinkpad"
	BoardName	"ATI Radeon Mobility M6"
        # acceleration
#        Option          "AGPMode" "4"
        Option          "EnablePageFlip" "on"
#	Option          "RenderAccel" "on"
	Option		"AGPFastWrite" "no"
#	Option		"BackingStore"  "on"
# enable PowerPlay features
#        Option          "DynamicClocks" "on"
        # use bios hot keys on thinkpad (aka fn+f7)
        Option          "BIOSHotkeys" "on"
        # enable radeon specific xinerama
#        Option          "MergedFB" "true"
#        Option          "CRT2Position" "RightOf"
#        Option          "CRT2Hsync" "50-75"
#        Option          "CRT2VRefresh" "30-82"
        Option          "MetaModes" "1024x768 1024x768-1280x1024 1280x1024"
#        Option          "MergedNonRectangular" "true"
        BusID           "PCI:1:0:0"
	# other options
	# sw_cursor is needed for some ati and radeon cards
	Option		"sw_cursor" "off"
        #Option		"hw_cursor"
        #Option		"NoAccel"
        #Option		"ShowCache"
        #Option		"ShadowFB"
        #Option		"UseFBDev"
        #Option		"Rotate"
EndSection

Section "Monitor"
        Identifier "InternalLCD"
        Option "DPMS"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device "ATI"
        Monitor "InternalLCD"
        DefaultDepth 16
        SubSection "Display"
                Depth 16
                Modes "1024x768"
        EndSubSection
EndSection

Section "DRI"
	Mode 0666
EndSection


In earlier times I also used the options:
Option "AGPMode"    "4"
Option "AGPFastWrite" "Yes"
Option "DynamicClocks" "On"

But as these were potential problem candidates, I disabled them, however, to no
avail concerning the freezes.

I am grateful for any help! I´d very much like to use OpenGl for some games,
nicer screensavers and in the future for xgl! However, with these crashes I
can´t seriously use it.

I am willing to test everything that may help diagnosing the problem (however,
my know-how is limited regarding compiling, patching etc.).

Michael
Comment 1 Aurelien PROVIN 2006-06-05 13:53:56 UTC
hello,

I have the same problem on my debian SID. I made many tests for one week. And I
found the problem caused by the radeon driver and not by xorg. The 6.9 version
is also affected. When you add the Option "noaccel" "true" in your xorg.conf,
that runs well.
With 20060113 snapshot, it works.
With 20060327 snapshot, it doesn't work.

So, the problem comes from a patch or a change commited between this two dates.
Comment 2 Michael 2006-06-05 14:52:13 UTC
Are you absolutely sure about the 20060113 snapshot? I ask because I have run
the 20050528 version for a very long time and this one definately has the
problem, too.

Furthermore, in my case it can be that a freeze only occurs after one or two
weeks, in between which everything works perfectly.

So, if you´re right, then the bug was fixed in 20060113 and reintroduced with
20060327 ?

Or, your problem is rather one of the many other "radeon freeze problems"
described in this bugtracker. There are many with reproduceble freezes, so quite
different with this irregular freeze that happens without any commonality
(except running openGL programs at the time of a freeze).

Maybe I try the snapshot. I just have some problems with the install script. It
doesn´t recognize the correct directories on my system. How have you done it,
using also a debian SID?

Michael
Comment 3 Aurelien PROVIN 2006-06-06 08:59:33 UTC
Yes, 20060113 snapshot works. But I can't test your 20050528 snapshot, the
radeon module doesn't build with my 2.6.16 kernel.

In order to test the 20060113 snapshot, I build x.org 6.9 from source and apply
the snapshot. With x.org 7.0 and this snapshot, I have the same problem as you.

I found a tip to know if the driver freezes. I notice that my computer always
freezes in some conditions. For instance, I want to insert a "big picture" (300
dpi) into an abiword document, if I move the scroll bar, it freezes. Basicly, I
notice the display of big pictures in some applications (abiword, firefox ...)
freeze my computer.

Can you try this test in order to know if it freeze also your computer ?
Comment 4 Michael 2006-06-07 02:36:36 UTC
Well, I use xorg 7.0, so according to your proposition the dri driver of 060113
shouldn´t work either.

I just opened a 300 dpi scanned picture in firefox with no problem. But I do
have dri turned off at the moment, for once because I need to work and don´t
like any freezes at the moment ( ;-) ). And secondly there is another bug (or
feature) in the dri driver which prevents the CPU from entering power saving
state C3 (https://bugs.freedesktop.org/show_bug.cgi?id=7119), and I need a long
battery life for the moment.

I might try later to see if this is somehow related. However, my experiences
were a bit different. I cannot remember having had any freezes in applications
that don´t use openGL, irrespectable of whether they opened big pictures or not.
On the other hand, nearly all crashes happen within openGL programs (even within
those using only small textures such as chromium).

It will be interesting to hear the opinion of an experienced developer (if
someone is interested at all, this is...).

Best regards,

Michael

BTW.: Yesterday I tried using a different xorg.conf that utilizes MergedFB
(http://mg.pov.lt/xorg.conf). It should give a very nice setup, as you can use
different resolutions on the LCD and the external CRT. You can even have a
Xinerama like setup.

Unfortunately, when switching between the metamodes, the system froze with more
than 50% probability. That was with dri enabled as well as disabled. So it seems
to be another unrelated freeze bug. If there is a good response here on this bug
tracker I will file a bug report for this, too. If nobody cares, well, then I
won´t...
Comment 5 Michael 2006-06-08 07:21:55 UTC
One addition: I decided to try to use EXA instead of XAA. (Don´t know if it
makes any difference at all to openGL or not. But in lack of any founded
suggestions...)

The system still freezes with EXA as well as with XAA. So, no real difference
(except that EXA is way slower and produces drawing artefacts in normal use ->
still very alpha, I guess).

This time I also tried the SysRQ magic keys in the hope to save some more
information to disk, but to no avail. Kernel is completely frozen (and twice I
had data loss on the hd again :( I guess, I don´t feel any longer for testing
any of my own ideas, if not a developer asks for such a test...)

So, now, until someone comes with a good idea, I turn off DRI and at least enjoy
a stable and power saving desktop. ( I just fear that it won´t be easy to make
xgl a working reality on a radeon r100 machine... )

Regards,

Michael
Comment 6 Michael 2006-06-13 08:31:59 UTC
ping...

Anyone interested? Any more data needed? Anything I can do?

I'm running without dri now. Haven't had a freeze since then... (But no Google
Earth, no games, and in the future no xgl :( )
Comment 7 Roland Scheidegger 2006-06-17 11:55:56 UTC
You could try to mount the filesystem where your logfiles are with the sync
option to maybe get some hint in a log file, though it's not certain this will help.
Such irregular freezing bugs are incredibly hard to track down, even more so if
they seem to be restricted to specific hardware (sometimes differences in
graphic card bios can trigger if lockups will happen or not).
Comment 8 Michael 2006-06-17 14:07:58 UTC
Hmm, yes, I see. Especially the unregular lockups are awful to identify. :-(

Two ideas that I'd like to discuss:

1.) insert error debug messages into the dri driver, e.g. writing some status
information to syslog, so that one might be able to find out at least in what
function the freeze happens?

2.) Don't write the syslog messages to the disk, but broadcast them on the
network and log them on a second computer?

But maybe it is simpler to start with a more regular freeze such as bug #7154.
This one is easily reproducible and I guess the developers might be able to make
some educated guesses in what function such a freeze might happen. Then with the
above approach we might be able to identify the function, which may be a start
to find the error...

Unfortunately this bug here is the most problematic at the moment as it occurs
when any OpenGL app is running (last freeze was with Google Earth). Without
finding it, xgl won't be usable. :(
Comment 9 Michel Dänzer 2006-06-23 01:21:48 UTC
Stéphane Marchesin suggested on IRC that this might be related to GART
texturing. Does setting the environment variable
RADEON_GARTTEXTURING_FORCE_DISABLE=1 make a difference?

If not, does an older version of the 2D driver make a difference, per bug 7154?
Comment 10 Michael 2006-06-23 01:52:25 UTC
(In reply to comment #9)
> Stéphane Marchesin suggested on IRC that this might be related to GART
> texturing. Does setting the environment variable
> RADEON_GARTTEXTURING_FORCE_DISABLE=1 make a difference?
> 

Am I right, that this should be used like:

RADEON_GARTTEXTURING_FORCE_DISABLE=1 googleearth

?

> If not, does an older version of the 2D driver make a difference, per bug 7154?

I will try 6.5.7.3-3, however it has severe distortions on OpenGL apps (not sure
if this is only with MergedFB, however. Will turn off MergedFB to check.)

I will try both suggestions, but with this bug, it may take some time until the
next freeze happens (sometimes just a few minutes, sometimes several hours ...)
Comment 11 Michel Dänzer 2006-06-23 01:57:46 UTC
(In reply to comment #10)
> 
> Am I right, that this should be used like:
> 
> RADEON_GARTTEXTURING_FORCE_DISABLE=1 googleearth

Yes, or just

export RADEON_GARTTEXTURING_FORCE_DISABLE=1

on the command line or in a shell startup script to make it always used.
Comment 12 Michael 2006-06-23 02:24:03 UTC
First results:

No, 6.5.7.3-3 also freezes with OpenGL (Using GoogleEarth is a good test, it
seems. First freeze within 1 minute :-) )

Without MergedFb the distortions in OpenGL are gone.

Now trying the encvironmen variable (with 6.5.7.3-3).
Comment 13 Michael 2006-06-23 03:40:50 UTC
uuufs, this time it took nearly an hour (and I already thought: That's it!), but
then again: FREEZE.

So, the environment variable did not help, either. (Pity...)


btw. is there a place where I can ask a question about xorg.conf? (no bug, just
a configuration question.)
Comment 14 Valery Inozemtsev 2006-07-20 08:16:14 UTC
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility 
M6 LY
xorg-x11-server-1.1.0
xorg-x11-drv-ati-6.6.1

With 20060707 snapshot, it works.
With 20060717 snapshot, it doesn't work.

xorg.conf
...
Section "Module"
        Load    "dbe"
        Load    "glx"
       Load    "dri"
        SubSection      "extmod"
                Option "omit xfree86-dga"
        EndSubSection
        Load    "type1"
        Load    "freetype"
EndSection
...
Section "Device"
        Identifier      "Radeon 7000"
        VendorName      "ATI"
        BusID           "PCI:1:0:0"
        BoardName       "Radeon Mobility M6 LY"
        Driver          "ati"
        Option          "AGPMode"       "4"
        Option          "AGPFastWrite"  "false"
        Option          "AccelMethod"   "XAA"
EndSection
Comment 15 Ken 2006-07-31 17:30:34 UTC
For what it's worth, I have the exact same problem. Occasional complete system
freeze when using an OpenGL app. I have an ATI X800XT with 8.27 drivers from
ATI. I'm running Mandriva 2006. I know just saying "Me too!!" doesn't help much,
but if you want me to upload some logs for comparison, LMK But, like yours, they
don't show anything about the crash. I gave up on linux for awhile because of
this a year ago. I came back thinking new drivers should have fixed it by now. 
Oh well...
Comment 16 Valery Inozemtsev 2006-07-31 22:11:43 UTC
problem in DRM. with patch https://bugs.freedesktop.org/attachment.cgi?id=5904 
all well
Comment 17 Dark Shadow 2006-08-29 15:10:44 UTC
Created attachment 6744 [details]
xorg configuration file (PCI-BusType)

My working xorg.conf file.
Comment 18 Dark Shadow 2006-08-29 15:12:54 UTC
Comment on attachment 6744 [details]
xorg configuration file (PCI-BusType)

Short summary: r300 is stable when forced into PCI mode via "BusType" option,
otherwise completely and randomly freezes the system when "glx" module is
loaded, but not when "dri" module is enabled.
--

Same thing here. Using an older r300 driver (downloaded from cvs in July) in
AGP mode, it just happened when the GLX module was loaded. 2D acceleration
worked (XAA, EXA) and the system didn't freeze (dri and drm modules were
enabled in xorg.conf).

After the latest driver update (from git), DRI doesn't work (disabled) when the
driver uses AGP mode. However, when I force the driver into PCI mode via the
"BusType" "PCI" option, DRI and GLX work (though slow, I only get 1000 fps in
glxgears instead of >=2000 fps). This is on a radeon 9500 Pro (4E44, it says
ATI Radeon 9700 Pro ND AGP) 128MB.

The various AGP options for the driver (and I've tried everything) won't make
any difference. X won't even start with AGPFastWrite option enabled (reboot
required).

Although PCI mode is not fast, at least I have a working system with 3D
acceleration and transparency fx etc.

Btw: Two glxgears work, but a third will cause a "Ran out of GART memory!
Please consider adjusting GARTSize option." How can I do that? And xscreensaver
sometimes has display errors (I guess memory is not enough, I'm using MergedFB)
but doesn't crash.

The r300 driver also seems to do something strange to my TFT screen: Gamma? is
too high, so that background pictures with very light grey actually are
completely white. On the second monitor (CRT), everything's ok. Changing gamma
with xgamma doesn't help though, I can't see the light grey colours. I guess
there's something wrong with the signal processing? Maybe I should file an
extra bug report about this? It would be nice anyway if different gamma
settings could be chosen for the other monitor.

The radeon works fine in windows xp (although the display gets corrupted after
resuming from standby or hibernation) with catalyst drivers. I can play games
for hours, there are no stability problems, and I've even overclocked the gpu
and video memory and tested for artifacts. RAM is ok, too => the system is rock
stable.
Comment 19 Jerome Glisse 2006-08-29 16:43:18 UTC
Dark your bug isn't related t to this one. M6 card are not r300 card.
Anyway what is your ddx radeon driver version ? A fix about r300
lockup went in few weeks ago. Even if it was mostly for 9800 card it
might help for other r300.

Other advise don't enable agpfastwrite and try with lower agp speed.
If nothings help please open a new bug. I added your mail to this
one so you can see my reply quickly.
Comment 20 Valery Inozemtsev 2006-08-29 22:43:13 UTC
xorg-server snapshot 2006-08-28 not problems.
Comment 21 Rolf Leggewie 2008-08-08 18:35:41 UTC
Is this still a problem?
Comment 22 Filippo Negroni 2008-12-23 02:17:01 UTC
Yes it is still a problem.

I have actually managed to trace the DRI issue on my laptop down to the interaction between the xorg radeon driver and the Synaptics touchpad.

Laptop: Acer 1681 with ATI Radeon Mobility 9600 and Synaptics touchpad.

OSes used to test: Slackware 12.0, 12.1, 12.2, Ubuntu 8.04, 8.10

Apparently, the driver works if I have a USB mouse plugged in to my box (touchpad still enabled as a PS2 mouse using the 'mouse' xorg driver).

If I instead only have the touchpad enabled (no USB mouse connected), then the screen freezes within a minute.

By using:

Option "DRI" "False"

The system does not freeze even if only the touchpad is enabled (no usb mouse connected).

I will attach proper output from lspci and X error log soon.
Comment 23 Alex Deucher 2008-12-23 08:19:34 UTC

*** This bug has been marked as a duplicate of bug 12934 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.