Hi all,
My basic problem is that GPU acceleration is not working for the desktop environment in Ubuntu 10.10. Dragging windows is sluggish and you can physically see the screen redraws occurring during any kind of fast movement or animation. However, GPU acceleration is working for other OpenGL applications (confirmed: glxgears, OpenGL screensavers, Adobe Flash) and there are no errors in any log files; all systems seem to be initialising, although not optimally it would appear.
There are two different symptoms I am seeing here but I seriously suspect that both are being caused by one and the same problem:
- LibGL is choosing to select the "Software Rasterizer" for rendering, even though I have the DRI module for my graphics chipset installed and available on my system.
- Xorg server thinks that a DRI module isn't available and that direct rendering isn't available, even though the driver for my graphics chipset can be seen in the kernel and Xorg logs successfully allocating and initialising all the flip buffers, frame buffers, tiling surfaces, etc.
There are two things that I would be eternally grateful for if anybody could help with:
- How do I get LibGL to choose the hardware renderer that has been installed for my chipset instead of the sluggish "Software Rasterizer"?
- How do I configure the Xorg server so that it knows hardware rendering has been initialised and setup and can accelerate desktop drawing operations?
All the details (so far) of the problem are laid out below. I know that this problem does not occur in 11.10 on the same hardware. So the big question is, can anybody shed any light on how LibGL or Xorg are behaving in 11.10 that is different (or missing) in 10.10?
Any help would be much appreciated.
Thanks in advance.
Environment
The hardware is the brand new Asus U24E (Intel core-i5) laptop. The reason I chose Ubuntu with this laptop is because I saw a video of it working in two online reviews. In the reviews, the OS was a vanilla Ubuntu 11.10 with a few configuration file changes (fixes for suspend/resume and HD spin up/down under ACPI). The problem is that I hate the UI for v11.x, and prefer the UI for v10.x. As I have physically seen a version of Ubuntu working with the machine I know that, as a last resort, I could use 11.10. However, if possible, I really would like to get it going on 10.10.
The environment as it currently stands was prepared as follows:
- Ubuntu 10.10 (amd64, alternate installation) was installed from ISO CD image.
- Kernel was fast-forwarded from 2.6.35 to 3.2.12-030212, the current kernel for Oneiric. This was done to get kernel support for all the peripherals and Intel Sandy Bridge HD3000 graphics chipset.
- Package mesa-utils was installed using apt-get so I could run the glxinfo and glxgears tools.
And that's all. Apart from steps (2) and (3) above, it is a completely vanilla system. There are no externally-connected displays, and the onboard LCD is 1366*768, 24bpp.
No post-installation software updates have been performed. This is the second time I've built this system. The first time I did run all the post-installation updates. After the second clean install I noticed the logs and symptoms were identical in every way without the updates, so the system currently doesn't have them.
That said, the environment works very well and is completely stable (I'm composing this post on it), and all laptop-specific features (Wi-Fi, Bluetooth, WebCAM, touchpad, LAN, hotkeys) all work perfectly.
glxinfo Symptom
The glxinfo problem is a simple one: LibGL refuses to load any other DRI module except the "Software Rasterizer" (module swrast_dri.so). The default behaviour of Xorg is to fallback onto this module when there is no other support in the system. However, in my case, LibGL is choosing to ignore all the other drivers in my system and choose the software emulation module, as can be seen in the following glxinfo output:
Code:
~/Downloads$ LIBGL_DEBUG=verbose glxinfo
name of display: :0.0
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
...
I have been searching for days regarding this problem; nobody has had the same experience. In every other case, an error has been seen in the log just before "OpenDriver" causing Xorg to choose the fallback software rasterise module. In my case, there is no error. However, the DRI module for Intel Sandy Bridge HD3000 chipset (i915_dri.so) is installed as this directory listing shows:
Code:
~/Downloads$ ls -la /usr/lib/dri
total 42392
drwxr-xr-x 2 root root 4096 2012-03-20 15:55 .
drwxr-xr-x 192 root root 53248 2012-03-20 16:52 ..
-rw-r--r-- 1 root root 3388456 2010-10-01 02:19 i915_dri.so
-rw-r--r-- 1 root root 3504872 2010-10-01 02:19 i965_dri.so
-rw-r--r-- 1 root root 3343112 2010-10-01 02:19 mga_dri.so
-rw-r--r-- 1 root root 3228264 2010-10-01 02:19 r128_dri.so
-rw-r--r-- 1 root root 3428008 2010-10-01 02:19 r200_dri.so
-rw-r--r-- 1 root root 3443360 2010-10-01 02:19 r300_dri.so
-rw-r--r-- 1 root root 3463208 2010-10-01 02:19 r600_dri.so
-rw-r--r-- 1 root root 3386896 2010-10-01 02:19 radeon_dri.so
-rw-r--r-- 1 root root 3282160 2010-10-01 02:19 savage_dri.so
-rw-r--r-- 1 root root 3318504 2010-10-01 02:19 sis_dri.so
-rw-r--r-- 1 root root 3018800 2010-10-01 02:19 swrast_dri.so
-rw-r--r-- 1 root root 3281608 2010-10-01 02:19 tdfx_dri.so
-rw-r--r-- 1 root root 3228368 2010-10-01 02:19 unichrome_dri.so
LibGL needs to be told that my Intel DRI module is present so it can load it. At the moment, it isn't even bothering to look for another rasterisation module.
Xorg Symptom
The problem with Xorg can be seen in the log /var/log/Xorg.0.log (see attachment). The lines in the log that drew my attention were as follows:
Code:
...
[ 4259.580] (II) intel(0): Using exact sizes for initial modes
[ 4259.580] (II) intel(0): Output LVDS1 using initial mode 1366x768
[ 4259.580] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[ 4259.580] (II) intel(0): Kernel page flipping support detected, but forcibly disabled.
[ 4259.580] (**) intel(0): Display dimensions: (260, 140) mm
[ 4259.580] (**) intel(0): DPI set to (133, 139)
[ 4259.580] (II) Loading sub module "fb"
[ 4259.580] (II) LoadModule: "fb"
[ 4259.580] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 4259.581] (II) Module fb: vendor="X.Org Foundation"
[ 4259.581] compiled for 1.9.0, module version = 1.0.0
[ 4259.581] ABI class: X.Org ANSI C Emulation, version 0.4
[ 4259.581] (==) Depth 24 pixmap format is 32 bpp
[ 4259.581] (**) intel(0): Tiling enabled
[ 4259.581] (**) intel(0): SwapBuffers wait enabled
[ 4259.581] (==) intel(0): VideoRam: 262144 KB
[ 4259.581] (II) intel(0): Allocated new frame buffer 1408x768 stride 5632, tiled
[ 4259.590] (II) UXA(0): Driver registered support for the following operations:
[ 4259.590] (II) solid
[ 4259.590] (II) copy
[ 4259.590] (II) composite (RENDER acceleration)
[ 4259.590] (II) put_image
[ 4259.590] (II) get_image
[ 4259.590] (==) intel(0): Backing store disabled
[ 4259.590] (==) intel(0): Silken mouse enabled
[ 4259.590] (II) intel(0): Initializing HW Cursor
[ 4259.648] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 4259.650] (==) intel(0): DPMS enabled
[ 4259.650] (==) intel(0): Intel XvMC decoder enabled
[ 4259.651] (II) intel(0): Set up textured video
[ 4259.651] (II) intel(0): [XvMC] i965_xvmc driver initialized.
[ 4259.651] (II) intel(0): direct rendering: Disabled
[ 4259.651] (--) RandR disabled
[ 4259.651] (II) Initializing built-in extension Generic Event Extension
[ 4259.651] (II) Initializing built-in extension SHAPE
[ 4259.651] (II) Initializing built-in extension MIT-SHM
[ 4259.651] (II) Initializing built-in extension XInputExtension
[ 4259.651] (II) Initializing built-in extension XTEST
[ 4259.651] (II) Initializing built-in extension BIG-REQUESTS
[ 4259.651] (II) Initializing built-in extension SYNC
[ 4259.651] (II) Initializing built-in extension XKEYBOARD
[ 4259.651] (II) Initializing built-in extension XC-MISC
[ 4259.651] (II) Initializing built-in extension SECURITY
[ 4259.651] (II) Initializing built-in extension XINERAMA
[ 4259.651] (II) Initializing built-in extension XFIXES
[ 4259.651] (II) Initializing built-in extension RENDER
[ 4259.651] (II) Initializing built-in extension RANDR
[ 4259.651] (II) Initializing built-in extension COMPOSITE
[ 4259.651] (II) Initializing built-in extension DAMAGE
[ 4259.651] (II) Initializing built-in extension GESTURE
[ 4259.661] (II) AIGLX: Screen 0 is not DRI2 capable
[ 4259.661] (II) AIGLX: Screen 0 is not DRI capable
[ 4259.663] (II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so
...
Firstly, the intel driver doesn't enable direct rendering, and (possibly) because of this, AIGLX decides to use the software renderer.
I do have an xorg.conf file although the behaviour of the system is exactly the same with or without the file. The file was automatically generated with Xorg -configure and looks as follows:
Code:
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
I removed all other sections to do with the layout of single display, mouse and keyboard, etc. so that Xorg uses the defaults. Xorg still finds the correct device and uses the same parameters to initialise it, whether the file is there or not as the file contains only default settings.
Attempts At Fixing The Problem(s)
There are a number of tests I tried on the first installation attempt (in no particular order), which resulted eventually in my Xorg server hanging my PC on startup.
- Uninstall/reinstall libgl1-mesa-dri and libgl1-mesa-glx packages (no effect)
- Uninstall/reinstall libglu1-mesa package (no effect)
- Attempted to fast-forward xserver-xorg-video-intel package to the version used in 11.10 (Oneiric) (update failed)
- Attempted to fast-forward xserver-xorg and xserver-xorg-core packages to version used in 11.10 (update failed)
- Attempted to uninstall and reinstall xserver-xorg package (no effect).
- Tried adding i915.modeset=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (no effect)
- Tried adding i915 modeset=1 to /etc/modules (no effect)
Attached Files
Results of Standard Tests
Here are the results of all the usual checks and tests:
1) uname -a
Code:
Linux ubuntu-pegasus 3.2.12-030212-generic #201203191306 SMP Mon Mar 19 17:07:26 UTC 2012 x86_64 GNU/Linux
2) lspci | grep VGA
Code:
00:02.0 VGA compatible controller: Intel Corporation Sandy Bridge Integrated Graphics Controller (rev 09)
3) lshw -C video
Code:
*-display
description: VGA compatible controller
product: Sandy Bridge Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:53 memory:f4800000-f4bfffff memory:e0000000-efffffff ioport:e000(size=64)
4) glxinfo | grep -i render
Code:
direct rendering: Yes
OpenGL renderer string: Software Rasterizer
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fragment_program,
5) glxgears
Code:
4613 frames in 5.0 seconds = 922.526 FPS
4586 frames in 5.0 seconds = 917.108 FPS
4499 frames in 5.0 seconds = 899.645 FPS
4566 frames in 5.0 seconds = 913.147 FPS
4427 frames in 5.0 seconds = 885.350 FPS
4529 frames in 5.0 seconds = 905.699 FPS
4299 frames in 5.0 seconds = 859.631 FPS
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 64614 requests (41 known processed) with 0 events remaining.
The three gears display correctly and animate completely smoothly even when window is being violently dragged around the desktop.
6) dmesg | grep drm
Code:
[ 13.631127] [drm] Initialized drm 1.1.0 20060810
[ 13.778076] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[ 13.778077] [drm] Driver supports precise vblank timestamp query.
[ 14.316692] fbcon: inteldrmfb (fb0) is primary device
[ 14.532240] fb0: inteldrmfb frame buffer device
[ 14.532242] drm: registered panic notifier
[ 14.536434] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
7) dpkg -l '*mesa*'
Code:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii libgl1-mesa-dri 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- GLX runtime
ii libglu1-mesa 7.9~git20100924-0ubuntu2 The OpenGL utility library (GLU)
ii mesa-utils 8.0.1-0ubuntu1 Miscellaneous Mesa GL utilities
un mesag3 <none> (no description available)
un xlibmesa-dri <none> (no description available)
un xlibmesa3 <none> (no description available)
8. dpkg -l '*libgl1*'
Code:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
un libgl1 <none> (no description available)
ii libgl1-mesa-dri 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx 7.9~git20100924-0ubuntu2 A free implementation of the OpenGL API -- GLX runtime
9) dpkg -l '*intel*'
Code:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii intel-gpu-tools 1.0.2+git20100324-0ubuntu1 tools for debugging the Intel graphics driver
ii libdrm-intel1 2.4.21-1ubuntu2 Userspace interface to intel-specific kernel DRM services -- runtime
ii xserver-xorg-video-intel 2:2.12.0-1ubuntu5 X.Org X server -- Intel i8xx, i9xx display driver
un xserver-xorg-video-intel-mo <none> (no description available)
Bookmarks