Bug 473895

Summary: kernel modesetting, rectagles instead of glyphs, pixmaps/icons broken
Product: [Fedora] Fedora Reporter: Jan Martinek <honza>
Component: kernelAssignee: Dave Airlie <airlied>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: bernie+fedora, htl10, kernel-maint, mschmidt, quintela, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-09 11:37:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 477140    
Bug Blocks:    
Attachments:
Description Flags
screenshot, glyphs rendered as solid rectangles
none
radeon: fix IGP GART size setting
none
screen corruption/tearing with nomodeset none

Description Jan Martinek 2008-12-01 11:09:30 UTC
Description of problem:
If KMS is active, glyphs in fonts change their shape to solid rectangle which renders text unreadable. The change seems to be gradual and takes effect after several minutes of work in X. See attached screenshot.

If KMS is NOT active (nomodeset kernel parameter is set), this does not happen.

Version-Release number of selected component (if applicable):
kernel-2.6.27.7-130.fc10.x86_64
xorg-x11-server-common-1.5.3-5.fc10.x86_64
xorg-x11-drv-ati-6.9.0-59.fc10.x86_64
$ lspci | grep VGA
01:05.0 VGA compatible controller: ATI Technologies Inc RS690 [Radeon X1200 Series]

How reproducible:
100%, but I do not know exactly the action

Steps to Reproduce:
1. boot with KMS active (no kernel parameter added)
2. Browse the internet or otherwise use X applications.
3. Some glyps start to be rendered as solid rectangle and situation is gradually getting worse, still more and more glyphs become unreadable. Also, some icons disappear or get ugly/broken.

The font glyphs, pixmaps and icons should be rendered as intended.

Comment 1 Jan Martinek 2008-12-01 11:11:48 UTC
Created attachment 325214 [details]
screenshot, glyphs rendered as solid rectangles

Comment 2 Michal Schmidt 2008-12-01 12:33:59 UTC
The same bug shows up on my laptop, also with RS690. To reproduce it, I open Slashdot.org main page in Firefox and repeatedly zoom in, out and scroll. Still, it can take a few minutes.

I cannot reproduce it with kernel 2.6.27.5-123. I've seen it with 2.6.27.7-128. 

From looking at the diff between the two versions, I started suspecting the GART sizing change in the radeon driver. Another hint is I'm getting 'Unable to use IGP GART table size 524288' in dmesg.

I am now testing a workaround: Adding the parameter 'gartsize=32' to radeon module. So far looks good.

I think I can see a bug in radeon_set_igpgart(). switch(dev_priv->gart_size) assumes the size is in megabytes, but it is in bytes. When it prints the error message, it attempts to fall back to 32 MB GART size, but I'm afraid the original size is still preserved in several variables. I'll test a patch and post it soon.

Comment 3 Michal Schmidt 2008-12-01 13:49:41 UTC
Created attachment 325233 [details]
radeon: fix IGP GART size setting

I am now running with this patch instead of the workaround. The error message is gone. The black rectangles have not appeared yet. I'll let you know should they reappear.

Comment 4 Michal Schmidt 2008-12-01 18:34:24 UTC
Scratch build of the kernel with the patch applied (x86_64 only): http://koji.fedoraproject.org/koji/taskinfo?taskID=967454

Comment 5 Hin-Tak Leung 2008-12-02 03:24:40 UTC
A bug I filed (bug 473815) seems to look very similiar!

Comment 6 Hin-Tak Leung 2008-12-02 03:26:46 UTC
*** Bug 473815 has been marked as a duplicate of this bug. ***

Comment 7 Dave Airlie 2008-12-02 04:01:51 UTC
Thanks Michal,
kernel-2.6.27.7-134.fc10

is in koji with this patch. Let me know if it works.

Comment 8 Michal Schmidt 2008-12-02 08:40:57 UTC
kernel-2.6.27.7-134.fc10 works for me.

Comment 9 Hin-Tak Leung 2008-12-02 09:14:25 UTC
ditto.

Comment 10 Hin-Tak Leung 2008-12-02 18:09:57 UTC
Replied too early... while the screen corruption is fixed, resume for suspend doesn't work - have a backlit blank screen; does not respond to ctrl-alt-f*.
according to syslog, it looks like networkmanager restarts correctly, so it should be possible to lock in from outside (the lapop) to try something, if there is something to try. syslog itself says resume error:

----------
Dec  2 17:06:34 localhost kernel: [drm] Num pipes: 1
Dec  2 17:06:34 localhost kernel: [drm:radeon_resume] *ERROR* 
Dec  2 17:06:34 localhost kernel: [drm] Loading RS690/RS740 Microcode
Dec  2 17:06:34 localhost kernel: [drm] Num pipes: 1
Dec  2 17:06:34 localhost kernel: [drm] writeback test succeeded in 1 usecs
Dec  2 17:06:34 localhost kernel: [drm] LVDS-8: set mode  9
-----------

I also have these leftover from my fglrx days, just in case it matters.

# more  /etc/pm/config.d/video
POST_VIDEO=false
DISPLAY_QUIRK_S3_BIOS=true

to be honest I have not tried suspend/resume in this configuration (EXA+modeset)
before, but suspend/resume with XAA+nomodeset works.

Comment 11 Hin-Tak Leung 2008-12-02 20:03:29 UTC
Created attachment 325417 [details]
screen corruption/tearing with nomodeset

Since I am not having suspend/resume (it worked every other time so far), I thought I'll try putting nomodeset back, without xorg.conf (i.e. EXA) - and I am getting screen corruption/tearing as shown. 

xorg-x11-drv-ati-6.9.0-61.fc10
kernel-2.6.27.7-134.fc10

(this probably should be a separate bug, since this screenshot is about EXA+nomodeset - but I am just expressing my general frustration that switching between EXA/XAA, modeset/nomodeset, radeon/radeonhd, none really work happily.
The best for general usage - for me - is still XAA+nomodeset)

Comment 12 Fedora Update System 2008-12-07 04:16:56 UTC
kernel-2.6.27.7-134.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-10772

Comment 13 Fedora Update System 2008-12-09 11:36:48 UTC
kernel-2.6.27.7-134.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Bernie Innocenti 2008-12-21 10:24:34 UTC
Please note that the kernel containing the fix, kernel-2.6.27.7-134.fc10, introduces a regression at least on some hardware: #477140 .