Bug 50010 - [uxa GM965/GL960] both displays become blank after switching between VGA1 and LVDS1
Summary: [uxa GM965/GL960] both displays become blank after switching between VGA1 and...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 09:00 UTC by max
Modified: 2012-06-18 08:52 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (58.64 KB, text/plain)
2012-05-16 09:01 UTC, max
no flags Details
i915_error_state (760.24 KB, text/plain)
2012-05-16 09:02 UTC, max
no flags Details
intel_reg_dumper (after switching to console and back) (11.11 KB, text/plain)
2012-05-16 09:03 UTC, max
no flags Details
dmesg with errors (drm.debug=0x06) (123.45 KB, text/plain)
2012-05-16 09:04 UTC, max
no flags Details
dmesg taken after reboot, with kernel boot log (76.72 KB, text/plain)
2012-05-16 09:07 UTC, max
no flags Details
full dmesg, both screens blank, no call traces, 8-th call of xrandr (268.75 KB, text/plain)
2012-05-20 10:03 UTC, max
no flags Details
full dmesg, both screens blank, with call traces, second call of xrandr VGA1->LVDS1 (174.58 KB, text/plain)
2012-05-20 10:04 UTC, max
no flags Details
i915_error_state, kernel: 3.4.0-994-generic #201205220703, xserver-xorg-video-intel: 2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt~precise (760.25 KB, text/plain)
2012-05-22 19:06 UTC, max
no flags Details

Description max 2012-05-16 09:00:38 UTC
The following bug can be reproduced with compiz,
I do not see the similar failure in unity-2d session.

If I start Ubuntu Unity session, launch xterm
and repeat the following commands several times

xrandr --output LVDS1 --off --output VGA1 --auto
xrandr --output VGA1 --off --output LVDS1 --auto

I get the both displays blank and I can not restore image
by switching to a console and back ([Ctrl+Alt+F1], [Alt+F7]).
Xorg.0.log is clean, but I see some errors in dmesg.
Since the top of dmesg was lost, I will attach the dmesg taken
after the next boot.

I should add that now I use drm-intel-experimental kernel ppa.

System info:

lspci
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960
Integrated Graphics Controller (primary) (rev 03)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated
Graphics Controller (secondary) (rev 03)

system architecture: i386

 xserver-xorg-video-intel
Version: 2:2.19.0+git20120509.a83d90ee-0ubuntu0sarvatt~precise
 xserver-xorg-core
Version:
2:1.12.1.901+git20120510+server-1.12-branch.58dfb139-0ubuntu0ricotz~precise
 libgl1-mesa-dri
Version: 8.1~git20120509.788fd04d-0ubuntu0sarvatt~precise
 libdrm-intel1
Version: 2.4.34+git20120512.e07b6506-0ubuntu0ricotz~precise

kernel:
3.4.0-994-generic #201205140405 SMP Mon May 14 08:12:49 UTC 2012 i686 i686 i386 GNU/Linux
from http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-experimental/current/

Linux distribution: Ubuntu 12.04 with xorg-edgers ppa

ASUS F80L laptop

External monitor (LG L2000CP) connected through VGA connector
Comment 1 max 2012-05-16 09:01:47 UTC
Created attachment 61721 [details]
Xorg.0.log
Comment 2 max 2012-05-16 09:02:35 UTC
Created attachment 61722 [details]
i915_error_state
Comment 3 max 2012-05-16 09:03:36 UTC
Created attachment 61723 [details]
intel_reg_dumper (after switching to console and back)
Comment 4 max 2012-05-16 09:04:34 UTC
Created attachment 61724 [details]
dmesg with errors (drm.debug=0x06)
Comment 5 max 2012-05-16 09:07:21 UTC
Created attachment 61725 [details]
dmesg taken after reboot, with kernel boot log
Comment 6 Chris Wilson 2012-05-17 01:59:23 UTC
Believe fixed with 3.5:

commit 0f91128d88bbb8b0a8e7bb93df2c40680871d45a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 17 10:05:38 2012 +0100

    drm/i915: Wait for all pending operations to the fb before disabling the pip
    
    During modeset we have to disable the pipe to reconfigure its timings
    and maybe its size. Userspace may have queued up command buffers that
    depend upon the pipe running in a certain configuration and so the
    commands may become confused across the modeset. At the moment, we use a
    less than satisfactory kick-scanline-waits should the GPU hang during
    the modeset. It should be more reliable to wait for the pending
    operations to complete first, even though we still have a window for
    userspace to submit a broken command buffer during the modeset.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 7 max 2012-05-17 08:17:40 UTC
Chris, after you closed #49925 as fixed, I have installed
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-experimental/2012-05-14-precise
kernel. In the CHANGES file I see
Chris Wilson (70):
drm/i915: Wait for all pending operations to the fb before disabling the pipe

So my assumption is the patch should be applied.

Now I need more switches LVDS1<->VGA1 before the displays become unusable.
CapsLock works when the both screens are blank. I do not have to use magic
SysRq keys to reboot the laptop. I can just switch to the console with
[Ctrl+Alt+F1] and reboot with [Ctrl+Alt+Del].

So the bug is not fixed.
Comment 8 Daniel Vetter 2012-05-19 14:05:33 UTC
With the latest kernel, is there anything in dmesg?
Comment 9 max 2012-05-20 07:51:05 UTC
The latest kernel in
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-experimental/
is of May, 14. I reported this bug with that kernel.

The following, I think, is irrelevant
http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/2012-05-19-precise/
Anyway, the displays become unusable just after second xrandr.
Comment 10 Daniel Vetter 2012-05-20 08:03:44 UTC
Max, the drm-intel-experimental kernel is new enough. My question was whether there's anything in dmesg with that kernel (like for the older ones)?
Comment 11 max 2012-05-20 08:17:52 UTC
Actually, I do not, what I should look for.

The first serious error with drm-intel-experimental (2012-05-14)
https://bugs.freedesktop.org/attachment.cgi?id=61724
[  404.205642] WARNING: at /home/apw/COD/linux/drivers/gpu/drm/i915/intel_display.c:906 intel_enable_pipe+0x144/0x190 [i915]()

You can compare with older kernel (mainline, 2012-05-12):
https://bugs.freedesktop.org/show_bug.cgi?id=49925
https://bugs.freedesktop.org/attachment.cgi?id=61636
[  555.006211] WARNING: at /home/apw/COD/linux/drivers/gpu/drm/i915/intel_display.c:807 intel_enable_pipe+0x124/0x150 [i915]()

Daniel, could you, please, specify, what kernels you would like to compare
(preferably in .deb's)
Comment 12 Daniel Vetter 2012-05-20 08:40:45 UTC
On Sun, May 20, 2012 at 5:17 PM,  <bugzilla-daemon@freedesktop.org> wrote:
> --- Comment #11 from max <manikulin@gmail.com> 2012-05-20 08:17:52 PDT ---
> The first serious error with drm-intel-experimental (2012-05-14)
> https://bugs.freedesktop.org/attachment.cgi?id=61724
> [  404.205642] WARNING: at
> /home/apw/COD/linux/drivers/gpu/drm/i915/intel_display.c:906
> intel_enable_pipe+0x144/0x190 [i915]()

So to double-check: This dmesg is from drm-intel-experimental kernels?
It's not clear from the title of the attachment, hence why I've asked
whether you could look for errors in dmesg (or attach the full dmesg).

Btw, that dmesg is cut off. You can extend the dmesg buffer with
log_buf_size=4M on the kernel cmdline.
Comment 13 max 2012-05-20 09:05:22 UTC
Sure, all files attached to this bug was obtained
with drm-intel-experimental kernel, namely
3.4.0-994-generic #201205140405 SMP Mon May 14 08:12:49 UTC 2012 i686 i686 i386

I will try to get a continuous dmesg, in the meanwhile
you can look at
https://bugs.freedesktop.org/attachment.cgi?id=61725
(just after boot)
Comment 14 Daniel Vetter 2012-05-20 09:23:45 UTC
Ok, the interesting bit is:

[  404.925971] WARNING: at /home/apw/COD/linux/drivers/gpu/drm/i915/intel_display.c:906 intel_enable_pipe+0x144/0x190 [i915]()
[  404.925975] Hardware name: F80L                
[  404.925978] PLL state assertion failure (expected on, current off)
[  404.925981] Modules linked in: rfcomm bnep parport_pc ppdev arc4 snd_hda_codec_realtek ath9k mac80211 ath9k_common ath9k_hw ath snd_hda_intel snd_hda_codec i915 coretemp snd_hwdep joydev btusb snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq cfg80211 bluetooth drm_kms_helper asus_laptop sparse_keymap microcode snd_timer drm snd_seq_device psmouse mac_hid serio_raw input_polldev snd i2c_algo_bit video soundcore snd_page_alloc lp parport hid_a4tech usbhid hid r8169
[  404.926036] Pid: 1479, comm: Xorg Tainted: G        W    3.4.0-994-generic #201205140405
[  404.926040] Call Trace:
[  404.926049]  [<c1035832>] warn_slowpath_common+0x72/0xa0
[  404.926068]  [<f83c6464>] ? intel_enable_pipe+0x144/0x190 [i915]
[  404.926087]  [<f83c6464>] ? intel_enable_pipe+0x144/0x190 [i915]
[  404.926092]  [<c1035903>] warn_slowpath_fmt+0x33/0x40
[  404.926110]  [<f83c6464>] intel_enable_pipe+0x144/0x190 [i915]
[  404.926130]  [<f83c658d>] i9xx_crtc_enable+0x5d/0xa0 [i915]
[  404.926148]  [<f83c6776>] i9xx_crtc_dpms+0x16/0x40 [i915]
[  404.926166]  [<f83c41d5>] intel_crtc_dpms+0x45/0x130 [i915]
[  404.926184]  [<f83c1927>] ? intel_crtc_update_cursor+0x1b7/0x2d0 [i915]
[  404.926192]  [<f8432408>] drm_helper_connector_dpms+0xb8/0x230 [drm_kms_helper]
[  404.926210]  [<f83c4190>] ? assert_fdi_rx+0xa0/0xa0 [i915]
[  404.926229]  [<f84e9a42>] drm_mode_connector_property_set_ioctl+0x1f2/0x200 [drm]
[  404.926244]  [<f84e9c51>] ? drm_mode_getproperty_ioctl+0x161/0x2c0 [drm]
[  404.926258]  [<f84dce46>] drm_ioctl+0x2d6/0x460 [drm]
[  404.926274]  [<f84e9850>] ? drm_mode_gamma_set_ioctl+0x110/0x110 [drm]
[  404.926282]  [<c1581c9f>] ? do_page_fault+0x1bf/0x410
[  404.926295]  [<f84dcb70>] ? drm_version+0xa0/0xa0 [drm]
[  404.926300]  [<c114b5c6>] do_vfs_ioctl+0x86/0x2d0
[  404.926305]  [<c114b887>] sys_ioctl+0x77/0x80
[  404.926310]  [<c1053432>] ? sys_clock_gettime+0xa2/0xc0
[  404.926315]  [<c158569f>] sysenter_do_call+0x12/0x28
[  404.926319] ---[ end trace 94217516ae9061a8 ]---

We seem to loose track of plls :(
Comment 15 max 2012-05-20 10:01:10 UTC
Daniel, I think you mean buf_log_len=4M

I have grabbed two full dmesgs (I have Xorg logs,
i915_error_state's and intel_reg_dumper logs as well).

The first dmesg does not contain call traces, the second does.
The only difference, the latter case I did not wait 10 seconds
(timeout in my script to collect all logs), I press [Ctrl+Alt+F1]
to restore image in a couple of seconds.

The tail of first Xorg.0.log

[   427.770] (II) intel(0): Allocated new frame buffer 1280x800 stride 5120, tiled
[   427.845] (WW) intel(0): I830DRI2ScheduleWaitMSC:1524 get vblank counter failed: Invalid argument
[   427.851] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   427.864] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   427.999] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   428.070] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   428.070] (WW) intel(0): first get vblank counter failed: Invalid argument
[   428.078] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   428.078] (WW) intel(0): first get vblank counter failed: Invalid argument
[   434.596] (EE) intel(0): Detected a hung GPU, disabling acceleration.
[   434.596] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg.

The tail of second Xorg.0.log (last II does not preset in the log above)

[   216.969] (II) intel(0): Allocated new frame buffer 1280x800 stride 5120, tiled
[   217.048] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   217.081] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   217.177] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   217.248] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   217.248] (WW) intel(0): first get vblank counter failed: Invalid argument
[   217.257] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed: Invalid argument
[   217.257] (WW) intel(0): first get vblank counter failed: Invalid argument
[   223.776] (EE) intel(0): Detected a hung GPU, disabling acceleration.
[   223.776] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg.
[   224.072] (II) AIGLX: Suspending AIGLX clients for VT switch


 3.4.0-994-generic #201205140405 SMP Mon May 14 08:12:49 UTC 2012 i686 i686 i386 GNU/Linux

xserver-xorg-video-intel
Version: 2:2.19.0+git20120509.a83d90ee-0ubuntu0sarvatt~precise
xserver-xorg-core
Version: 2:1.12.1.902+git20120520+server-1.12-branch.4a2b8eeb-0ubuntu0ricotz~precise
libgl1-mesa-dri
Version: 8.1~git20120509.788fd04d-0ubuntu0sarvatt~precise
libdrm-intel1
Version: 2.4.34+git20120520.481234f2-0ubuntu0ricotz~precise
Comment 16 max 2012-05-20 10:03:26 UTC
Created attachment 61881 [details]
full dmesg, both screens blank, no call traces, 8-th call of xrandr
Comment 17 max 2012-05-20 10:04:57 UTC
Created attachment 61882 [details]
full dmesg, both screens blank, with call traces, second call of xrandr VGA1->LVDS1
Comment 18 Chris Wilson 2012-05-21 08:14:51 UTC
(In reply to comment #15)
> The tail of second Xorg.0.log (last II does not preset in the log above)
> 
> [   216.969] (II) intel(0): Allocated new frame buffer 1280x800 stride 5120,
> tiled
> [   217.048] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed:
> Invalid argument
> [   217.081] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed:
> Invalid argument
> [   217.177] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed:
> Invalid argument
> [   217.248] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed:
> Invalid argument
> [   217.248] (WW) intel(0): first get vblank counter failed: Invalid argument
> [   217.257] (WW) intel(0): I830DRI2GetMSC:1457 get vblank counter failed:
> Invalid argument
> [   217.257] (WW) intel(0): first get vblank counter failed: Invalid argument
> [   223.776] (EE) intel(0): Detected a hung GPU, disabling acceleration.
> [   223.776] (EE) intel(0): When reporting this, please include
> i915_error_state from debugfs and the full dmesg.
> [   224.072] (II) AIGLX: Suspending AIGLX clients for VT switch

I believe this to be fixed by

commit 9fb18462ec1428a486f998585e7b4caf4dd08f53
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon May 21 14:12:23 2012 +0100

    sna: Confirm that the modeset takes
    
    If we attempt to change to a mode with a disabled connector the kernel
    will silently switch off that connector (and crtc) and report that the
    modeswitch is successful.
    
    Reported-by: Kyle Hill <kyle.hill@tacomafia.net>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=50078
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk

However, I think for comment 16 we are going to be looking at the kernel again.
in xf86-video-intel.git (sna) So back to Daniel :-p
Comment 19 max 2012-05-21 10:21:50 UTC
The latest build in
https://launchpad.net/~sarvatt/+archive/intel-sna
was on May, 10, so it does not contain
`sna: Confirm that the modeset takes' patch.

I plan to wait for an appropriate build.

I have updated to
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-experimental/2012-05-21-precise/
and, no surprise, nothing changed. X server can hang with or without
call trace in dmesg. I can only add that CapsLock switches the LED,
but I can not run any command in xterm.
Comment 20 max 2012-05-22 09:44:47 UTC
I have updated my system to the latest xorg-edgers
and drm-intel-experimental.

I am confused by changelog
/usr/share/doc/xserver-xorg-video-intel/changelog.Debian.gz
xserver-xorg-video-intel (2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt~precise) precise; urgency=low

  * Checkout from git 20120521 (master branch) up to commit
    afdaf184594bfe3633305969eb1166c28e1006bf
...
  * Note: SNA is now disabled due to long-standing incompatibilities
    with unity.

That commit is later than `sna: Confirm that the modeset takes'.
On the other hand SNA is disabled.

Anyway the bug persists.
 3.4.0-994-generic #201205220703 SMP Tue May 22 11:15:43 UTC 2012 i686 i686 i386 GNU/Linux

[  427.103496] WARNING: at /home/apw/COD/linux/drivers/gpu/drm/i915/intel_display.c:906 intel_enable_pipe+0x144/0x190 [i915]()
[  427.103499] Hardware name: F80L                
[  427.103501] PLL state assertion failure (expected on, current off)
[  427.103502] Modules linked in: rfcomm bnep parport_pc ppdev snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq ath9k mac80211 ath9k_common ath9k_hw i915 ath snd_timer snd_seq_device btusb joydev coretemp snd bluetooth cfg80211 drm_kms_helper drm soundcore snd_page_alloc mac_hid microcode i2c_algo_bit asus_laptop sparse_keymap input_polldev video psmouse serio_raw lp parport hid_a4tech usbhid hid r8169
[  427.103537] Pid: 2430, comm: Xorg Not tainted 3.4.0-994-generic #201205220703
[  427.103539] Call Trace:
[  427.103548]  [<c1035832>] warn_slowpath_common+0x72/0xa0
[  427.103566]  [<f83b8e54>] ? intel_enable_pipe+0x144/0x190 [i915]
[  427.103584]  [<f83b8e54>] ? intel_enable_pipe+0x144/0x190 [i915]
[  427.103588]  [<c1035903>] warn_slowpath_fmt+0x33/0x40
[  427.103606]  [<f83b8e54>] intel_enable_pipe+0x144/0x190 [i915]
[  427.103625]  [<f83bb03a>] i9xx_crtc_mode_set+0x4ba/0x7a0 [i915]
[  427.103641]  [<f839a0ec>] ? i915_pipe_enabled+0x1c/0x30 [i915]
[  427.103657]  [<f845daa9>] ? drm_vblank_get+0x69/0x150 [drm]
[  427.103676]  [<f83b9998>] intel_crtc_mode_set+0x58/0x90 [i915]
[  427.103684]  [<f832ebed>] drm_crtc_helper_set_mode+0x2ed/0x4d0 [drm_kms_helper]
[  427.103694]  [<f832fc8e>] drm_crtc_helper_set_config+0x93e/0x9e0 [drm_kms_helper]
[  427.103702]  [<f832dc94>] drm_fb_helper_set_par+0x64/0xd0 [drm_kms_helper]
[  427.103707]  [<c12ea3b9>] fb_set_var+0x189/0x3d0
[  427.103714]  [<c11c3859>] ? ext4_da_write_end+0xb9/0x310
[  427.103719]  [<c1069d3d>] ? update_curr+0x24d/0x2a0
[  427.103724]  [<c106a93f>] ? enqueue_sleeper+0x21f/0x2f0
[  427.103728]  [<c12f48ae>] fbcon_blank+0x1fe/0x300
[  427.103734]  [<c135622c>] do_unblank_screen+0xac/0x1c0
[  427.103738]  [<c157e82f>] ? _raw_spin_lock_irqsave+0x2f/0x50
[  427.103742]  [<c134bacc>] complete_change_console+0x5c/0x100
[  427.103745]  [<c134ccec>] vt_ioctl+0x106c/0x1160
[  427.103760]  [<f8460410>] ? drm_master_put+0x30/0x30 [drm]
[  427.103764]  [<c134bc80>] ? vt_event_wait_ioctl+0x80/0x80
[  427.103768]  [<c134198c>] tty_ioctl+0x22c/0x860
[  427.103773]  [<c1171dc7>] ? fsnotify+0x197/0x2b0
[  427.103776]  [<c157e7fd>] ? _raw_spin_lock+0xd/0x10
[  427.103780]  [<c1341760>] ? tiocspgrp+0x130/0x130
[  427.103784]  [<c114b5c6>] do_vfs_ioctl+0x86/0x2d0
[  427.103788]  [<c113af70>] ? do_sync_readv_writev+0xe0/0xe0
[  427.103791]  [<c114b887>] sys_ioctl+0x77/0x80
[  427.103795]  [<c158585f>] sysenter_do_call+0x12/0x28
Comment 21 Chris Wilson 2012-05-22 09:58:21 UTC
(In reply to comment #20)
> I have updated my system to the latest xorg-edgers
> and drm-intel-experimental.
> 
> I am confused by changelog
> /usr/share/doc/xserver-xorg-video-intel/changelog.Debian.gz
> xserver-xorg-video-intel
> (2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt~precise) precise; urgency=low
> 
>   * Checkout from git 20120521 (master branch) up to commit
>     afdaf184594bfe3633305969eb1166c28e1006bf
> ...
>   * Note: SNA is now disabled due to long-standing incompatibilities
>     with unity.

Which was shooting the messenger for a deep rooted bug in mesa...
Bitter, moi?

Anyway, xorg-edgers is still UXA with a separate ppa:intel-sna for SNA.
But back to this bug...
Comment 22 Chris Wilson 2012-05-22 10:06:27 UTC
The critical detail in this bug is that we have a GPU hang that proceeds the error every time. Do you mind attaching the most recent i915_error_state to see if it is still the familiar pattern? Following a GPU hang, in my experience with crestline, I fully expect the display engine to not recover, and for the chip to be completely useless until a reboot.
Comment 23 max 2012-05-22 19:00:40 UTC
(In reply to comment #21)
> 
> Anyway, xorg-edgers is still UXA with a separate ppa:intel-sna for SNA.
> But back to this bug...

Actually, I am unsure what is SNA. If it stands for `Sandy Bridge
New Acceleration', my question is if it affects my laptop:

model name      : Intel(R) Core(TM)2 Duo CPU     T5450  @ 1.66GHz

Unfortunately I noticed changelog entry too late. The git commits id's
were similar in ppa:xorg-edgers and in ppa:intel-sna. I decided they
have the same build. I will try intel-sna later.
Comment 24 max 2012-05-22 19:06:08 UTC
Created attachment 61990 [details]
i915_error_state, kernel: 3.4.0-994-generic #201205220703, xserver-xorg-video-intel: 2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt~precise
Comment 25 max 2012-05-23 09:01:20 UTC
I should say, I have not managed to freeze X server in a reasonable
time, if SNA is enabled:

xserver-xorg-video-intel
Version: 2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt2~sna~precise

Unfortunately Unity is unusable. Panels are constantly flickering.

Also sometimes a display stays blank after xrandr command.
More often it happens after switching to LVDS1. The new symptom
that LVDS1 brightness can be just dimmed. Normal brightness
can be restored by switching to a console and back or by
[Fn+F6].

On switching to LVDS1 color stripes appear for a moment in the
bottom part of the screen. This part was quite small in the beginning
but gradually grew to approximately to a half of the screen.

I have tried hibernate and suspend to RAM. The password request
to unlock the screen was flickering too. Mostly just the password
entry was visible (no text around and no buttons).

I wonder if the flickering is a feature of Unity or other
desktop environment and window manager suffer as well (as bad).

Another question if there is a workaround, e.g. partially disabled
hardware acceleration (with reasonably fast image update).
Comment 26 Chris Wilson 2012-05-25 05:19:42 UTC
(In reply to comment #25)
> Unfortunately Unity is unusable. Panels are constantly flickering.
[snip]
> I wonder if the flickering is a feature of Unity or other
> desktop environment and window manager suffer as well (as bad).

Nope, that was a silly bug where back/front buffers got flipped following a DPSM off. Fixed.
Comment 27 max 2012-05-27 07:35:12 UTC
It's getting better. It isn't flickering all the time
any more. However the left panel is flickering for a couple
of seconds on startup, and every time I invoke a context
menu or click on another input field.

I got tired trying to hang x server by switching to VGA1 and
back to LVDS1. It works. Although LVDS1 brightness is low at first.
I can restore it by switching to the console and back.

Version info:
3.4.0-994-generic #201205260421 SMP Sat May 26 08:29:18 UTC 2012 i686 i686 i386 GNU/Linux
At first I installed the latest xorg-edger packages, but since
the x server built with SNA disabled, I have downgraded to the
version in the intel-sna ppa.
xserver-xorg-video-intel:
  Installed: 2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt2~sna~precise
  Candidate: 2:2.19.0+git20120525.317bf051-0ubuntu0sarvatt~precise

Other notes:
It is flickering when I switch windows by [Alt+Tab]. Some times
only a part of application window is updated (windows icons
remains in the center of the screen).

I see some problems with full-screen applications. When I second time
launch extreme-tux-racer the left panel is flickering as well.

It seems that google Earth can hang the GPU in a couple of minutes.
Oops, I got black screen when only firefox and xterm were running in Unity, while
I was writing this comment.
It is not ready for "production" yet.

In /var/crash:
dmesg
 [ 1599.356178] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
 [ 1599.356187] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
 [ 1599.357435] [drm:i915_error_work_func], resetting chip
 [ 1599.860220] [drm:i915_reset] *ERROR* Failed to reset chip.
 [ 1599.896631] [drm:intel_crtc_cursor_set],
 [ 1599.896638] [drm:intel_crtc_cursor_set], cursor off
 [ 1599.906594] [drm:intel_crtc_cursor_set],
 [ 1600.023877] [drm:drm_crtc_helper_set_config],
 [ 1600.023883] [drm:drm_crtc_helper_set_config], [CRTC:4] [NOFB]

Xorg.0.log (nothing with similar timestamps in dmesg)
 [   604.134] (II) intel(0): switch to mode 1280x800 on crtc 4 (pipe 1)
 [  1132.166] [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.
 [  1132.166] 
 [  1132.166] Backtrace:
 [  1132.166] 0: /usr/bin/X (xorg_backtrace+0x49) [0xb770aeb9]
 [  1132.166] 1: /usr/bin/X (mieqEnqueue+0x223) [0xb76e9213]
 [  1132.166] 2: /usr/bin/X (0xb7585000+0x4cdf5) [0xb75d1df5]
 [  1132.166] 3: /usr/bin/X (xf86PostMotionEventM+0xf9) [0xb760e359]
 [  1132.167] 4: /usr/lib/xorg/modules/input/evdev_drv.so (0xb696a000+0x3c3d) [0xb696dc3d]
 [  1132.167] 5: /usr/lib/xorg/modules/input/evdev_drv.so (0xb696a000+0x528f) [0xb696f28f]
 [  1132.167] 6: /usr/bin/X (0xb7585000+0x780d1) [0xb75fd0d1]
 [  1132.167] 7: /usr/bin/X (0xb7585000+0x9f7d8) [0xb76247d8] 
 [  1132.167] 8: (vdso) (__kernel_sigreturn+0x0) [0xb7562400] 
 [  1132.167] 9: (vdso) (__kernel_vsyscall+0x10) [0xb7562424]
 [  1132.167] 10: /lib/i386-linux-gnu/libc.so.6 (ioctl+0x19) [0xb72b4869]
 [  1132.167] 11: /usr/lib/i386-linux-gnu/libdrm.so.2 (drmIoctl+0x34) [0xb6fec8c4]
 [  1132.167] 12: /usr/lib/i386-linux-gnu/libdrm.so.2 (drmCommandNone+0x31) [0xb6fef351]
 [  1132.167] 13: /usr/lib/xorg/modules/drivers/intel_drv.so (0xb6eef000+0x33793) [0xb6f22793]
 [  1132.167] 14: /usr/lib/xorg/modules/drivers/intel_drv.so (0xb6eef000+0x58749) [0xb6f47749]
 [  1132.167] 15: /usr/lib/xorg/modules/drivers/intel_drv.so (0xb6eef000+0x6603e) [0xb6f5503e]
 [  1132.167] 16: /usr/bin/X (BlockHandler+0x56) [0xb75c09d6]
 [  1132.167] 17: /usr/bin/X (WaitForSomething+0x10b) [0xb770806b]
 [  1132.167] 18: /usr/bin/X (0xb7585000+0x37722) [0xb75bc722]
 [  1132.167] 19: /usr/bin/X (0xb7585000+0x253ca) [0xb75aa3ca]
 [  1132.168] 20: /lib/i386-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0xb71eb4d3]
 [  1132.168] 21: /usr/bin/X (0xb7585000+0x25709) [0xb75aa709]
 [  1132.168] 
 [  1132.168] [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.
 [  1132.168] [mi] mieq is *NOT* the cause.  It is a victim.
 [  1132.734] [mi] EQ overflow continuing.  100 events have been dropped.
 [  1132.734]
... (the end)
 [  1133.599]
 [  1134.533] (EE) intel(0): Detected a hung GPU, disabling acceleration.
 [  1134.534] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg.
 [  1135.036] [mi] Increasing EQ size to 512 to prevent dropped events.
 [  1135.037] [mi] EQ processing has resumed after 385 dropped events.
 [  1135.037] [mi] This may be caused my a misbehaving driver monopolizing the server's resources.
 [  1135.653] (II) intel(0): EDID vendor "AUO", prod id 17476
 [  1135.653] (II) intel(0): Printing DDC gathered Modelines:
 [  1135.653] (II) intel(0): Modeline "1280x800"x0.0   68.94  1280 1301 1333 1408  800 803 808 816 -hsync -vsync (49.0 kHz eP)
 [  1161.488] (II) AIGLX: Suspending AIGLX clients for VT switch
 [  1169.681] (II) UnloadModule: "synaptics"
 [  1169.681] (II) evdev: AT Translated Set 2 keyboard: Close
 [  1169.681] (II) UnloadModule: "evdev"
 [  1169.681] (II) evdev: Asus Laptop extra buttons: Close
 [  1169.681] (II) UnloadModule: "evdev"
 [  1169.681] (II) evdev: A4Tech USB Mouse: Close
 [  1169.681] (II) UnloadModule: "evdev"
 [  1169.681] (II) evdev: Sleep Button: Close
 [  1169.681] (II) UnloadModule: "evdev"
 [  1169.681] (II) evdev: Video Bus: Close
 [  1169.681] (II) UnloadModule: "evdev"
 [  1169.681] (II) evdev: Power Button: Close
 [  1169.685] (II) UnloadModule: "evdev"
 [  1169.709]  ddxSigGiveUp: Closing log
 [  1169.709] Server terminated successfully (0). Closing log file.

Another strange thing that just after ("cold") boot (lightdm is disabled)
I can randomly get login prompt in "thick" font (2 pixels) of "thin" one
(1 pixel vertical line). Even more strange that "root" and following text
can be darker than "login:". I was suspecting grub, but I failed to guess
how I can reproduce a certain state of login prompt.
Comment 28 max 2012-06-13 05:37:33 UTC
I should say that now I can not reproduce the problem
neither with intel-sna version of xserver-xorg-video-intel
nor with the build from xorg-edgers ppa.

Ubuntu 12.04 + xorg-edgers (precise) + drm-intel-experimental
(2012-06-13-quantal):

xserver-xorg-video-intel
Version: 2:2.19.0+git20120606.c433fb45-0ubuntu0sarvatt~precise
xserver-xorg-core
Version: 2:1.12.2+git20120605+server-1.12-branch.aaf48906-0ubuntu0ricotz~precise
libgl1-mesa-dri
Version: 8.1~git20120529.f92b2e5e-0ubuntu0sarvatt~precise
libdrm-intel1
Version: 2.4.35+git20120611.9e0026d3-0ubuntu0sarvatt~precise
kernel
3.4.0-994-generic #201206130406 SMP Wed Jun 13 08:15:01 UTC 2012 i686 i686 i386 GNU/Linux

More than 20 switches LVDS1<->VGA1 and no hang.
Comment 29 Daniel Vetter 2012-06-13 06:20:44 UTC
I guess one of Chris' recent fixes has helped. Thanks a lot for reporting this bug and please reopen if it shows up again.


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.