Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256381 - xf86-video-intel: UXA screen corruption when logging out of X
Summary: xf86-video-intel: UXA screen corruption when logging out of X
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-26 06:38 UTC by Marc Elser
Modified: 2009-03-07 17:42 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Elser 2009-01-26 06:38:13 UTC
When using the x11 overlay and dri2/uxa (i915 driver) with the new intel driver, I get a screen corruption when I log out of kde. It doesn't matter if I use "startx" or "kdm" but after lgging out my screen looks like a distorted picture of my desktop instead of the console or the kde logon screen. Switching back to AccelMethod "EXA" in xorg.conf fixes this.

Reproducible: Always

Steps to Reproduce:
1. do startx or launch kde through kdm
2. exit kde through the logout button
3. watch the corrupted screen

Actual Results:  
cannot continue to work after logging out of kde with dri2/uxa enabled as screen is garbled instead of console showing

Expected Results:  
normal kde/x server logout shows console.

something in the new x11 overlay corrupts the screen output when using the dri2/uxa AccelMethod.

What I did was add the x11 overlay, do an "emerge -auvDN world" and this also gave me the updated xf86-intel-video, mesa and some other x11-packages. Then I unmasked the packages for the xorg-server.1.5.99.901 and installed it. Then use "LoadModule" "dri2" and "AccelMethod" "UXA" which shows in the Xorg.0.log that dri2 and uxa are used and 3d perfomance is absolutely great (EXA 120fps / UXA 380fps, measured with glxgears (ok I know it's not a good benchmark, but hese improve is huge)).

But now when I exit kde (no matter if it was launched from console with "startx" or from "kdm") I get a garbled screen which looks like a distorted version of my kde desktop. Strange thing is "CTRL-ALT-F1" works and I get my console with fbcondecor. So it must be related to X server shutdown I guess, but I don't know if it lies in the xorg-server, mesa-7.3 or the new intel-2.6.1 driver. But it must be related the dri2/uxa because when change my xorg.conf to use AccelMethod EXA (which falls back to DRI) the logout and the console or kdm shows up normally.

The only thing you can do when this happens is pressing the shutdown button or issue a reboot via ssh, because you can't re-initialise the screen (I tried with vbetool via ssh but did not succeed).
Comment 1 Marc Elser 2009-01-29 07:05:08 UTC
Some more info:
I just found out that switching to console by doing CTRL-ALT-F1 and killing X by doing a "pidof X" and then a "kill <pid>" brings back the kdm login screen without screen corruption or the console if you started with "startx". So it seems that it really has something to do in what happens during kde shutdown and the x-server of intel driver.
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2009-02-02 12:46:16 UTC
Please try with the new intel driver 2.6.1 from portage. Please also paste your emerge --info and the versions of xorg-server, mesa, kernel, ... packages you're using.

Thanks
Comment 3 Marc Elser 2009-02-04 07:30:01 UTC
(In reply to comment #2)
> Please try with the new intel driver 2.6.1 from portage. Please also paste your
> emerge --info and the versions of xorg-server, mesa, kernel, ... packages
> you're using.

The intel driver 2.6.1 from portage shows exactly the same problem (screen corruption after kde logout).

Here's me emerge --info:
Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.28-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-i686-Intel-R-_Pentium-R-_M_processor_1.60GHz-with-glibc2.0
Timestamp of tree: Tue, 03 Feb 2009 22:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/gentoo-release /home/p2p/.mldonkey /sbin/rc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.fi.muni.cz/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/x11 /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 bash-complection bluetooth branding bzip2 cairo cdr clamav cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fbcon ffmpeg firefox fortran ftp gdbm gif glade gpm gstreamer gtk-sharp hal iconv imagemagick imap innodb isdnlog java jpeg jpg kde libnotify mad maildir midi mikmod mozilla mp3 mpeg mudflap mysql mysqli ncurses nls nptl nptlonly odbc ogg opengl openmp pam pcmcia pcre pdf perl pic png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sasl sdl session spell spl ssl startup-notification svg sysfs tcpd tetex tiff truetype type1 unicode usb vcd vorbis win32codecs x86 xml xorg xsl xslt xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
=============================================================================

And here are my package versions:
mesa-7.3
xorg-server-1.5.99.902
xorg-x11-7.4
gentoo-sources-2.6.28-r1

x11-drivers:
xf86-input-evdev-2.1.2
xf86-input-synaptics-1.0.0
xf86-video-intel-2.6.1
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-02-04 10:44:53 UTC
(In reply to comment #3)
> xorg-server-1.5.99.902

And with xorg-server 1.5.3 ?

Thanks
Comment 5 Marc Elser 2009-02-04 13:05:24 UTC
xorg-server 1.5.3 works but if falls back tu EXA/DRI instead of UXA/DRI2 and is extremly slow.

In glxgears (I know it's not a good performance tool but it still shows big differences) EXA/DRI has about 70fps. Whereas UXA/DRI2 shows about 370fps. Also the opengl screensavers on EXA resemble a slideshow with about 1 second per slide, but with UXA/DRI2 they are very smooth.

If I run glxinfo with EXA it also says direct rendering: yes, recognizes my card and all this stuff, has no errors in Xorg.0.log or .xsession-errors but is still extremly slow. That's why I wanted to use the newer xorg-server from the overlay. I report this so that the unstable driver/xorg-server in the overlay can be fixed.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-02-04 13:35:36 UTC
Alright, thanks for testing. It really looks like it's a genuine bug and I strongly encourage you to open a bug in FreeDesktop's bugzilla.

Here's a document telling you what Intel devs need in bug reports : http://intellinuxgraphics.org/how_to_report_bug.html

Please add "remi@gentoo.org" as a CC on the upstream bug so that I can keep track of the issue and backport patches as needed.

Thanks
Comment 7 R Bar-On 2009-02-09 12:43:27 UTC
please add a link to any FreeDesktop bug you file here.

Thanks!
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2009-02-16 17:11:02 UTC
Please get back to us.

Thanks
Comment 9 Marc Elser 2009-02-18 06:22:43 UTC
Sorry, for not getting back to you yet, but I didn't have time to create a bug report at FreeDesktop yet. Problem is, they ask for so much debugging data and honestly I don't know when I find time to collect all this data.

For the time beeing I just kill 'X' which brings me back to kdm. I know not an elegant solution but it works.

PS: Just compiled the newest 2.6.28-r2 kernel but it doesn't solve the problem.
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2009-02-18 06:57:35 UTC
(In reply to comment #9)
> Sorry, for not getting back to you yet, but I didn't have time to create a bug
> report at FreeDesktop yet. Problem is, they ask for so much debugging data and
> honestly I don't know when I find time to collect all this data.

Yeah, I know debugging X and friends is neither easy nor fun. Please do try to file the bug though :)

> For the time beeing I just kill 'X' which brings me back to kdm. I know not an
> elegant solution but it works.
> 
> PS: Just compiled the newest 2.6.28-r2 kernel but it doesn't solve the problem.

There's no reason for point releases to fix Intel issues. If you can to try another kernel, please use this git tree :

git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git
git checkout -t origin/drm-intel-next
<make menuconfig && make && blah>

Thanks
Comment 11 Marc Elser 2009-02-19 06:31:29 UTC
(In reply to comment #10)
> There's no reason for point releases to fix Intel issues. If you can to try
> another kernel, please use this git tree :
> 
> git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git
> git checkout -t origin/drm-intel-next
> <make menuconfig && make && blah>

I just tried to fetch the kernel but the second git-command doesn't work, I did the following:

cd /usr/src
git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git
(which installed /usr/src/drm-intel)

git checkout -t origin/drm-intel-next
(which complained 'fatal: not a git-repository'), so I did

cd /usr/src/drm-intel
git checkout -t origin/drm-intel-next
fatal: git checkout: --track and --no-track require -b

Can you please tell me the correct checkout command, because I'm not familiar with git and so I don't know what branch is required with the -b option

Thanks.
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2009-02-19 07:41:51 UTC
(In reply to comment #11)
> cd /usr/src/drm-intel
> git checkout -t origin/drm-intel-next
> fatal: git checkout: --track and --no-track require -b
> 
> Can you please tell me the correct checkout command, because I'm not familiar
> with git and so I don't know what branch is required with the -b option

Right, stable git doesn't have that handy shortcut yet.

If "git branch" says you're on branch "master", you should do the following :
git checkout -t origin/drm-intel-next -b drm-intel-next

If you already are on the "drm-intel-next" branch, you're fine.

Thanks
Comment 13 Marc Elser 2009-02-19 20:50:04 UTC
I just tried the drm-intel kernel you mentioned but this kernel has serious issues.

1.) I cannot kill processes with 'kill -9 <pid>', for example I tried to kill 'X' and also 'kdm' but the processes stayed alive and no zombies showed up in 'top'. Also pidof 'X' and 'kdm' showed that the processed were still alive and happy. Well this is a huge problem I think.

2.) It seems that the kernel ignores the framebuffer kernel parameters for the Framebuffer theme which work in the gentoo kernels although the 'tux' show up when booting so the framebuffer driver basically works. I think it also ignores the vga=xxx setting for the same reason the framebuffer theme is not working.

3.) When logging out of 'X', I know have a black screen with a blinking cursor in the top left, but it doesn't return to 'kdm' and as I wrote in the first point, I cannot kill 'X' to make kdm show up.

So this kernel seems to have for more problems the just a screen corruption when logging out of 'X' or is there something I need to compile in to make things better? maybe the framebuffer drm mode? Or some other kernel parameters?

For the moment I switched back to the gentoo kernel because it does not have so much problems.

Thanks for the hint though.
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-02-19 20:58:00 UTC
Again, there's little I can do to help you. You now have all the correct bits. Please file bugs in FreeDesktop's bugzilla to get help from the folks who actually wrote the code :)

Thanks
Comment 15 Marc Elser 2009-03-06 08:52:40 UTC
I finally managed to create the bug at freedesktop.

here is the link https://bugs.freedesktop.org/show_bug.cgi?id=20503
Comment 16 Rémi Cardona (RETIRED) gentoo-dev 2009-03-06 08:55:17 UTC
Alright, thanks. Let's track the bug upstream.
Comment 17 Federico Della Ricca 2009-03-06 18:25:50 UTC
I had the same problem, now with 2.6.3 all is ok, so to me looks like upstream solved the bug.
Comment 18 Marc Elser 2009-03-07 12:52:40 UTC
(In reply to comment #17)
> I had the same problem, now with 2.6.3 all is ok, so to me looks like upstream
> solved the bug.
> 
As you can see in my bug report I already use 2.6.3 and still have the problem (since 2.6.1) so it seems that it's not the driver. Did you upgrade anything else? Could you please post your xorg-x11, xorg-server, mesa, libdrm and kernel versions?

Thanks
Comment 19 Federico Della Ricca 2009-03-07 17:42:24 UTC
(In reply to comment #18)

> As you can see in my bug report I already use 2.6.3 and still have the problem
> (since 2.6.1) so it seems that it's not the driver. Did you upgrade anything
> else? Could you please post your xorg-x11, xorg-server, mesa, libdrm and kernel
> versions?
> 
> Thanks

Now the problem reappeared on my box, without any update. I don't know what to think.
I've noticed that if I downgrade to 2.5.1 with X running, there is no screen corruption, so I think is something related to how the driver shutdowns.
I've yet to try a kernel without framebuffer.

Anyway, these are the relevant packages:

[I--] [  ] x11-base/xorg-x11-7.2 (0)
[I--] [ ~] x11-base/xorg-server-1.5.3-r2 (0)
[I--] [ ~] media-libs/mesa-7.2 (0)
[I--] [ ~] x11-libs/libdrm-2.4.5 (0)
Linux 2.6.27-gentoo-r7 #1 SMP PREEMPT Fri Jan 23 19:52:55 CET 2009 i686 $


>