Bug 23290

Summary: Resume broken with new ATI stack
Product: xorg Reporter: Bryce Harrington <bryce>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high CC: alex.hunziker, jmxorg, mail, silvio.frischi, tomm
Version: 7.4 (2008.09)Keywords: regression
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log.old
none
Screenshot illustrating the problem
none
Screenshot during shutdown none

Description Bryce Harrington 2009-08-13 12:35:17 UTC
Created attachment 28602 [details]
Xorg.0.log.old

Forwarding this bug from Ubuntu reporter Alexander Hunziker:
http://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/411294

[Problem]
Screen corruption shown on resume when using KMS from the radeon-rewrite branch

[Versions]
libdrm - 2.4.12+git20090806.d74c67fb-0ubuntu1 
linux - 2.6.31-6.25~radeon2
mesa - 7.6.0~git20090805.ac3de85e-0ubuntu1
xserver-xorg-video-ati - 1:6.12.99+git20090805.bd03977e-0ubuntu2

[Original Description]
When using the new ATI stack from the X-swat PPA (radeon-rewrite with DRI2 and KMS), suspend is broken on my Thinkpad T60 with ATI Mobile X1400. After waking up the system shows colorful vertical bars on screen. I'll attach a screenshot of that as soon as I can.

Also, dmesg is full of the following messages:

[ 9315.666488] [drm:radeon_ib_schedule] *ERROR* radeon: couldn't schedule IB(7).
[ 9315.666491] [drm:radeon_cs_ioctl] *ERROR* Faild to schedule IB !


[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
	Subsystem: Lenovo Device [17aa:2015]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon Mobility X1400 [1002:7145]
	Subsystem: Lenovo Device [17aa:2006]
Comment 1 Alexander Hunziker 2009-08-14 02:59:46 UTC
Created attachment 28618 [details]
Screenshot illustrating the problem
Comment 2 Alexander Hunziker 2009-08-14 03:03:40 UTC
Created attachment 28619 [details]
Screenshot during shutdown

On the first screenshot attached, one can see a square that moves when I move the mouse pointer.

After "blindly" shutting down the machine, the screen turns orange (presumable because of the Ubuntu usplash being orange), see second screenshot.
Comment 3 Yang Zhao 2009-08-14 11:38:20 UTC
Seeing this problem also on a T60 with a M52.

It's not LVDS specific, and the same corruption also occurs on externally connected monitors.

Also, the corruption actually happens before kernel finishes suspending. On suspend-to-disk, corruption is triggered around the time kernel starts writing the image to disk.

Appears to be a Thinkpad-specific BIOS quirk.
Comment 4 Yang Zhao 2009-08-17 08:45:06 UTC
Duplicate of #23273 ?
Comment 5 Jörg Mayer 2009-08-24 07:56:38 UTC
Yes, the pictures look very familiar :-)
Note that I do not see the bars before suspend - but as my system currently doesn't support suspend-to-disk, I can't verify whether that's a suspend-to-disk vs. suspend-to-ram thing.
Comment 6 Jörg Mayer 2009-08-24 08:01:32 UTC
I probably should have mentioned that I opened bug 23479 about that. That bug also contains the logs that come up during resume.
Comment 7 Tom Morton 2009-09-02 06:15:24 UTC
Can confirm seeing this on my Thinkpad T60 with radeon x1300 mobile.

Corruption just as in those screenshots. System still 'up' (I can switch VT and see different garbled corruption patterns, and do ctrl-alt-delete to initiate restart)
Comment 8 David Kiliani 2009-09-11 03:37:11 UTC
Same problem here with 2.6.31 kernel, xorg-server and radeon driver from git (as of today). Kernel commandline option "nomodeset" is a workaround for me, so the problem is obviously KMS related.
Comment 9 Silvio Frischknecht 2009-10-10 06:44:46 UTC
I was just wondering could it be that this is a 64-bit problem? Or are there also people around who experience this with a 32-bit kernel?
Comment 10 Alexander Hunziker 2009-10-10 07:18:34 UTC
I'm on 32 bit
Comment 11 David Kiliani 2009-10-13 04:31:51 UTC
I just checked out the vanilla 2.6.32-rc4 kernel with the KMS initialization path changes and the bug still occurs. I'm also on 32bit here.
Comment 12 Tom Morton 2009-10-13 07:23:07 UTC
Is everyone who sees this bug on a Thinkpad T60?
Comment 13 David Kiliani 2009-10-13 07:32:13 UTC
Thinkpad T60 with ATI X1400 here.

Is it possible / helpful to supply any additional data, like logs or memory dumps?
Comment 14 Jörg Mayer 2009-11-26 13:51:42 UTC
*** Bug 23479 has been marked as a duplicate of this bug. ***
Comment 15 Jörg Mayer 2009-11-26 13:53:08 UTC
eading http://airlied.livejournal.com/68550.html from 
describes how the bug was fixed.
Link to the fix:
http://people.freedesktop.org/~airlied/scratch/0002-drm-radeon-kms-read-back-register-before-writing-in-.patch
The bug can also be found in redhats bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=527874
where it is marked as fixed. Unfortunately that is not where non-redhat/fedora
users would look :-(

I can confirm that this fixes my problem.
Not closing it yet as it isn't part of the kernel.org sources yet.
Comment 16 Michel Dänzer 2009-11-28 03:31:07 UTC
*** Bug 23273 has been marked as a duplicate of this bug. ***
Comment 17 Jörg Mayer 2009-12-01 02:25:32 UTC
The patch has become part of the kernel.org tree with 2.6.32-rc8-git2
Closing

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.