X freezes right after login when using EXA on G45 machine

Bug #285572 reported by Martin Olsson
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Amit Kucheria
Intrepid
Fix Released
Medium
Amit Kucheria
xserver-xorg-video-intel (Ubuntu)
Fix Released
High
Unassigned
Intrepid
Fix Released
High
Unassigned

Bug Description

So my machine with intel chipset G45 (motherboard is Gigabyte GA-EG45M-DS2H) freezes right after boot when X.org runs in EXA mode. Upstream have now provided a fix for this and the bug was in intel-agp.ko. Further I have tried to apply this patch to the intrepid kernel and it works, I can login without any hacks in xorg.conf, and I get direct direct rendering etc.

The patch that made it work was:
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

Even though is pretty late in the game I think this patch should be considered for cherry picking into intrepid. Personally I will run the git versions anyway but a lot of new users with modern intel machines might not be able to do that.

Note:
1) This patch is very small
2) This patch is essentially says "if card is Gx5 then do blah" so it's lower than usual risk

Martin Olsson (mnemo)
Changed in linux-meta:
assignee: nobody → ubuntu-kernel-team
Revision history for this message
Martin Olsson (mnemo) wrote :

This fix went into linus .28 tree with commit a45fbc33137b11e479ea8b7d478a1d7e6488971b (which merged airlied's drm tree).

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

From the patch description: "This update requires a corresponding update to xf86-video-intel to work correctly."

Can you post details of what update to the X driver Eric is talking about here? We don't want to update the X driver and cause regressions for others.

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

Good question Amit.

I'm 98% sure the "corresponding xf86-intel patch" is:
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=4dd00681dd0f9fce8dfd4592b46418edbbd2eeb4

Which means that it only applies to GM45 cards (i.e. laptops with a modern intel card). On the G45 machines (desktop with integrated modern intel card) the AGP fix alone is sufficient not just to boot but to run full compiz etc. I only have a G45 machine so I can only confirm that part of the story.

To sort this out I've asked the intel driver maintainers to clarify the patch dependency and also give their opinion about the suitability of cherry picking this/these patches. My question was posted here (and I hope they will reply within a few hours):
http://lists.freedesktop.org/archives/intel-gfx/2008-October/000455.html

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

Keith Packard replied said we should merge both patches. See the reply here:
http://lists.freedesktop.org/archives/intel-gfx/2008-October/000456.html

Revision history for this message
Martin Olsson (mnemo) wrote :
Amit Kucheria (amitk)
Changed in linux:
importance: Undecided → Medium
milestone: none → ubuntu-8.10-beta
Bryce Harrington (bryce)
Changed in xserver-xorg-driver-i810:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Amit Kucheria (amitk) wrote :

Sorry. I didn't fix the xorg driver. Meant to change the kernel part.

Changed in xserver-xorg-video-intel:
assignee: nobody → amitk
status: Triaged → Fix Committed
assignee: amitk → nobody
status: Fix Committed → Triaged
Changed in linux:
assignee: ubuntu-kernel-team → amitk
status: New → Fix Committed
Steve Langasek (vorlon)
Changed in linux:
milestone: ubuntu-8.10-beta → ubuntu-8.10
Revision history for this message
Bryce Harrington (bryce) wrote :

I committed and uploaded the change to -intel

Changed in xserver-xorg-video-intel:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel - 2:2.4.1-1ubuntu10

---------------
xserver-xorg-video-intel (2:2.4.1-1ubuntu10) intrepid; urgency=low

  * 28_stolen_memory_counting_g4x.patch:
    - Fixes freeze on login for G45 hardware when X.org runs in EXA mode.
      Issue was fixed upstream in both the kernel and x driver. This
      patch is also in Debian.
      (LP: #285572)

 -- Bryce Harrington <email address hidden> Tue, 21 Oct 2008 11:35:13 -0700

Changed in xserver-xorg-video-intel:
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

this has been fixed for intrepid in linux 2.6.27-7.13. Changelog:

linux (2.6.27-7.13) intrepid; urgency=low

  [ Stefan Bader ]

  * gfs1: GFS1 can't create more than 4kb file

  [ Tim Gardner ]

  * Revert "SAUCE: x86: Reserve FIRST_DEVICE_VECTOR in used_vectors
    bitmap.". Use upstream commit to avoid future conflicts.
  * Revert "STABLE queue: mac80211: fix two issues in debugfs".
    Use upstream commit to avoid future conflicts.
  * Revert "x86, early_ioremap: fix fencepost error"
    Use upstream commit to avoid future conflicts.

  [ Upstream Kernel Changes ]

  * sched_rt.c: resch needed in rt_rq_enqueue() for the root rt_rq
  * x86: Reserve FIRST_DEVICE_VECTOR in used_vectors bitmap.
  * mac80211: fix two issues in debugfs
  * Fix barrier fail detection in XFS
  * tty: Termios locking - sort out real_tty confusions and lock reads
  * CIFS: make sure we have the right resume info before calling
    CIFSFindNext
  * rfkill: update LEDs for all state changes
  * libertas: clear current command on card removal
  * b43legacy: Fix failure in rate-adjustment mechanism
  * x86, early_ioremap: fix fencepost error
  * x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
  * x86: improve UP kernel when CPU-hotplug and SMP is enabled
  * sky2: Fix WOL regression
  * netdrvr: atl1e: Don't take the mdio_lock in atl1e_probe
  * Linux 2.6.27.2

  [ Amit Kucheria ]

  * Ubuntu: agp: Fix stolen memory counting on G4X.
    -LP: 285572

  [ Scott Remnant ]

  * add MODULE_ALIAS to load ipmi_devintf with ipmi_si

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
André (andred-ubuntu-deactivatedaccount-deactivatedaccount) wrote :

With version 2.6.27-7.13 of the kernel and version 2:2.4.1-1ubuntu10 of the xserver-xorg-video-intel package I crash on a Asus P5Q-EM (has G45 chip) with the following error:

Fatal server error:
Couldn't bind memory for exa offscreen

Backtrace:
0: /usr/X11R6/bin/X(xf86SigHandler+0x79) [0x80c2ff9]
1: [0xb8091400]
2: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b08aeb]
3: /usr/X11R6/bin/X(AbortDDX+0x79) [0x80a8af9]
4: /usr/X11R6/bin/X(AbortServer+0x28) [0x813c428]
5: /usr/X11R6/bin/X(FatalError+0x63) [0x813ca33]
6: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b11e67]
7: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b09359]
8: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b0acc2]
9: /usr/X11R6/bin/X(AddScreen+0x19f) [0x807137f]
10: /usr/X11R6/bin/X(InitOutput+0x206) [0x80aa526]
11: /usr/X11R6/bin/X(main+0x279) [0x8071b19]
12: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7c9a685]
13: /usr/X11R6/bin/X [0x8071101]
Saw signal 11. Server aborting.

Revision history for this message
André (andred-ubuntu-deactivatedaccount-deactivatedaccount) wrote :

Scratch that; I had the right kernel installed but was actually booting an old kernel. Sorry for the noise.

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

I've now tested the oct 22 desktop live CD. On my machine with a "Gigabyte GA-EG45M-DS2H" it boots right into compiz. Previously I got a hang right after login so this is a big improvement.

I've got got the updates on my laptop which got a 965 intel and no regressions there that I can see.

Revision history for this message
great scott (greatscotty) wrote :

My gm45 Vaio gets a white screen when xorg tries to load with a oct 22 live CD for Amd64. Anything I should try?

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

The GM45 Sony Vaio bug is another separate issue and it's not fixed upstream yet. Jesse Barnes mentioned it explicitly when he released the 2.5.0 version upstream 3 days ago, see this e-mail:
http://lists.freedesktop.org/archives/xorg/2008-October/039555.html
(good news is that upstream know about it, I'm certain it will be fixed in the next upstream release).

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

After more usage, I've found two issues while running intrepid on G45 using the current driver bits. The patches above are still a success because this machine is now usable (no xorg freeze after login) and with compiz off it actually works perfectly. I will file separate bugs for these issues but I just wanted to list them here as well for completeness.

* When compiz is active and you move a glxgears window, then it leaves a trail of damaged but not repainted areas. If compiz is off glxgears works perfectly.
* Sometimes when compiz is active I see constant dmesg spam (actually dd,klogd,syslogd and xorg are taking a lot of CPU but they can't max out all my four cores though so the system is very much usable despite this log-while-spinning-in-a-loop however with less cores this might be a big problem). This problem goes away when compiz is turned off though. The log spam looks like this:

[ 144.125185] [drm:drm_ioctl] pid=5686, cmd=0x40206443, nr=0x43, dev 0xe200, auth=1
[ 144.125186] [drm:i915_batchbuffer] i915 batchbuffer, start 4b75000 used 40 cliprects 0
[ 144.125190] [drm:drm_ioctl] pid=5686, cmd=0xc0086444, nr=0x44, dev 0xe200, auth=1
[ 144.125191] [drm:i915_emit_irq]
[ 144.125195] [drm:drm_ioctl] pid=5686, cmd=0x4008642a, nr=0x2a, dev 0xe200, auth=1
[ 144.125196] [drm:drm_lock] 1 (pid 5686) requests lock (0x00000002), flags = 0x00000000
[ 144.125200] [drm:i915_driver_irq_handler] i915_driver_irq_handler flag=00000002
[ 144.125201] [drm:drm_lock] 1 has lock
[ 144.135444] [drm:i915_driver_irq_handler] i915_driver_irq_handler flag=00000080
[ 144.148778] [drm:drm_ioctl] pid=5686, cmd=0x4008642a, nr=0x2a, dev 0xe200, auth=1
[ 144.148781] [drm:drm_lock] 1 (pid 5686) requests lock (0x00000001), flags = 0x0000000a
[ 144.148783] [drm:drm_lock] 1 has lock
[ 144.148787] [drm:drm_ioctl] pid=5686, cmd=0x4004644d, nr=0x4d, dev 0xe200, auth=1
[ 144.148853] [drm:drm_ioctl] pid=5686, cmd=0x4018643f, nr=0x3f, dev 0xe200, auth=1
[ 144.148856] [drm:drm_update_drawable_info] Updated 0 cliprects for drawable 1
[ 144.270843] [drm:drm_ioctl] pid=5686, cmd=0x40046445, nr=0x45, dev 0xe200, auth=1
[ 144.270848] [drm:i915_wait_irq] irq_nr=77925 breadcrumb=77925
[ 144.270852] [drm:drm_ioctl] pid=5686, cmd=0x40046445, nr=0x45, dev 0xe200, auth=1
[ 144.270854] [drm:i915_wait_irq] irq_nr=77922 breadcrumb=77925
[ 144.270856] [drm:drm_ioctl] pid=5686, cmd=0x40046445, nr=0x45, dev 0xe200, auth=1
[ 144.270858] [drm:i915_wait_irq] irq_nr=77925 breadcrumb=77925
[ 144.270935] [drm:drm_ioctl] pid=5686, cmd=0xc0086421, nr=0x21, dev 0xe200, auth=1
[ 144.270937] [drm:drm_rmctx] 2

Revision history for this message
Mikko Rantalainen (mira) wrote :

mnemo: have you filed the bugs for glxgears and dmesg spam issues? Could you provide bug numbers?

I've also noticed poor performance with firefox with flashplugin-nonfree at youtube.com if I've compiz with desktop cube enabled (extremely high CPU usage for youtube video rendering). I'll retest later when I have time and check if it's because of dmesg spamming.

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

Sorry it took so long but I've now filed a proper bug for the dmesg spam issue (both to launchpad and upstream):
https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/305983

The dmesg spam issue is still happening with 2.6.28 kernel and intel 2.5.1 in jaunty unfortunately.

Revision history for this message
Morgan Olausson (ol-morgan) wrote :

Maybe this is same issue?

I installed Ubuntu 8.10, updated and rebooted. It froze right after login. Reproducable every time.
My computer have chip i810.

Perhaps the path should be used also for i810?
Thanks for any help.

Revision history for this message
Morgan Olausson (ol-morgan) wrote :

I think the issue with drm and i915 also also applies to i810, so there might be som connection with this bug.

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

Hi Morgan, your issue is not related to this bug report. The issue described above has been fixed and Ubuntu boots fine using EXA on both Intrepid and Jaunty. I recommend that you open a separate bug report for your issue. To make it easier to understand the issue please include the following data:

Copies of /var/log/Xorg.0.log and /var/log/Xorg.0.log.old, and save the output of these commands to a file and attach that as well: "dmesg", "lspci -nn | grep VGA" and "uname -a". Please make sure you collect this data after the freeze has happened, for example if you are able to trigger the bug and then login using ssh from another computer... this is the best way to do it.

If you know how to handle the gdb debugger it's also extremely useful if you attach gdb logs (i.e. the "backtrace full" that led up to the SEGV etc).

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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