Bug 44014 - [RV350] Viewing some (latexbeamer generated) PDFs in Okular in Presentation Mode causes massive, persistent screen corruption
Summary: [RV350] Viewing some (latexbeamer generated) PDFs in Okular in Presentation M...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 06:37 UTC by mrsteven
Modified: 2013-11-05 17:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Screenshot showing the corruption (187.76 KB, image/png)
2011-12-21 06:40 UTC, mrsteven
no flags Details
Xorg.0.log (38.05 KB, text/x-log)
2011-12-21 06:41 UTC, mrsteven
no flags Details
dmesg output after the corruption occurs (32.81 KB, text/plain)
2011-12-21 06:44 UTC, mrsteven
no flags Details
glxinfo output (23.88 KB, text/plain)
2011-12-22 02:44 UTC, mrsteven
no flags Details

Description mrsteven 2011-12-21 06:37:51 UTC
When I view some PDFs that were generated with latexbeamer in KDE's Okular, the screen gets corrupted. The corruption is not visible during the presentation itself, but after the presentation the title bars are garbled and some fonts are corrupted. I'll add a screenshot demonstrating the problem. This happens with KWin (no matter if compositing is enabled or not) as well as with fluxbox.

One PDF that reproduces the problem reliably for me can be found here: www.cirmmt.mcgill.ca/activities/workshops/training/latex/details/pdf-slides

I think it is a problem with the kernel module, because in some cases the screen is still corrupt (but to a smaller degree) after I restarted the X server.

Both kernel and X log show nothing indicating the problem.

Here's a list of the relevant packages installed on my system:
 $ emerge -pv xorg-server xf86-video-ati gentoo-sources mesa okular poppler

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/mesa-7.11  USE="egl gallium gbm gles llvm nptl shared-glapi -bindist -classic -debug -motif -openvg -pax_kernel -pic (-selinux) -shared-dricore" VIDEO_CARDS="radeon -intel -mach64 -mga -nouveau -r128 -savage -sis -tdfx -via -vmware" 0 kB
[ebuild   R   ~] x11-base/xorg-server-1.11.3  USE="ipv6 nptl udev xnest xorg -dmx -doc -kdrive -minimal -static-libs -tslib -xvfb" 0 kB
[ebuild   R    ] app-text/poppler-0.16.7  USE="cairo curl cxx introspection jpeg lcms png qt4 utils xpdf-headers -cjk -debug -doc -exceptions -jpeg2k" 0 kB
[ebuild   R   ~] sys-kernel/gentoo-sources-3.1.5  USE="symlink -build -deblob" 0 kB
[ebuild   R   ~] x11-drivers/xf86-video-ati-6.14.3  0 kB
[ebuild   R   ~] kde-base/okular-4.7.4  USE="chm crypt ebook jpeg pdf ps tiff (-aqua) -debug -djvu -handbook (-kdeenablefinal)" 0 kB

Total: 6 packages (6 reinstalls), Size of downloads: 0 kB

I had this problem also with okular 4.4.5 and kernel 3.0.x (and as far as I remember also at least 2.6.39.x).



And here's the output of lspci:
$ /usr/sbin/lspci 
00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 21)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 21)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)
02:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:01.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:01.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04)
02:02.0 Network controller: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
Comment 1 mrsteven 2011-12-21 06:40:27 UTC
Created attachment 54638 [details]
Screenshot showing the corruption

This was taken directly after I quit from Okular's presentation mode.
Comment 2 Alex Deucher 2011-12-21 06:41:54 UTC
Please attach your xorg log, dmesg output, and glxinfo output.
Comment 3 mrsteven 2011-12-21 06:41:59 UTC
Created attachment 54639 [details]
Xorg.0.log

Nothing special here
Comment 4 mrsteven 2011-12-21 06:44:03 UTC
Created attachment 54640 [details]
dmesg output after the corruption occurs

Again, nothing special
Comment 5 mrsteven 2011-12-22 02:44:33 UTC
Created attachment 54675 [details]
glxinfo output

And here the output of glxinfo, taken while running fluxbox.
Comment 6 mrsteven 2011-12-22 03:52:22 UTC
I played around a little bit with the options of the kernel and the X driver: radeon.agpmode=-1 in the kernel command line makes the problem disappear.

I also tried following options for the X driver, none of them did help:
EXANoComposite
EXANoUploadToScreen

So I guess this is (yet another) AGP problem.
Comment 7 mrsteven 2011-12-22 03:53:53 UTC
btw. EXANoUploadToScreen gives me a black screen, so I couldn't really test that.
Comment 8 Alex Deucher 2011-12-22 07:08:28 UTC
(In reply to comment #6)
> I played around a little bit with the options of the kernel and the X driver:
> radeon.agpmode=-1 in the kernel command line makes the problem disappear.
> 
> So I guess this is (yet another) AGP problem.

You can try different AGP modes:
radeon.agpmode=x

where x = 1,2,4,8,-1

(In reply to comment #7)
> btw. EXANoUploadToScreen gives me a black screen, so I couldn't really test
> that.

UTS and DFS are required on radeon so you can't disable them.
Comment 9 mrsteven 2011-12-22 15:53:17 UTC
(In reply to comment #8)
> You can try different AGP modes:
> radeon.agpmode=x
> 
> where x = 1,2,4,8,-1

I tried 1 and 2, but it did not help. I skipped 4 as it is the default on my hardware anyway. 8 is not supported by this notebook.


> (In reply to comment #7)
> > btw. EXANoUploadToScreen gives me a black screen, so I couldn't really test
> > that.
> 
> UTS and DFS are required on radeon so you can't disable them.

Okay. I also tried to disable page flipping and set radeon.dynclks=0 -> Still the same problem, so only radeon.agpgart=-1 helps. Sadly this is a bit slow...
Comment 10 Alex Deucher 2011-12-22 15:59:33 UTC
(In reply to comment #9)
> I tried 1 and 2, but it did not help. I skipped 4 as it is the default on my
> hardware anyway. 8 is not supported by this notebook.

You might try 4 anyway in case the bios sets up a lower mode by default.
Comment 11 mrsteven 2011-12-22 16:19:34 UTC
radeon.agpmode=4 does not help, either.
Comment 12 mrsteven 2011-12-23 09:03:19 UTC
I now noticed that I also get some corruption when I don't use presentation mode. It just takes longer to trigger the problem (by opening several PDFs and scrolling in them) and the screen is not that much garbled. Last time it happened only some icons in KDE were painted badly when the mouse hovered over them. Compositing was enabled (only XRender, not AIGLX) at this time.

I don't know much about GPU programming but to me it looks like something goes wrong when transferring textures from GPU memory into RAM and back.

Season's greetings
mrsteven
Comment 13 mrsteven 2011-12-25 07:18:26 UTC
Two other remarks:

* Viewing the same PDF as linked above with epdfview 0.1.6 (http://trac.emma-soft.com/epdfview/) works fine.

* Setting "memory usage" to "low" in Okular's configure dialog seems to help, too. "Normal (default)" and Aggressive seem to trigger it, both.

Maybe #28159 is related to this?
Comment 14 mrsteven 2012-03-10 11:27:36 UTC
As of Kernel 3.2.9, the problem still exists. xrestop shows that Okular uses huge amounts of pixmap memory in the X server (~200MB and more) after some scrolling in these PDFs.

I don't know if it is related, but I also get some corruption _after_ playing FreedroidRPG for a while. So I quit from FreedroidRPG and some icons and font glyphs are garbled in other programs.
Comment 15 mrsteven 2013-11-05 17:55:54 UTC
Haven't seen this with newer kernels, so I think it can be closed.


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.