Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359569 - KMS pageflip support in kernel 2.6.38 causes heavy screen corruption with radeon RV730 (HD 4670)
Summary: KMS pageflip support in kernel 2.6.38 causes heavy screen corruption with rad...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
Depends on:
Reported: 2011-03-19 22:36 UTC by dark_mail
Modified: 2015-02-22 02:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

glitched firefox window with compositing enabled (compositing_1.jpg,503.50 KB, image/jpeg)
2011-03-22 16:45 UTC, dark_mail
command line rendered instead of normal background, compositing enabled (compositing_2.jpg,605.77 KB, image/jpeg)
2011-03-22 16:47 UTC, dark_mail
logout screen with glitching, compositing enabled (compositing_3.jpg,467.77 KB, image/jpeg)
2011-03-22 16:51 UTC, dark_mail

Note You need to log in before you can comment on or make changes to this bug.
Description dark_mail 2011-03-19 22:36:10 UTC
Phenom X4
HD 4670

KDE 4.4.5 (compositing enabled)

With "EnablePageFlip" turned on in the xorg.conf, I get heavy screen corruption with a Radeon HD4670.
It seems to be easily triggered by fullscreen windows/overlays (like fullscreen flash videos).

After that, the screen becomes heavily corrupted, flickering and glitches occur, where background windows (like gkrellm) are (partially) being rendered on top of other windows.

In some cases, the monitor loses the signal and goes to powersave for a few seconds, then regains signal.
Switching to a commandline works (sometimes after several attempts), commandline shows no signs of glitching, but switching back to X exhibits the problems again.
Turning off the KDE compositor doesn't help, corruption still occurs.

I have found some forum entries on Color Tiling causing problems, but none regarding page flipping. If this is not the right place to file this bug, I'd appreciate a pointer to in the right direction (kernel, radeon driver, mesa, X server in general, ...).

emerge --info output follows

Tell me if you need additional info/testing.

Reproducible: Always

Steps to Reproduce:
1. Enable KMS page flipping via 'Option "EnablePageFlip" "on"'
2. maximize/unmaximize windows (worked with flash wideos in firefox here)
Actual Results:  
screen starts glitching, stacked windows and desktop background are being rendered in random order (it seems)

Expected Results:  
no glitching

emerge --info
Portage (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.11.3-r0, 2.6.38-gentoo x86_64)
System uname: Linux-2.6.38-gentoo-x86_64-AMD_Phenom-tm-_9350e_Quad-Core_Processor-with-gentoo-2.0.1
Timestamp of tree: Sat, 19 Mar 2011 16:30:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 1.3.7-r1, 2.1.11-r3
dev-lang/python:     2.6.6-r2, 3.1.3-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.5
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers: (sys-kernel/linux-headers)
CFLAGS="-march=athlon64 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de ja"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion berkdb blender-game boost branding bzip2 cairo caps cdda cddb cdinstall cdparanoia cdr cjk cli connectionstatus consolekit cracklib crypt cscope css cups curl cvs cxx dbus disk-partition divx dri dts dvd dvdr embedded emboss encode exif fam ffmpeg firefox flac fluidsynth foomaticdb fortran ftp gcj gd gdbm gdu gif gimp gmedia gnutls gphoto gphoto2 gpm gtk hddtemp history hou iconv icq id3 id3tag imagemagick ipv6 jabber java jpeg jpeg2k kde kerberos ladspa latex lcms ldap libnotify libsamplerate libwww lightning lm_sensors loop-aes lzo mad matroska melt mikmod mjpeg mmap mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musepack ncurses nls nowin nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp oscar otr pam pango pcre pdf perl player plotutils png policykit postscript ppds pppd python qt3support qt4 quicktime raw readline realmedia samba sbdfile scanner schroedinger sdl sdlsession semantic-desktop session smp sou soundtouch spell sse sse2 ssl startup-notification subversion svg symlink sysfs tcpd theora threads tiff truetype twolame udev unicode usb vamp videos vim-syntax visualization vorbis wavpack wmf wmp wxwindows x264 xcb xcomposite xine xml xorg xpm xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de ja" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-22 02:43:55 UTC
It would be interesting to see if you could work around the problem by downgrading (for instance, the kernel).
Comment 2 dark_mail 2011-03-22 16:33:40 UTC
Sorry, I forgot to mention that page flipping for R700 ASICS was only included with 2.6.38, so older versions basically run without page flipping anyway. 

I tried to reproduce the issue today (after updating a few Xorg related packages that went stable since the last sync) with a camera on hand, but was only partially successful. I used some youtube videos and rapidly maximized/unmaximized them.
I can reproduce that turning off page flipping makes all the mentioned problems go away.
But now I tend to get more of a lockup instead of glitching.
When compositing is off (via kwinrc and xorg.conf) I get a screen similar to a kernel panic (without the keyboard LEDs blinking, though) with some backtrace information. The computer locks up completely and has to be rebooted hard. I have photos of a few lockup events, the text of the backtrace is rather blurry and cut off in some instances, but I can upload the images if someone can make use of them.
With compositing enabled, I sometimes get a straight lockup like without compositing, but in other instances I get an amalgam of several windows (plus command line). I'll either attach screen photos or upload and link them here.

I did find some bug reports on the bug tracker that look kinda similar, so they may or may not be related. So maybe taking my problem to them is the way to go. In any case, aynone who can make something of this is welcome to say so.
Comment 3 dark_mail 2011-03-22 16:45:01 UTC
Created attachment 266901 [details]
glitched firefox window with compositing enabled

firefox window with command line rendered in place of the flash video and gkrellm (at left margin)
Comment 4 dark_mail 2011-03-22 16:47:48 UTC
Created attachment 266903 [details]
command line rendered instead of normal background, compositing enabled

after switching from the command line back to X, this is rendered; note the cursor (still responsive) and the corruption near the top after the cursor moved there
Comment 5 dark_mail 2011-03-22 16:51:06 UTC
Created attachment 266905 [details]
logout screen with glitching, compositing enabled

gkrellm (left margin) and panel (bottom) overlap the K menu.
There was no flickering to be seen like at the time of my initial posting, however.
Comment 6 Jakub Caban 2011-03-25 10:02:43 UTC
I have same effect here with Radeon HD3200. When playing video fullscreen via some GUI API (mplayer from command-line works without problems), any attempt to exit fullscreen results in black screen with just mouse cursor and no possibility to do anything.

How should I disable "EnablePageFlip" in xorg.conf? I have no Device section right now for graphics, as it was not needed since some time. I will test with it disabled gladly.
Comment 7 dark_mail 2011-03-25 15:46:32 UTC
My device section looks like this (I played a bit with Color tiling, but that didn't do any good anyway). Don't exactly know if all the bits are necessary nowadays, I could try running X without the xorg.conf (probably not before sunday).

Section "Device"
        Identifier  "HD4670"
        Driver      "radeon"
        Option  "AccelMethod"   "EXA"
        Option  "ColorTiling"   "off"
        Option  "EnablePageFlip"        "off"
#       Option  "EnablePageFlip"        "on"

        BusID       "PCI:1:0:0"
Comment 8 Jakub Caban 2011-03-25 16:48:39 UTC
I confirm - disabling pageflip here solved all the issues.

running without xorg.conf enables it - I had no xorg.conf before, and problems were as I've described.
Comment 9 Jakub Caban 2011-03-30 09:49:55 UTC

mesa-9999 (overlay)
libdrm-9999 (overlay)
xorg-server- (overlay)

(don't know if those overlayed ones are important).

the problem disappears. Fixed upstream than?
Comment 10 dark_mail 2011-03-30 12:48:32 UTC
Problem still persists for me. With the versions mentioned in Comment #9 I still get corruption on flash videos.
I didn't check mplayer with earlier versions, but currently I see no issues using it (smplayer in my case).
Actually, display corruption already occurs during startup of firefox. In the top left corner a square with the background image of kdm is visible for a moment.

On another note, Newerwinter Nights also does a good job of crashing X. It hangs on the level loading screen (monitor going to standby every few seconds) and has to be killed. The display recovers after the first time, but generally after the second time the machine locks up completely, no reaction to input.

If additional debugging info is needed, I can go and set up an ssh server to try and access the system remotely after it crashes. But it would be nice to know what info is needed/useful.
Comment 11 Mike Pagano gentoo-dev 2011-03-31 18:34:16 UTC
Please open a bug at and post the url back here
Comment 12 Jakub Caban 2011-03-31 18:51:13 UTC
My problems hits again. So my assumptions in last comment were wrong - not fixed for me either.
Comment 13 dark_mail 2011-04-05 23:02:30 UTC
It looks like I've found a solution on the xorg bugtracker.

The attachment ( ) mentioned in seems to solve my issues as far as I can see, applied against xorg-server-

I still have some small glitches, but they are only short-lived and probably a different issue, anyway.

I haven't found the proposed patch in the freedesktop git repository. Maybe we need to cherry-pick the patch until it or an equivalent replacement is incorporated?

Also, sorry for taking so long to respond, was busy with non-computer stuff ... :-)
Comment 14 Stratos Psomadakis (RETIRED) gentoo-dev 2011-04-21 12:45:04 UTC
Added the bug report from freedesktop bugzilla to URL.
CCing x11 herd, since the patch regards xorg-xserver.
Comment 15 Mike Pagano gentoo-dev 2011-04-25 17:01:58 UTC
Comment 16 Matt Turner gentoo-dev 2015-02-22 02:07:37 UTC
Looks like this was fixed years ago.