Bug 60827

Summary: X under radeon driver crashes after resuming from hibernation
Product: Drivers Reporter: archiesix
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: NEW ---    
Severity: high CC: alexdeucher, szg00000, tianyu.lan
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 3.10.10 Subsystem:
Regression: No Bisected commit-id:

Description archiesix 2013-09-01 10:21:08 UTC
With Linux kernel 3.10.10 and Gnome Shell 3.8.3 under ati-dri 9.2.0 radeon 3D acceleration, when hibernating the following error message appears :

radeon 0000:01:00.0: GPU lockup CP stall for more than 10000msec
radeon 0000:01:00.0: GPU lockup (waiting for 0x0000000000000006 last fence id 0x000000000000
[drm:r600_uvd_ib_test] *ERROR* radeon: fence wait failed (-35).
[drm:radeon_ib_ring_tests] *ERROR* radeon: failed testing IB on ring 5 (-35).

The hibernation then completes and the resume is apparently also ok. However, after resuming the X server (under Gnome Shell) keeps crashing, for instance when trying to resize a window. Various error messages are logged, such as

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"

Gdm is run again and, upon login, the X server again crashes like before. After rebooting the system becomes again stable.

Kernels 3.9.x behave correctly. Kernels 3.10.x with x < 10 showed corrupted graphics under Gnome Shell.
Comment 1 Lan Tianyu 2013-09-02 01:01:01 UTC
This should be a gpu issue rather then hibernation/suspend bug. So reassign to associated category.
Comment 2 Alex Deucher 2013-09-03 13:40:07 UTC
Can you bisect?
Comment 3 Alex Deucher 2013-09-03 13:41:35 UTC
You might also try a newer kernel.  It looks like the uvd ring that is failing to resume properly.  There are a number of fixes for suspend/resume related problems with uvd in 3.11 (most of which should end up in stable).
Comment 4 archiesix 2013-09-04 13:50:49 UTC
I am sorry, I cannot completely bisect : I am running Archlinux on a production machine and I have only a few set of kernel packages saved. I can tell you that :

- 3.11.1 has the very same problem
- The problem was already present in 3.10.9 This kernel shows also corrupted graphics in Gnome-Shell
- 3.9.9 is ok (no corrupted graphics, no problem with hibernation).

I have a RV740 graphics card on a Dell Precision M6500 notebook.
Comment 5 Alex Deucher 2013-09-04 13:59:37 UTC
Make sure your kernel has this patch:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=022374c02e357ac82e98dd2689fb2efe05723d69
make sure you power off the system completely between kernel tests.
Comment 6 archiesix 2013-09-04 16:40:39 UTC
I powered off completely the system between each test. The patch is included
starting from kernel 3.10.10
Comment 7 archiesix 2013-09-17 10:18:13 UTC
The problem persists in Kernel 3.11.1
Comment 8 archiesix 2013-10-14 08:30:32 UTC
I did some more digging : the hibernation problem is already present in kernel 3.9.11 while it is absent in 3.9.9. So, it seems that it was introduced either in 3.9.10 or 3.9.11. The last kernel that I could check is 3.11.3 and still poses the same problem. I hope that this will help to solve the problem.
Comment 9 archiesix 2013-10-15 18:34:11 UTC
The bug was introduced in kernel 3.9.11. With kernels 3.9.9 and 3.9.10 when hibernating I get the error :

No irq handler for vector (irq -1)

displayed on the console, but otherwise everything seems ok.