Bug 21596 - [GM45 KMS] kernel-2.6.29 + server-1.6.1 + intel-{2.7.0,git} = freeze on exit
Summary: [GM45 KMS] kernel-2.6.29 + server-1.6.1 + intel-{2.7.0,git} = freeze on exit
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2009-05-06 08:21 UTC by Andrew Church
Modified: 2009-05-12 09:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
X server log (12.45 KB, text/plain)
2009-05-06 08:21 UTC, Andrew Church
no flags Details
Server configuration file (2.17 KB, text/plain)
2009-05-06 08:22 UTC, Andrew Church
no flags Details
dmesg output (54.21 KB, text/plain)
2009-05-06 08:24 UTC, Andrew Church
no flags Details
Xorg.0.log (correct version) (15.23 KB, text/plain)
2009-05-06 20:26 UTC, Andrew Church
no flags Details

Description Andrew Church 2009-05-06 08:21:57 UTC
Created attachment 25552 [details]
X server log

(From https://bugs.gentoo.org/show_bug.cgi?id=264252)

Under kernel 2.6.29 and xorg-server 1.6.1, the current Intel drivers cause the X server to freeze on exit, leaving the console unresponsive (including magic SysRq).  The system itself is still accessible via e.g. SSH.

Under xorg-server <1.6, the driver crashes as in bug 21245.

System environment:
    Machine: Toshiba dynabook SS RX2/T7G
    GPU: 8086:2a42 Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
    Kernel: Linux 2.6.29-gentoo-r3 x86_64 (built with the patch noted in bug 21246)
    xorg-server: 1.6.1
    xf86-video-intel: 2.7.0 (or git-8d27247829fe4f55691ce68f9f4b14810fb34b32)
    libdrm: 2.4.5

Steps to reproduce:
1. startx
2. Terminate window manager (thus ending the xinit process)
3. Screen goes blank, console is unresponsive
Comment 1 Andrew Church 2009-05-06 08:22:55 UTC
Created attachment 25553 [details]
Server configuration file
Comment 2 Andrew Church 2009-05-06 08:24:01 UTC
Created attachment 25554 [details]
dmesg output
Comment 3 Andrew Church 2009-05-06 20:26:23 UTC
Created attachment 25579 [details]
Xorg.0.log (correct version)

Noticed belatedly that the initial log was using the wrong configuration file (one that didn't have ModeDebug active); apologies for the mixup.

I've done a little additional testing and found:

- The Xorg process terminates normally on exit.  (There were a couple of threads that got SIGPIPE on writev() when the server exited, but I saw the same behavior on kernel 2.6.28, so I assume that's normal.)

- Even after the console lockup, X can be started from an SSH login, but it often (not always) takes ~20 seconds longer to complete the startup sequence, 28-32 seconds as opposed to 10-12.  After startup, applications seem to behave normally with no slowdown.  There are no additional dmesg messages except for repeats of the EDID messages at the bottom of the dmesg log already attached.  The only difference in Xorg.0.log (aside from the timestamp at the top) is:

@@ -253,8 +253,8 @@
 (II) intel(0): 0x00000000:            end of aperture
 (II) intel(0): BO memory allocation layout:
 (II) intel(0): 0x00000000:            start of memory manager
-(II) intel(0): 0x09891000-0x09c78fff: front buffer (4000 kB) X tiled
-(II) intel(0): 0x09881000-0x0988afff: HW cursors (40 kB)
+(II) intel(0): 0x09ca2000-0x0a089fff: front buffer (4000 kB) X tiled
+(II) intel(0): 0x09c92000-0x09c9bfff: HW cursors (40 kB)
 (II) intel(0): 0x00000000:            end of memory manager
 (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
 (II) intel(0): DPMS enabled

where the base address seems to increase with each execution; for the cursors line, I saw the following sequence: 0x09881000, 0x09c92000, 0x0a0a2000, 0x0a4b2000, 0x0b4dd000, 0x0b8ed000, 0x0c518000, 0x0c928000.
Comment 4 Jesse Barnes 2009-05-11 11:21:59 UTC
Adjusting severity: crashes & hangs should be marked critical.
Comment 5 Jesse Barnes 2009-05-11 12:22:35 UTC
It looks like you don't have the framebuffer console driver loaded/builtin?  If you want to see something when X isn't up you'll need that, it's CONFIG_FRAMEBUFFER_CONSOLE in the kernel config iirc.
Comment 6 Andrew Church 2009-05-11 17:16:54 UTC
That's correct, I don't have framebuffer support compiled in.  Through 2.6.28 I've used the standard 80x25 text mode with no problems; is this a change in behavior?
Comment 7 Jesse Barnes 2009-05-11 18:17:46 UTC
Yes. :)  KMS takes over the graphics hardware, so you don't get the legacy vgacon driver anymore, you have to use a framebuffer console (if you want a console at all that is).
Comment 8 Andrew Church 2009-05-11 18:49:45 UTC
Thanks for the information -- I've confirmed that either setting CONFIG_FRAMEBUFFER_CONSOLE or unsetting CONFIG_DRM_I915_KMS allows X to restore the console normally.  (I'm not sure why I had KMS set; the only warning in the help was about "old userspaces", so I may have figured it was safe to enable.)

In any case, I'd suggest that locking up the console if fbcon isn't available is not an ideal behavior (: so reopening to ask:  Is it not possible for the driver to at least detect this situation and abort?  If not, I'd suggest that DRM_I915_KMS should autoselect FRAMEBUFFER_CONSOLE in the kernel config.
Comment 9 Andrew Church 2009-05-11 18:53:03 UTC
(In reply to comment #8)
> If not, I'd suggest that
> DRM_I915_KMS should autoselect FRAMEBUFFER_CONSOLE in the kernel config.

... or at least specifically warn that fbcon is required if one wants a console (since I suppose there may be some people who don't need one).
Comment 10 Jesse Barnes 2009-05-12 09:10:26 UTC
Yeah, people have been getting bitten by this lately.  Pushed to the drm repo:

commit f29ce72795bf335553ab972606bc576b5473995e
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue May 12 09:08:31 2009 -0700

    drm/i915: automatically select FRAMEBUFFER_CONSOLE if !EMBEDDED

I'll send Linus a pull request shortly.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.