Intel Java Graphics Performace degradation in Intrepid

Bug #288650 reported by Francis De Brabandere on 2008-10-24
54
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
New
Undecided
Unassigned
sun-java6 (Ubuntu)
Undecided
Unassigned
Nominated for Intrepid by Ayzen

Bug Description

Just updated my mac mini to Intrepid RC and java graphics performance has degraded enormously. Working in netbeans causes a 50% (1 of 2 cores) peak every time gui interactions are performed (mostly caused by Xorg). I tried disabling Compiz but that did not help.
Applets have the same problem.

I was thinking about java 6 update 10 but that can not be the cause because I was using the same java version on Hardy. So it must be a change in the Xorg - Java - Intel drivers interaction? I'm not having any problem on my AMD Athlon(tm) 64 X2 3800+ with a nVidia Corporation NV43 [GeForce 6600 GT] (rev a2).

lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

uname -a
Linux MrMacBuntu 2.6.27-7-generic #1 SMP Wed Oct 22 00:29:18 UTC 2008 i686 GNU/Linux

lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

apt-cache policy sun-java6-jre
sun-java6-jre:
  Installed: 6-10-0ubuntu2
  Candidate: 6-10-0ubuntu2
  Version table:
 *** 6-10-0ubuntu2 0
        500 http://ubuntu.mirrors.skynet.be intrepid/multiverse Packages
        100 /var/lib/dpkg/status

java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

description: updated
Anton Keks (anton-azib) wrote :

Same here, on a regular laptop (non-mac) with all-Intel hardware.

Hardy worked great, but Intrepid makes Java development in an IDE very slow and hard.

Angryziber, could you post the output of this command?

lspci | grep VGA

Anton Keks (anton-azib) wrote :

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Shake (cedarsoft) wrote :

This is a very serious issue for me - developing with my notebook is nearly impossible.
I also have a desktop with a nvidia graphics card - no problems there...

2.6.27-7-generic #1 SMP Tue Nov 4 19:33:20 UTC 2008 i686 GNU/Linux

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
 Subsystem: Hewlett-Packard Company Device 30c0
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at e4600000 (64-bit, non-prefetchable) [size=1M]
 Memory at d0000000 (64-bit, prefetchable) [size=256M]
 I/O ports at 4000 [size=8]
 Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
 Capabilities: [d0] Power Management version 3
 Kernel modules: intelfb

xorg.conf:

Section "Monitor"
 Identifier "Configured Monitor"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 SubSection "Display"
  Virtual 2048 2048
 EndSubSection
EndSection

Section "ServerLayout"
 Identifier "Default Layout"
 Screen "Default Screen"
EndSection

Section "Device"
 Identifier "Configured Video Device"
EndSection

Shake (cedarsoft) wrote :

IntelliJ Idea issue tracker refers this issue:
http://www.jetbrains.net/jira/browse/IDEA-20587

mjparme (mjparme) wrote :

I experienced the same issue (I have since downgraded to 8.04 as 8.10 was unusable to me since I am a Java developer):

My graphics card:

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

Anton Keks (anton-azib) wrote :

The workaround posted in other bug trackers to switch from EXA to XAA acceleration in xorg.conf works for me as well, IntelliJ IDEA is usable again, but still seems slower than on Hardy.

I can confirm that this has something to do with the EXA acceleration method:

Adding the AccelMethod XAA option in /etc/X11/xorg.conf makes netbeans usable again:

Section "Device"
        Identifier "Configured Video Device"
        Option "AccelMethod" "XAA"
EndSection

Alex (oleksandr-vayda) wrote :

Yes, this seems to be fixing the issue for me (Fedora 9, GM965/GL960). IDEA 8.0 looks alive :)
But it's weird, why this issue only appeared for the individual versions of some applications?
For instance IDEA 7.0.4 worked fined with EXA when IDEA 8.0 died.

Shake (cedarsoft) wrote :

For me this workaround does *not* fix the issue. The performance is better than without - but still far away from 7.10.

Ayzen (ayzen-quwe) wrote :

I can confirm that. Intellij Idea 8.0 is very slow on Ubuntu 8.10. This problem makes impossible to work with java IDEs

machak (machak) wrote :

any news about this, cause this is really major pita if you happen to work with java..

you can try Adding the AccelMethod XAA option in /etc/X11/xorg.conf as discussed above, if that doesn't help you'll have to wait for new intel drivers/next ubuntu

Alex (oleksandr-vayda) wrote :

A few posts above I wrote that switching to XAA AccelMethod fixed the issue in Fedora 9 (Intel video driver).
Today I upgraded to Fedora 10 and found out that XAA causes lots of graphical glitches and makes Gnome not working.
So under F10 I've got to switch to EXA again and make a choice - working Gnome OR working IDEA 8 :-((((

So, I'm staying at IDEA 7.0 which is working properly regardless the AccelMethod and OS version.

Hannes Wallnoefer (hannesw) wrote :

I noticed a huge drop in text scrolling performance between jEdit versions 4.3pre15 and 4.3pre16. This is especially noticeable with anti-aliased fonts enabled.

I thought this might be useful information because jEdit is open source and there are probably fewer changes between two pre-release versions than between IntelliJ IDEA 7 and 8.

Aldo Brucale (aldobrucale) wrote :

I'm having the same problem with this graphic card:

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
 Subsystem: Intel Corporation Device 544e
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at 90200000 (32-bit, non-prefetchable) [size=512K]
 I/O ports at 20e0 [size=8]
 Memory at 80000000 (32-bit, prefetchable) [size=256M]
 Memory at 90280000 (32-bit, non-prefetchable) [size=256K]
 Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
 Capabilities: [d0] Power Management version 2
 Kernel modules: intelfb

atc (atc-) wrote :

This bug is severely hindering my use of Ubuntu as I cannot use the various SCM and IDE tools I use.

I'm suffering from slow GUIs when using Java. IntelliJ is a culprit, as well as Star Team. Here are my system details:

-apt-cache policy sun-java6-jre
sun-java6-jre:
  Installed: 6-10-0ubuntu2
  Candidate: 6-10-0ubuntu2
  Version table:
 *** 6-10-0ubuntu2 0
        500 http://gb.archive.ubuntu.com intrepid/multiverse Packages
        100 /var/lib/dpkg/status

-lspci -vvv:

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
        Subsystem: Dell Device 01ad
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at feb00000 (32-bit, non-prefetchable) [size=512K]
        Region 1: I/O ports at e898 [size=8]
        Region 2: Memory at e0000000 (32-bit, prefetchable) [size=256M]
        Region 3: Memory at feac0000 (32-bit, non-prefetchable) [size=256K]
        Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
                Address: 00000000 Data: 0000
        Capabilities: [d0] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Kernel modules: intelfb

00:02.1 Display controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
        Subsystem: Dell Device 01ad
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Region 0: Memory at feb80000 (32-bit, non-prefetchable) [size=512K]
        Capabilities: [d0] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

related blog post:
http://linuxhippy.blogspot.com/2008/12/jxrendermark.html

JDK6u12 might fix this issue

Clemens Eisserer (linuxhippy) wrote :

It is related to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708580 as well as the entry on my blog. Its caused by switching to EXA by default in later Intel drivers, as well as poor X(Shm)GetImage performance.
This problem occurs when switching between hw-accaleration and software-rendering.

I contributed a small fix to completly disable hw accaleration as a workarround which should avoid those worst-cases, it has been integrated in JDK6u12b03 pre-release, would be great if you could give it a try: http://download.java.net/jdk6/binaries/

A long-term solution would be to use the RENDER api, I am currently working on a java2d backend based on RENDER. You can find some information about it on my blog http://linuxhippy.blogspot.com/ as well as http://78.31.67.79:8080/jxrender/.

- Clemens

Clemens Eisserer (linuxhippy) wrote :

As a workarround you can start java with -Dsun.java2d.pmoffscreen=false , thats exactly what my patch does.

I can confirm that Java: 1.6.0_12-ea; Java HotSpot(TM) Client VM 11.2-b01 fixes the problem for me, netbeans runs fluently with the default xorg.conf (no Option "AccelMethod" "XAA")

This is a subjective test but it is very clear that the performance is more or less back to normal. Would you like me to run some kind of benchmark?

Clemens Eisserer (linuxhippy) wrote :

Thanks for testing, glad to hear the patch improved the situation.
No, I don't need benchmarks if everything feels well again.

Shake (cedarsoft) wrote :

Thanks for posting this. Unfortunately the performance is still bad (but much better than without the system property set).
So I hope the guys will fix the intel driver very soon...

Clemens Eisserer (linuxhippy) wrote :

This is not a simple bug, its an architectural change. The intel dirver switched to EXA, which means hw accaleration.

Although the intel driver does *really* bad with readbacks, this is also java's fault.
JDK7 hopefully will include the XRender based backend I am currently working on, which will even bring hw accaleration to java (instead of trying to make software-rendering faster, like my patch does).

Java does quite often fall back to software rendering, where it has to access the image-content with the CPU.
With XAA image contents were in RAM (because XAA offered almost no hw accaleration), and java was able to access the image very fast with the CPU.
Now with EXA images are stored in VRAM on your graphic card, and now the image-content has to be copied between RAM (when java wants to access it) and VRAM (when X11 wants to access it, like for screen-display).

- Clemens

Störm Poorun (subs-olan) wrote :

General article relating to some of the intel graphics architectural changes, and specifically to the absolutely terrible graphic performance drops in ubuntu 9.04:

http://www.phoronix.com/scan.php?page=article&item=ubuntu_904_intel&num=1
http://www.phoronix.com/scan.php?page=news_item&px=NzA0NQ

Störm Poorun (subs-olan) wrote :

.. and this from Bryce, explaining the background to a of the changes:
http://www2.bryceharrington.org:8080/drupal/intel-2.6.1

Clemens Eisserer (linuxhippy) wrote :

This has nothing to do with the recent changes in the intel driver, but with the switch to the EXA acceleration architecture - that many drivers did recently.

Anton Keks (anton-azib) wrote :

I have some good news: Jaunty works well for me with both EXA and UXA - IntelliJ IDEA feels a lot faster even than Intrepid+XAA.

Jaunty has both updated intel driver 2.6.3 and Sun Java 6-13

- (lucky+-deactivatedaccount) wrote :

This bug also affects Wakfu game: http://forum.wakfu.com/en/technical-issues-f36/ubuntu-linux-font-bug-t1302.html

Does anyone tried a latest kernel 2.6.30-rc2 ? It has a lot of changes in the intel driver.

I have to come back on my previous comment on the patch. I'm running Jaunty beta now and Netbeans is back to unusable slow state.

Angryziber can you tell me what your xorg.conf looks like? Or are you using the default one?

Enabling XAA reboots my machine on startup when X is being loaded

Anton Keks (anton-azib) wrote :

Unfortunately, it seems that some intermediate changes made in Jaunty during the past week have made things worse for me.

Java performance is good (scrolling, view resizing, etc in IDEA8 is very fast), however if I open many windows on the same viewport (5+ or something, especially maximized ones), then switching between them becomes very slow. Dragging of a single window is fast and any redraws inside of a single windows is also fast, but things like Alt+Tab, Scale compiz plugin or anything else that operates on many windows at once is slow. Bad, but maybe this was caused by some 'stability' patches, probably related to memory management somehow. This is with EXA.

Another issue is that UXA does not work for me anymore - it is able to redraw the screen (in compiz) only once per 2 seconds (Compiz benchmark shows 0.5 fps), which is totally unacceptable. Last week, UXA was at least as fast as EXA for me, with DRI2 working. XAA crashes, too. Very bad...

And yes, I use the default xorg.conf.

lspci | grep -i display
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.