Created attachment 62651 [details] dmesg If I start X server startx /usr/bin/xterm connect external monitor switch to external monitor and back xrandr --output LVDS1 --off --output VGA1 --auto xrandr --output VGA1 --off --output LVDS1 --auto (usually I have to switch to a console and back with [Ctrl+Alt+F1] [Alt+F7] in the meanwhile, otherwise a screen can be black) At this point I have xterm window on the internal screen. If I unplug VGA connector, the console (e.g. vt1) appears at the screen (the first idea was X server crash, but it is alive at vt7) I would expect that connector unplugging should not lead to switching of vt. 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) uname -m i686 xserver-xorg-video-intel Version: 2:2.19.0+git20120521.afdaf184-0ubuntu0sarvatt2~sna~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.34+git20120520.481234f2-0ubuntu0ricotz~precise kernel: 3.4.0-994-generic #201206050409 SMP Tue Jun 5 08:17:32 UTC 2012 i686 i686 i386 GNU/Linux Ubuntu-12.04 + ppa:xorg-edgers + ppa:intel-sna + drm-intel-experimental kernel Asus F80L laptop i915_error_state no error state collected
Created attachment 62652 [details] Xorg.0.log
Created attachment 62653 [details] intel_reg_dumper
Created attachment 62654 [details] [review] add printk to fb helper function Please apply this debug patch, boot again with drm.debug=0xe, reproduce the issue and then attach the complete dmesg. Thanks.
Created attachment 62931 [details] dmesg with the patch applied and drm.debug=0x0e Sorry for the delay
Created attachment 63020 [details] [review] properly delay fbcon hotplug handling Patch for you to try. My theory is that the vt-switching you're doing is the important part necessary to confuse the kms fbcon. So when testing please try all the various combinations of vt-switches that are usually required to make your system work.
This will help with the inconsistency from the userspace side of things: commit 4e50467b4f50b522a07bedae7ff68b9c37362af8 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jun 14 17:40:09 2012 +0100 uxa: Force the outputs to off for consistency with xf86DisableUnusedFunction Upon a VT switch, we set the desired modes and turn off the DPMS on any unused output. Make this explicit so that we always maintain consistency between the kernel and X's list of enabled CRTCs. References: https://bugs.freedesktop.org/show_bug.cgi?id=50772 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(In reply to comment #5) > Created attachment 63020 [details] [review] [review] > properly delay fbcon hotplug handling It seems, the patch works. I plan to test the patch written by Chris a bit later. > Patch for you to try. My theory is that the vt-switching you're doing is the > important part necessary to confuse the kms fbcon. So when testing please try > all the various combinations of vt-switches that are usually required to make > your system work. Daniel, sorry, it is not clear for me what you mean by various combinations of vt switches. Usually I use [Ctrl+Alt+F[1-6]]. I can remember `chvt'. I realized that no vt change happens. X remains active, but the image on the screen appears from vt1, I have applied your patch on the top of your backlight-confusion branch (just to save an hour for kernel compiling). Since you suspect fbcon, the detailed description of my steps: grub menu boot the patched kernel ubuntu splash screen vt1 with login prompt on LVDS1, 1280x800 native resolution startx /usr/bin/ck-launch-session xterm X server on vt7 with xterm LVDS1, 1280x800 connect VGA cable and turn on the monitor LVDS1 1280x800, VGA1 power saving mode xrandr --output LVDS1 --off --output VGA1 --auto LVDS1 black (likely no backlight) VGA1 black 1600x1200 native resolution [Ctrl+Alt+F2] vt2 LVDS1 very dim backlight 1280x800 VGA1 1280x768@85Hz (Probably the issue for another bug: not 1280x800) [Alt+F7] xserver LVDS1 black, no backlight VGA1 normal image 1600x1200 xrandr --output VGA1 --off --output LVDS1 --auto LVDS1 black, no backlight VGA1 power saving mode [Ctrl+Alt+F2] vt2 LVDS1 black (likely no backlight) VGA1 1280x768@85Hz [Alt+F7] xserver LVDS1 normal image 1280x800 VGA1 power saving mode turn off monitor, unplug VGA cable No problem with the patched kernel. If drm-intel-experimental of 2012-06-13 kernel is booted, text console appears on LVDS1. [Alt+F7] does not lead to switch to x server, [Ctrl+Alt+F1] [Alt+F7] does. Some new characters in xterm due to firs hit of [Alt+F7]
(In reply to comment #6) > This will help with the inconsistency from the userspace side of things: > > commit 4e50467b4f50b522a07bedae7ff68b9c37362af8 Chris, in general, your patch works too. I just have tested it with linux-image-3.4.0-994-generic_3.4.0-994.201206130406_i386.deb kernel (drm-intel-experimental) and xserver-xorg-video-intel_2.19.0+git20120613.0db789e1.orig.tar.gz sources from xorg-edgers. I have to say that the patch has two side effects. Firstly, the good one. In relation to Bug 49688 the patch increases probability that image will appear on the screen without switching to a console and back. Usually switching to LVDS1 works good, but after switching to VGA1 an addition kick is required. If I connect/disconnect external monitor more times, VGA1 becomes more successful in displaying image just after xrandr command. Secondly, bad news. Two times X server failed in a strange state.After xrandr text console appeared on both screens, no reaction on the keyboard. I tried [Alt+SysRq+R] [Ctrl+Alt+F1] and xterm appeared on the screen. That was when I connected the external monitor second time. Unfortunately, it happens not every boot.
Can I have your tested-by for the kernel patch please so that I can submit it? I.e. Tested-by: full name <mail@address>
I do not see the bug neither in Ubuntu xorg-edgers kernel linux-image-3.5.0-2-generic 3.5.0-2.2 nor in drm-intel-experimental linux-image-3.5.0-994-generic 3.5.0-994.201207060407. Thank you for fixing it. However just after switching to console (by exiting from xterm or by pressing [Ctrl+Alt+F1]) a blink can be noticed.
A patch referencing this bug report has been merged in Linux v3.6-rc1: commit 343065a605646b4c1fee8b1ca07b715283813b11 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri Jun 15 11:01:22 2012 +0200 drm/fb-helper: delay hotplug handling when partially bound
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.