Bug 538838

Summary: radeonhd [RV670] Switching from VT back to X causes X not to respond
Product: [openSUSE] openSUSE 11.2 Reporter: JP Rosevear <jpr>
Component: X.OrgAssignee: Egbert Eich <eich>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Major    
Priority: P3 - Medium CC: eich, markgray+to-suse, sndirsch
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: xorg.conf, X logs and var log messages

Description JP Rosevear 2009-09-13 14:05:49 UTC
Created attachment 318012 [details]
xorg.conf, X logs and var log messages

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080200 SUSE/3.0.13-0.1.2 Firefox/3.0.13

Creating a second X server via GNOME's switch user functionality allows login but when I do Ctrl-Alt-F7 to go back to the orginal nothing draws on the screen nor does Ctrl-Alt-F8 work.  I am using an xorg.conf file because I need VirtualSize set for my dual head setup but it happened without this too.

Reproducible: Always

Steps to Reproduce:
1. Main Menu ->  Logout -> Switch User
2. Login as another user
3. Ctrl-Alt-F7
Actual Results:  
Blank screen

Expected Results:  
Return to previous X server desktop

Looks like there is a problem handing off DRM control
Comment 1 Mark Gray 2009-09-13 14:38:36 UTC
Please attach the information requested by the webpage:

http://en.opensuse.org/Bugs:X

Please do not tar or zip these files, but use separate text/plain attachments. It's much easier to work with logfiles this way.  Thanks.
Comment 2 Stefan Dirsch 2009-09-13 15:08:08 UTC
Xorg.0.log

[...]
(WW) RADEONHD(0): DRMCPIdle: DRM CP IDLE returned BUSY!
(WW) RADEONHD(0): DRMCPIdle: DRM CP IDLE returned BUSY!
(WW) RADEONHD(0): DRMCPIdle: DRM CP IDLE returned BUSY!
[...]

messages:
[...]
Sep 13 09:56:10 linux-u9xk kernel: [64209.824779] [drm] wait idle failed status : 0xA0003030 0x00000003
Sep 13 09:56:10 linux-u9xk kernel: [64210.030749] [drm] wait idle failed status : 0xA0003030 0x00000003
Sep 13 09:56:10 linux-u9xk kernel: [64210.236381] [drm] wait idle failed status : 0xA0003030 0x00000003
Sep 13 09:56:10 linux-u9xk kernel: [64210.237566] BUG: unable to handle kernel NULL pointer dereference at (null)
Sep 13 09:56:10 linux-u9xk kernel: [64210.237580] IP: [<ffffffffa044815d>] radeon_read_ring_rptr+0x5d/0x70 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237603] PGD 0 
Sep 13 09:56:10 linux-u9xk kernel: [64210.237608] Oops: 0000 [#1] SMP 
Sep 13 09:56:10 linux-u9xk kernel: [64210.237613] last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
Sep 13 09:56:10 linux-u9xk kernel: [64210.237623] CPU 0 
Sep 13 09:56:10 linux-u9xk kernel: [64210.237627] Modules linked in: radeon drm joydev af_packet rfcomm sco bridge stp llc bnep binfmt_misc l2cap snd_pcm_oss snd_mixer_oss snd_seq vmnet vmblo
ck vmci vmmon fuse loop dm_mod sr_mod cdrom ide_pci_generic btusb ohci1394 amd74xx ppdev sg snd_usb_audio snd_usb_lib snd_rawmidi snd_seq_device snd_hwdep bluetooth rfkill parport_pc ieee1394
 ide_core snd_intel8x0 snd_ac97_codec ata_generic ac97_bus tg3 parport snd_pcm floppy snd_timer button amd64_edac_mod pcspkr edac_core snd snd_page_alloc pata_amd i2c_amd8111 i2c_amd756 amd_r
ng k8temp shpchp pci_hotplug edd sata_sil fan thermal processor thermal_sys [last unloaded: preloadtrace]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237726] Pid: 4553, comm: Xorg Not tainted 2.6.31-rc9-7-default #1 To Be Filled By O.E.M.
Sep 13 09:56:10 linux-u9xk kernel: [64210.237733] RIP: 0010:[<ffffffffa044815d>]  [<ffffffffa044815d>] radeon_read_ring_rptr+0x5d/0x70 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237747] RSP: 0018:ffff88003f0dba18  EFLAGS: 00010246
Sep 13 09:56:10 linux-u9xk kernel: [64210.237753] RAX: ffff88007e50cb80 RBX: ffff88007e5d0800 RCX: 000000000000002c
Sep 13 09:56:10 linux-u9xk kernel: [64210.237759] RDX: 0000000000002cb0 RSI: 0000000000000000 RDI: ffff88007e5d0800
Sep 13 09:56:10 linux-u9xk kernel: [64210.237765] RBP: ffff88003f0dba28 R08: ffff88003f0da000 R09: 0000000000000000
Sep 13 09:56:10 linux-u9xk kernel: [64210.237772] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000010
Sep 13 09:56:10 linux-u9xk kernel: [64210.237778] R13: ffff88007e5d0800 R14: ffff88007ec33800 R15: ffff88007ec33920
Sep 13 09:56:10 linux-u9xk kernel: [64210.237786] FS:  00007f43f63326f0(0000) GS:ffffc90000000000(0000) knlGS:00000000f7118970
Sep 13 09:56:10 linux-u9xk kernel: [64210.237793] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 13 09:56:10 linux-u9xk kernel: [64210.237798] CR2: 0000000000000000 CR3: 0000000001001000 CR4: 00000000000006f0
Sep 13 09:56:10 linux-u9xk kernel: [64210.237805] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Sep 13 09:56:10 linux-u9xk kernel: [64210.237812] DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400
Sep 13 09:56:10 linux-u9xk kernel: [64210.237819] Process Xorg (pid: 4553, threadinfo ffff88003f0da000, task ffff88003e4bc300)
Sep 13 09:56:10 linux-u9xk kernel: [64210.237825] Stack:
Sep 13 09:56:10 linux-u9xk kernel: [64210.237828]  ffff88003e4bc6e8 000000009c8f463f ffff88003f0dba48 ffffffffa04481df
Sep 13 09:56:10 linux-u9xk kernel: [64210.237837] <0> 0000000000013a00 000000009c8f463f ffff88003f0dba78 ffffffffa0448bfb
Sep 13 09:56:10 linux-u9xk kernel: [64210.237846] <0> ffff88003adac400 000000009c8f463f ffff88003f0da000 ffff88007e5d0800
Sep 13 09:56:10 linux-u9xk kernel: [64210.237857] Call Trace:
Sep 13 09:56:10 linux-u9xk kernel: [64210.237886]  [<ffffffffa04481df>] radeon_get_ring_head+0x6f/0x80 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237900]  [<ffffffffa0448bfb>] radeon_commit_ring+0x6b/0xe0 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237918]  [<ffffffffa045c5d6>] r600_do_cp_idle+0xd6/0x150 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237942]  [<ffffffffa044c726>] radeon_do_release+0x76/0x220 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.237960]  [<ffffffffa0450738>] radeon_driver_lastclose+0x78/0xa0 [radeon]
Sep 13 09:56:10 linux-u9xk kernel: [64210.238005]  [<ffffffffa04132c5>] drm_lastclose+0x55/0x330 [drm]
Sep 13 09:56:10 linux-u9xk kernel: [64210.238032]  [<ffffffffa0413b58>] drm_release+0x328/0x410 [drm]
Sep 13 09:56:10 linux-u9xk kernel: [64210.238050]  [<ffffffff81157a39>] __fput+0xe9/0x220
Sep 13 09:56:10 linux-u9xk kernel: [64210.238061]  [<ffffffff81157b98>] fput+0x28/0x50
Sep 13 09:56:10 linux-u9xk kernel: [64210.238071]  [<ffffffff81153477>] filp_close+0x67/0xb0
Sep 13 09:56:10 linux-u9xk kernel: [64210.238082]  [<ffffffff8106ee87>] put_files_struct+0x87/0x100
Sep 13 09:56:10 linux-u9xk kernel: [64210.238094]  [<ffffffff8106ef68>] exit_files+0x68/0x90
Sep 13 09:56:10 linux-u9xk kernel: [64210.238104]  [<ffffffff81071799>] do_exit+0x169/0x390
Sep 13 09:56:10 linux-u9xk kernel: [64210.238113]  [<ffffffff81071a18>] do_group_exit+0x58/0xe0
Sep 13 09:56:10 linux-u9xk kernel: [64210.238123]  [<ffffffff81081b29>] get_signal_to_deliver+0x1e9/0x420
Sep 13 09:56:10 linux-u9xk kernel: [64210.238136]  [<ffffffff8100beef>] do_signal+0x7f/0x1f0
Sep 13 09:56:11 linux-u9xk kernel: [64210.238146]  [<ffffffff8100c0cf>] do_notify_resume+0x6f/0x80
Sep 13 09:56:11 linux-u9xk kernel: [64210.238169]  [<ffffffff8100c6bb>] sysret_signal+0x7e/0xcf
Sep 13 09:56:11 linux-u9xk kernel: [64210.238187]  [<00007f43f43cc407>] 0x7f43f43cc407
Sep 13 09:56:11 linux-u9xk kernel: [64210.238197] Code: 70 18 8b 06 48 8b 55 f8 65 48 33 14 25 28 00 00 00 75 1c c9 c3 66 0f 1f 84 00 00 00 00 00 48 8b 87 10 01 00 00 89 f6 48 03 70 18 <8b> 0
6 eb d5 e8 fa 46 c2 e0 66 2e 0f 1f 84 00 00 00 00 00 55 48 
Sep 13 09:56:11 linux-u9xk kernel: [64210.238262] RIP  [<ffffffffa044815d>] radeon_read_ring_rptr+0x5d/0x70 [radeon]
Sep 13 09:56:11 linux-u9xk kernel: [64210.238279]  RSP <ffff88003f0dba18>
Sep 13 09:56:11 linux-u9xk kernel: [64210.238287] CR2: 0000000000000000
Sep 13 09:56:11 linux-u9xk kernel: [64210.238297] ---[ end trace 4068aca1556e3b76 ]---
Sep 13 09:56:11 linux-u9xk kernel: [64210.238305] Fixing recursive fault but reboot is needed!
[...]
Comment 3 Stefan Dirsch 2009-09-13 15:10:38 UTC
> I am using an xorg.conf file because I need VirtualSize set for my dual head 
> setup ...

Should no longer be required with next Milestone. See Bug #519261 and Bug #519260.
Comment 4 Matthias Hopf 2009-09-16 15:38:42 UTC
Luc, this very much looks like its related to the issue we discussed earlier (and you wanted to buy a r5xx car for ;-) - even though this is r6xx.

What do you think?
Comment 5 Matthias Hopf 2009-10-01 18:31:08 UTC
Luc: ping
Comment 6 JP Rosevear 2009-10-29 16:29:54 UTC
Still an issue in latest factory.
Comment 7 Stefan Dirsch 2009-11-06 21:14:07 UTC
Latest change:

-------------------------------------------------------------------
Fri Nov  6 14:24:21 CET 2009 - eich@suse.de

- Updated driver:
  [...]
  * Disable DRI/Acceleration for R6XX and up until fix for lockups is found.

http://download.opensuse.org/repositories/X11:/Drivers:/Video/openSUSE_Factory/i586/xorg-x11-driver-video-radeonhd-1.3.0_20091106_619706-2.1.i586.rpm

http://download.opensuse.org/repositories/X11:/Drivers:/Video/openSUSE_Factory/x86_64/xorg-x11-driver-video-radeonhd-1.3.0_20091106_619706-2.1.x86_64.rpm

Does this fix the issue?
Comment 8 JP Rosevear 2009-11-09 15:59:26 UTC
(In reply to comment #7)
> Latest change:
> 
> -------------------------------------------------------------------
> Fri Nov  6 14:24:21 CET 2009 - eich@suse.de
> 
> - Updated driver:
>   [...]
>   * Disable DRI/Acceleration for R6XX and up until fix for lockups is found.
> 
> http://download.opensuse.org/repositories/X11:/Drivers:/Video/openSUSE_Factory/i586/xorg-x11-driver-video-radeonhd-1.3.0_20091106_619706-2.1.i586.rpm
> 
> http://download.opensuse.org/repositories/X11:/Drivers:/Video/openSUSE_Factory/x86_64/xorg-x11-driver-video-radeonhd-1.3.0_20091106_619706-2.1.x86_64.rpm
> 
> Does this fix the issue?

Yes, fixes it.  A few more notes while playing with this:

1) I actually don't need to start a second X server to have this happen, just log in, Ctrl-Alt-F1 then Alt-F7 to get the problem

2) I'm on x86_64
Comment 9 Matthias Hopf 2009-11-20 16:58:56 UTC
Ok, R6xx acceleration still has a major race / other problem on radeonhd, Egbert is tracking that.
Comment 10 Stefan Dirsch 2010-08-14 16:19:59 UTC
Still the same issue with openSUSE 11.3 (add boot option 'nomodeset')? What are the results on 11.3 with radeon driver instead (without boot option 'nomodeset').
Comment 11 Stefan Dirsch 2010-09-11 11:54:12 UTC
> (In reply to comment #7)
> > Does this fix the issue?
> 
> Yes, fixes it.  

So let's close it as fixed finally.

(In reply to comment #8)
> Ok, R6xx acceleration still has a major race / other problem on radeonhd,
> Egbert is tracking that.

==> different issues should be handled seperately.