[g45] xorg hangs on startup (compiz turned off)

Bug #273708 reported by Martin Olsson
6
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Medium
linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Trying to boot Ubuntu on a machine with Gigabyte GA-EG45M-DS2H motherboard (Intel G45-chipset) which means it has the Intel GMA X4500HD graphics card. A few second after boot (usually before gnome-panel has finished loading) X.org goes bonkers and start to flash (looks like it's going modesetting or probing or something). After a few seconds or flashing back and other I see a dialog displayed but at this point the graphics has become corrupted and I can't read what the dialog says. I can still move the cursor over this dialog (even though the mouse cursor is also corrupted). If I try CTRL-ALT-F1 I can sometimes get to a normal text terminal and sometimes even the text terminal is corrupted. The kernel is not hung though, even though the text terminal effectively prevents me from reading anything I type or that is printed; I can still type in command blindly like "sudo reboot now" and it will reboot properly. The GDM screen is rock solid, no problems there. Also I got compiz turned off (by adding "exit" just under the "#/bin/sh" inside the /usr/bin/compiz script).

FYI: I've tried two different monitors (both using DVI-D). First one is a HP L1925 19" LCD and the other one is a Samsung 22" LCD Syncmaster 2253BW. I don't think the monitor has anything to do with it.

I think I got the 2.4.1 version of the intel driver. I did try building it from scratch (including the needed libdrm). After doing buil-dep/configure/make they looked like they compiled right (not an expert) and then I just did "make install" but I've no idea if I actually did it properly.

There is two interesting stacktraces with proper symbols in the attached xorg.0.log files.

Tags: g45 intel xorg
Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
Martin Olsson (mnemo) wrote :

Oh, and I'm using the 64-bit version of Ubuntu.

Revision history for this message
Martin Olsson (mnemo) wrote :

If someone else runs into this bug, note that adding:

Option "AccelMethod" "XAA"

inside the "Device" section of the /etc/X11/xorg.conf file and then rebooting makes the system run just fine without any crashes (using XAA instead of EXA probably gives not so good gfx perf and I don't think you can run compiz with XAA). Still, this is a very useful workaround for people waiting for a fix.

Revision history for this message
desertoak (danielc-brikks) wrote :

I am also having this problem with a Intel DG45ID motherboard.

Running ubuntu 32bit daily build oct 18th.

"After a few seconds or flashing back and other I see a dialog displayed but at this point the graphics has become corrupted and I can't read what the dialog says."

In this dialog i have three options. If i choose the first one, after a while i can enter desktop with maxresolution 1024x768.

Revision history for this message
desertoak (danielc-brikks) wrote :

Added Option "AccelMethod" "XAA" to /etc/X11/xorg.conf and rebooted.

The problem still persists.

Revision history for this message
Martin Olsson (mnemo) wrote :

desertoak, I just attached an URL to the upstream bug report I filed in the beginning of october. Since then Keith Packard have written a patch for this bug and Eric Anholt improved and merged that patch. The bug was in intel-agp.ko (a component inside the Linux kernel) and Eric's tree has been pulled into Daniel Airlie's DRM tree which is turn has been pulled by Linus Torvalds so it's very likely that this fix will be in the 2.6.28 kernel.

That said, this still means that G45-based motherboards might not boot on intrepid final unless someone from the ubuntu kernel team decides to cherry pick this particular patch (see below). I'm not sure that's going to happen though because we're beyond the "kernel freeze" in the intrepid schedule (at least I've e-mailed them about it).

I suspect that the only change you need to make G45 work nicely is this one:
http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=blobdiff;f=drivers/char/agp/intel-agp.c;h=f1fe7490131468b40c5817e232442026d9f8ff0d;hp=016fdf0623a4ce7b5f849efc8ab099a2c5026497;hb=2052746fc8397130c120f0194a89938b0b62b6cb;hpb=b34c87315b1a2822111fc8ef744ef504f9be2f85
Applying this change is indeed sufficient to fix my machine.

Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
Martin Olsson (mnemo) wrote :

What about putting:

 Option "NoAccel" "True"

in the Device section of xorg.conf, does that help?

Revision history for this message
desertoak (danielc-brikks) wrote :

Ok, thank you for fast reply.

Option "NoAccel" "True" in the Device section of xorg.conf does not help.

This is very strange.. i did'nt have this problem in Ubuntu 8.10 "Intrepid Ibex" Beta.

How do i apply this change you talked about?

Revision history for this message
desertoak (danielc-brikks) wrote :

If it helps i have Intel DG45ID (G45) motherboard connected via hdmi to a 40" Sony KDL-40D3000 TV. The TV has a maxresolution of 1366x768. But is recognized as "Unknown" in the Ubuntu GUI in the daily build. However in the Beta it was recognized as 72" Tv, but then i could set maxresolution of 1360x768.

Revision history for this message
desertoak (danielc-brikks) wrote :

Update

Downloaded the beta and installed it. Now it dosent work with the beta either.

Changed in xorg-server:
status: Confirmed → Fix Released
Revision history for this message
Martin Olsson (mnemo) wrote :

To apply the patch I was talking about you need to rebuild one of your kernel module which is not a trivial task but if you're feeling lucky try this:

0. install tools needed for building the linux kernel by running this command "sudo apt-get build-dep linux-image-2.6.27-7-generic"
1. create some empty directory for your linux kernel code
2. "cd" into that directory
3. run "apt-get source linux-image-2.6.27-7-generic"
4. cd into "linux-2.6.27/drivers/char/agp"
5. run this command to build all kernel modules in that directory "make -C /lib/modules/`uname -r`/build M=$PWD modules" (note also that the quotes should be shell backtick quotes)
6. if everything went fine you should have a newly created file called intel-agp.ko (still in the same dir as the source file called intel-agp.c)
7. copy the generated intel-agp.ko into "/lib/modules/2.6.27-7-generic/kernel/drivers/char/agp/intel-agp.ko.fixed_version" (remember to use "sudo" when you copy stuff into /lib )
8. now cd to the directory "/lib/modules/2.6.27-7-generic/kernel/drivers/char/agp"
9. make a backup of you existing intel-agp.ko file by typing "sudo cp intel-agp.ko intel-agp.ko.original" (be prepared to restore this old version using some boot cd or whatever if this screws up your machine royally!)
10. copy the generated ko file from intel-agp.ko.fixed_version to intel-agp.ko (overwriting the existing one, but this is okay because you got the backup)
11. reboot

Note: I also think it's possible to reinstall the originally (buggy version) using "sudo apt-get install --reinstall linux-image-2.6.27-7-generic" but I still think you should backup the original .ko file just to be sure

Revision history for this message
Martin Olsson (mnemo) wrote :

haha, sorry I forgot the most important part. dont forget to apply the patch!!! otherwise you'll just build the same buggy version as ubuntu ships.

to apply the patch do these extra steps between 3) and 4) above:

step 3.1) download the .patch file I've attached to this bug and save it inside the "linux-2.6.27" directory which is a subfolder inside the directory you created for you kernel source code
step 3.2) then cd into the directory linux-2.6.27
step 3.4) run "patch -p1 < downloaded_filename.patch"

PS. I wrote these steps without testing them so maybe I forgot something. Let me know if you try it and run into problems.

Revision history for this message
desertoak (danielc-brikks) wrote :

Is this the same as https://bugs.launchpad.net/ubuntu/+source/linux/+bug/285572

In that case i tried
 intrepid-desktop-i386.iso 22-Oct-2008 09:34 698M Desktop CD for PC (Intel x86) who has xserver-xorg-video-intel (2:2.4.1-1ubuntu10) in it.

No success, resulting in this bug: https://bugs.launchpad.net/ubuntu/+bug/287770

I dont know how to patch the kernel when i cannot even install ubuntu from live cd. :(

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

Leann, could you take a look at this one?

Changed in linux:
importance: Undecided → High
Revision history for this message
Martin Olsson (mnemo) wrote :

Once keithp had written that patch I git-format-patch'ed it (both the intel 2D driver part and the intel AGP kernel module part) and attached those patches to a separate bug report here:
https://bugs.launchpad.net/ubuntu/+source/linux-meta/+bug/285572

I then asked AmitK and Bryce to get both patches merged into intrepid (which they did). So basically intrepid final was able to boot straight into EXA for G45 even with compiz turned on etc (using the live CD config for instance). Further, I'm now using jaunty on this G45 machine and that also works perfectly with no extra patches because the intel AGP patch is already included in the upstream .28 kernel and the 2.5.0 intel 2D driver also has the corresponding GART memory fix.

It sounds a little bit like desertoak's issue is another bug (I never looked into that and I don't know if his bug was fixed in intrepid final and/or jaunty).

Revision history for this message
Martin Olsson (mnemo) wrote :

The kernel part of the bugfix is already in both intrepid and jaunty.

Changed in linux:
status: New → Fix Released
Changed in xorg-server:
importance: Unknown → Medium
Changed in xorg-server:
importance: Medium → Unknown
Changed in xorg-server:
importance: Unknown → Medium
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.