[945G/GZ] Kubuntu: no direct rendering (KMS bug)

Bug #377875 reported by Marcin Giedz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Invalid
Undecided
Unassigned
xserver-xorg-video-intel (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

What I did was basically ran KMS on Jaunty using 2.6.30-5 from PPA and intel from:
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main

KMS works quite fine although Plymouth doesn't show Solar "theme" - but there is no flickery which is really great.

However when I run KDE4 I have no Direct rendering anymore - had with pure Jaunty installation.

Here is configuration:

Linux mini0001 2.6.30-5-generic #6-Ubuntu SMP Mon May 11 19:56:30 UTC 2009 i686 GNU/Linux

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
        Subsystem: Intel Corporation Device 464c
        Flags: fast devsel, IRQ 16
        Memory at 90300000 (32-bit, non-prefetchable) [size=512K]
        I/O ports at 20e0 [size=8]
        Memory at 80000000 (32-bit, prefetchable) [size=256M]
        Memory at 90380000 (32-bit, non-prefetchable) [size=256K]
        Capabilities: <access denied>
        Kernel modules: intelfb, i915

ii libdrm-intel1 2.4.11+git20090514.r1.f57d7f4b-0ubuntu0sarvatt~jaunty Userspace interface to Intel-specific kernel
ii xserver-xorg-video-intel 2:2.7.1-0ubuntu1~xup~1 X.Org X server -- Intel i8xx, i9xx display d

ii libgl1-mesa-dri 7.5.0~git20090515+mesa-7-5-branch.483e2478-0ubuntu0sarvatt2 A free implementation of the OpenGL API -- D
ii libgl1-mesa-glx 7.5.0~git20090515+mesa-7-5-branch.483e2478-0ubuntu0sarvatt2 A free implementation of the OpenGL API -- G
ii libglu1-mesa 7.5.0~git20090515+mesa-7-5-branch.483e2478-0ubuntu0sarvatt2 The OpenGL utility library(GLU)
ii mesa-utils 7.5.0~git20090515+mesa-7-5-branch.483e2478-0ubuntu0sarvatt2 Miscellaneous Mesa GL utilities

glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Software Rasterizer

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

I have desktop effects and Direct Rendering after I switched back to 2.6.28-11-generic with 2.7.1 on board running. So this seems to be problem with kernel not intel driver itself.

OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945G GEM 20090114 x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 7.5-rc2

Revision history for this message
VladNistor (vladnistor) wrote :

You have stuff installed from multiple sources: xup & sarvatt. It's normal that they won't work together.

This happened to me while mixing PPA sources in Jaunty (the same two). I suggest you pick one of the sources, either xup or sarvatt and move all your packages (including the ones you listed above) to the same source using aptitude. You may notice they use different git sources version (~514 vs ~515).

After you have migrated all your packages to one source you can use the new kernel which has improved performance.

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

OK... I have switched entirely to 2.6.30-5 + xup and :
1) no direct rendering, KMS OK, plymouth - text only doesn't look good

So I changed to 2.6.30-5 + sarvatt:
1) KDM can't run ... "resolution out of ranges on LCD"

Third option: 2.6.28-11, + sarvatt
1) no KMS, direct rendering FINE

I have i915 modeset=1 in modules + UXA as AccelMethod in xorg.conf

Seems like will have to wait for next update ;)

M.

Revision history for this message
VladNistor (vladnistor) wrote :

Thanks for taking the time and testing my suggestions. Can anyone else reproduce this bug?

Revision history for this message
Robert Hooker (sarvatt) wrote :

You need to revert back to jaunty's mesa and drm too, not just xserver-xorg-video-intel when you switch away from xorg-edgers as the edgers packages are built against the newer ones in the PPA.

to switch to x-updates:
remove xorg-edgers from your sources
add x-updates sources
sudo apt-get update
sudo apt-get install libdrm-intel1/jaunty libdrm2/jaunty libosmesa6/jaunty mesa-utils/jaunty xserver-xorg-video-intel/jaunty libgl1-mesa-dri/jaunty libgl1-mesa-glx/jaunty libglu1-mesa/jaunty

you can use dpkg -l | grep sarvatt to find any other packages from edgers that you might need to downgrade by appending /jaunty, you might have dev headers installed too.

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

I did it. Saying : "+ xup" or "+ sarvatt" I meant that drm|mesa|intel packages were changed and results are still as described. Currently I'm running sarvatt + 2.6.28-11 which gives me Direct Rendering but no KMS.

Revision history for this message
Robert Hooker (sarvatt) wrote :

There is no KMS in the 2.6.28 kernel, thats to be expected. Can you post your full dpkg -l? There is no mesa in ~xup to downgrade to.. Mesa should be 7.4 while on xup and all of the drm libs should be 2.4.9.

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

I know there is no KMS for 2.6.28. Simply I'd like to do tests with new Intel drivers/mesa/drm and kernel.After little investigation it appeared that taking latest mesa/drm/intel from sarvatt and kernel 2.6.30-5 I don't have composition enabled. So I decided to try 2.6.28 with latest sarvatt. It works quite stable.

giedz@mini0001:/var/log$ dpkg -l | grep mesa
ii libgl1-mesa-dri 7.5.0~git20090518+mesa-7-5-branch.7ce105d2-0ubuntu0sarvatt A free implementation of the OpenGL API -- D
ii libgl1-mesa-glx 7.5.0~git20090518+mesa-7-5-branch.7ce105d2-0ubuntu0sarvatt A free implementation of the OpenGL API -- G
ii libglu1-mesa 7.5.0~git20090518+mesa-7-5-branch.7ce105d2-0ubuntu0sarvatt The OpenGL utility library (GLU)
ii mesa-utils 7.5.0~git20090518+mesa-7-5-branch.7ce105d2-0ubuntu0sarvatt Miscellaneous Mesa GL utilities
giedz@mini0001:/var/log$ dpkg -l | grep drm
ii libdrm-intel1 2.4.11+git20090514.r1.f57d7f4b-0ubuntu0sarvatt~jaunty Userspace interface to Intel-specific kernel
ii libdrm2 2.4.11+git20090514.r1.f57d7f4b-0ubuntu0sarvatt~jaunty Userspace interface to kernel rendering serv
giedz@mini0001:/var/log$ dpkg -l | grep intel
ii libdrm-intel1 2.4.11+git20090514.r1.f57d7f4b-0ubuntu0sarvatt~jaunty Userspace interface to Intel-specific kernel
ii xserver-xorg-video-intel 2:2.7.99.1+git20090515.87332a7c-0ubuntu0sarvatt~jaunty X.Org X server -- Intel i8xx, i9xx display d
giedz@mini0001:/var/log$

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

Latest update: I installed kernel 2.6.30-6 from Karmic and results are still the same -> can't run into graphic mode after reboot (no KDM) and monitor says "Resolution out of range".

How can I help to developers with this, any suggestions?

Revision history for this message
Albert Damen (albrt) wrote :

The message "(WW) intel(0): Failed to open DRM device" in your X log suggests kernel module i915 is not properly loaded.
Can you boot with kernel 2.6.30 and run the commands:
- lsmod > lsmod.txt
- lshal > lshal.txt

and attach the two files to this bug report?
Also, assuming i915 is indeed not loaded, can you run the command:
- sudo modprobe i915

and paste the result here?

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

Well... running 2.6.30-5/6 I can't switch to VT. How can I do this?

Revision history for this message
Albert Damen (albrt) wrote :

You could boot into 2.6.28, then install the set of packages you had when you first filed this bug. After that, reboot in 2.6.30
Alternatively, you could try to set modeset=0 in /etc/modules and see if that allows to start X with 2.6.30.

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

I've got everything installed so I only changed modeset=0 but result was still the same and I couldn't switch to VT. So I commented : #i915 modeset=0 from /etc/module and /etc/initramfs-tools/modules ... and I can run KDM on 2.6.30-6 but obviously there is no KMS enabled. I'm adding 2 Xorg logs - one Xorg.0.log is current session (no KMS), and previous one Xorg.0.log.old (i915 modeset=1). Hope that helps.

What can I do next?

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

Marcin, your Xorg.0.log.old seems to be running the .28 kernel, which doesn't help - you need to post one from after trying to run the .30 kernel with KMS enabled, the 2.7.99.1 intel driver and mesa/xserver/etc. from xorg-edgers, and KDM with direct rendering enabled. Also post your gdm log from after trying this, which is going to be one of the files in /var/log/gdm/.

You also need to post 'lspci -vvnn' and 'sudo lshal', but those can be run from any configuration since the info is mostly hardware info that doesn't change.

Post each of these as a separate attachment, don't put them in a tarball or anything. Thanks ahead of time.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Triaged → Incomplete
summary: - [945G/GZ] no direct rendering after upgrade to KMS/intel-2.7.1
+ [945G/GZ] Kubuntu: no direct rendering after upgrade to KMS/intel-2.7.1
summary: - [945G/GZ] Kubuntu: no direct rendering after upgrade to KMS/intel-2.7.1
+ [945G/GZ] Kubuntu: no direct rendering (KMS bug)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → New
Revision history for this message
Bryce Harrington (bryce) wrote :

Don't forget to post your /etc/X11/xorg.conf as well, since it appears you have some customizations there.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Incomplete
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :
Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

Hi

This time I've cleaned all logs, and did rebuild initrd changing /etc/initramfs-tools/modules (added i915 modeset=1) by :sudo update-initramfs.

Now:
1) I ran with KMS and got KDM :) - brilliant!
2) there is Direct Rendering any more and xorg process seems to run with 99% CPU load when doing simple thing like dragging window .. even now typing I have 20-30% CPU load for xorg ... but KMS works fine!!!

If you need more help just let me know

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Marcin,

I'm a bit confused on your last comment; you said "there is Direct Rendering any more", do you mean there is *no* Direct Rendering, or that there *is* direct rendering?

CPU load on X is not always due to X itself; often it is an application thing (such as KDE). It would be interesting to see if you can reproduce that issue on Xubuntu or even Ubuntu using a LiveCD. If you can reproduce it on either of those then we should consider it an X bug, otherwise maybe KDE or Qt is interacting badly with KMS for some reason.

Can you please attach dmesg as well, in case it is a kernel/X issue?

Revision history for this message
Robert Hooker (sarvatt) wrote :

If you are going to use the initramfs-tools route, can you try putting this in your /etc/initramfs-tools/modules and then update your initrd?

# Enable Kernel Modesetting
intel_agp
drm
i915 modeset=1

The order matters, just putting i915 modeset=1 won't load agp and drm for me as of initramfs-tools 0.92bubuntu30.

Revision history for this message
Robert Hooker (sarvatt) wrote :

Yep I can confirm that I can reproduce the problem by just adding i915 to /etc/initramfs-tools/modules and updating my initrd, drm needs to load earlier than it does if you leave it out or else you get the drm open problems and it falls back to swrast. It's fixed as of debian's initramfs-tools .93-2 but we are still on .92b in ubuntu. Marcin, just leave it out of /etc/initramfs-tools/modules and add it to /etc/modules instead.

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

... "there is no Direct Rendering any more" - my mistake!!! but:

1) adding "i915 modeset=1" ONLY to /etc/modules in my case did NOTHING really. No KMS at all
2) adding "intel_agp drm i915 modeset=1" to /etc/initramfs-tools/modules and update on initrd WORKS! - I have KMS and Direct Rendering! I can even switch to VT1-6 with not flickering! Awesome!

However I can now see that KDM (KDE) "switches" during boot time, which I couldn't find previously - but this probably is KDM bug related to KMS.

Thanks a lot!!!! If I can do anything else for you - let me know!

Revision history for this message
Robert Hooker (sarvatt) wrote :

Did you still have i915 loading via initramfs-tools when you tried editing /etc/modules? from the previous reports it sounds like that was the case. If you use a mainline PPA kernel you'll have to add all 3 in that order to /etc/initramfs-tools/modules to get it to work, the patch to make it work via only editing /etc/modules or /etc/modprobe.d/ conf options is only in the karmic kernels for future reference. Glad you have it fixed!

Revision history for this message
Marcin Giedz (marcin-giedz) wrote :

Yes .. all via initramfs-tools. Now I can see also about 400% speed up with glxgears. Previously I had around 60FPS, now I have around 280 FPS and counting ;)

Revision history for this message
Bryce Harrington (bryce) wrote :

Adding to /etc/modules neither worked for me, however instead of /etc/initramfs-tools/modules I added a file in /etc/modprobe.d/, which is what the kernel team suggested, and it worked properly. This procedure is documented at http://wiki.ubuntu.com/X/KernelModeSetting and will be the way we support, until it gets set to default in the kernel.

So... I think this bug can be closed. The configuration approach is non-standard and not one we plan to be supporting, and the user's system is functioning correctly in any case. If there is additional work that needs done to smooth out alternate options (such as getting the right order of modules loaded), that probably would be best to be done as separate bug reports against the kernel or other relevant components.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
maximilian attems (maks-debian) wrote :

Closing bug report as indicated by xorg dev.
KMS is mainstream this days and works out of the box, no need to specify anything in initramfs-tools.

Changed in initramfs-tools (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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