[R300g] System hangs when using direct rendering [patch available]

Bug #655592 reported by Alexander Bondarenko
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

My video card is Radeon mobility x700, I'am using Maverick RC with open source Gallium driver (OpenGL renderer string: Gallium 0.4 on RV410, OpenGL version string: 2.1 Mesa 7.10-devel). 2D and Compiz works fine, but system hangs when I playing Teeworlds or any other 3D/SDL game. It appears on any kernel, on included in distibution or zen-kernel (2.6.35).

Tags: patch
affects: ubuntu → mesa (Ubuntu)
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your report. Strictly speaking, gallium is not supported in Ubuntu 10.10 which ships the classic drivers instead. However I have seen the same issue with the classic drivers on RV410, it just happens more often with gallium. The workaround is to install a 2.6.36-rc7 kernel from the Kernel Mainline PPA, and boot with the drm_kms_helper.poll=0 kernel option. Can you please check whether that solves your issue?

Changed in mesa (Ubuntu):
status: New → Incomplete
Revision history for this message
Alexander Bondarenko (7stern) wrote :

I upgraded to maverick from lucid and gallium driver was default.
Thanks, I've tested mainline kernel, it solved my problem.
How can I switch between gallium and non-gallium r300 driver ?

Revision history for this message
Alexander Bondarenko (7stern) wrote :

Sorry, It's true that gallium not using for r300 in maverck. I've used xorg-edgers ppa with lucid so mesa packages wasn't udgraded.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

So you can confirm that applying the polling option works around the issue, also with the standard Maverick mesa packages?

summary: - System hangs when using direct rendering
+ [R300] System hangs when using direct rendering
Revision history for this message
Alexander Bondarenko (7stern) wrote : Re: [R300] System hangs when using direct rendering

How can I remove mesa and xorg packages installed from ppa and replace with standard maverick packages ?
Sorry for my terrible English.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

You can use ppa-purge. If you have removed xorg-edgers from your software sources, put it back to use ppa-purge successfully.

Revision history for this message
Alexander Bondarenko (7stern) wrote :

Downgrading to maverick's mesa fixes the problem, with or without polling on last mainline kernel.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Does it work fine with the maverick kernel also? So with a "clean" maverick system there is no problem?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I just wonder if it is because with standard maverick packages you are using r300c (classic) and not r300g (gallium) and this lock-up is much easier to trigger with gallium.

Revision history for this message
Alexander Bondarenko (7stern) wrote :

I've installed new maverick system on to another partition, it works fine, but 3D/SDL performance lower (teeworlds terrible lagging) comparing to 10.04 release and arch linux with lastest mesa from git.
Turning compiz off solves the problem, but in lucid release it works pretty with compiz too.

Revision history for this message
Alexander Bondarenko (7stern) wrote :

Summary, bugs appears on distibution and zen kernel with r300g, not using other combiantions.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks, we will probably hit this the day we switch to gallium then. I will mark this bug xorg-edgers for now, as a forward warning...

Changed in mesa (Ubuntu):
status: Incomplete → Confirmed
summary: - [R300] System hangs when using direct rendering
+ [R300g][xorg-edgers] System hangs when using direct rendering
Revision history for this message
Alexander Bondarenko (7stern) wrote : Re: [R300g][xorg-edgers] System hangs when using direct rendering

Thanks for your response, I'll waiting for fix :)

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Tormod, is there any chance to have aufs.ko module in Kernel Mainline PPA kernels? I wanted to test if 2.6.36-rc7 solved the problem on my machine, too on remastered (with xorg-edgers/radeon ppa) Kubuntu 10.10 pendrive but unfortunately I need aufs.ko module in initrd at boot which is not included in that kernels and I can't even find source and configs for these kernels to recompile just the module myself.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Tomasz, you will have to ask the Kernel Team about that. I can only suggest that you do a regular install to your pendrive (instead of a live CD remaster) if it has enough capacity.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Tormod, that's the problem - capacity. I wanted to test everything from pendrive before I'll upgrade from 10.04 and configure stable system at home.
I've read at Ubuntu Wiki that Kernel Team won't include any drivers from Ubuntu kernel to mainline kernels as that kernels are built from vanilla source to test and report bugs upstream.

For now I've applied drm_kms_helper.pool parameter patch for 2.6.35-22-generic kernel, rebuilt only drm modules, pack custom initrd and add option to syslinux to choose that initrd and drm_kms_helper.pool=0 parameter.
It at least boots properly and doesn't bring problems for nouveau driver on my Nvidia Quadro NVS135M based laptop at work.
I'll test if it helped later when I get back to home.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

The patch, that Giacomo Perale posted on fdo bug 29389 with drm_kms_helper.poll=0 kernel parameter fixes the problem for me also.
After over an ~2 hours of testing (1 hour of continous Nexuiz playing with bots) no freeze or any graphic glitches. Tested on default Ubuntu 10.10 kernel (2.6.35-22-generic + this patch).
Before this patch I couldn't play for more than 3-4 minutes without freeze.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

It had to be this link: https://bugs.freedesktop.org/show_bug.cgi?id=29389
I thought launchpad properly interpreted fdo bug links some time ago.

Revision history for this message
Tomasz Czapiewski (xeros) wrote :

I've tested that it didn't break r300c and nouveau drivers and IMO this patch could be proposed for kernel update as temporary fix or after more testing of other drivers it could be set as default disable poll.

Bryce Harrington (bryce)
Changed in mesa (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Tomasz Czapiewski (xeros) wrote :

Now, after over two weeks of testing on different hardware I can confirm that disabling polling fixes the problem and it does not bring any problems for drivers that I've tested: i915, radeon (r200, r300 [tested stable version in Maverick and git compiled packages from xorg-edgers/radeon ppa], r300g [git from xorg-edgers/radeon ppa]), nouveau (both classic mesa and gallium3d from xorg-edgers ppa, but I have to get more luck to get working git revisions of nouveau drivers).

Unfortunately, I haven't been able to test later patch from upstream to disable polling DACs as it didn't compile with 2.6.35 kernel because of "error: ‘force’ undeclared".

tags: added: patch
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for attaching a patch and confirming it solves this bug.

Natty is going to be shipping the gallium enabled r300g, so I'm removing [xorg-edgers], as this issue is directly relevant for natty.

Can you test and confirm that this is still an issue on Natty? Possibly the aforementioned patch was already taken into the kernel.

In any case, given that the fix for this is a kernel patch, this bug needs to be handled as a kernel drm bug rather than as a mesa bug.

summary: - [R300g][xorg-edgers] System hangs when using direct rendering
+ [R300g] System hangs when using direct rendering [patch available]
affects: mesa (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Changed in mesa:
status: Unknown → Fix Released
Revision history for this message
Stefan Bader (smb) wrote :

The patch mentioned in comment #17 appear in the kernel with 2.6.36, so that at least is included already.

commit e58f637bb96d5a0ae0919b9998b891d1ba7e47c9
Author: Chris Wilson <email address hidden>
Date: Fri Aug 20 09:13:36 2010 +0100

    drm/kms: Add a module parameter to disable polling

Though this only adds the option. Does xorg touch the setting or does this need to be reported upstream individually by system to possibly add quirks for those hw?

Changed in mesa:
importance: Unknown → Medium
Revision history for this message
xavier (s.xavier) wrote :

I tried the beta 1, the problem was still there. What should I do to deactivate polling?

Revision history for this message
xavier (s.xavier) wrote :

I don't know if I am doing it the right way, I added "drm_kms_helper.pool=0" in /etc/default/grub, in GRUB_CMDLINE_LINUX and in GRUB_CMDLINE_LINUX_DEFAULT. Then I ran "update-grub" and rebooted. But the system still hangs up after few min when I play a video game for exemple. What should I do?

Revision history for this message
xavier (s.xavier) wrote :

It seems I correctly added the option to deactivate polling, here is a part of my /boot/grub/grub.cfg:
 linux /boot/vmlinuz-2.6.38-8-generic root=UUID=a2cb3f98-8c76-4a70-b6d3-d76a04b05f3a ro drm_kms_helper.poll=0 quiet splash vt.handoff=7

I tried with and without xorg-edgers ppa, but the bug is still there in both cases.

Revision history for this message
xavier (s.xavier) wrote :

With a clean install of 11.04, I encountered no problems. I guess it can be closed.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Closing per comment #26. Thanks.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.