Created attachment 51672 [details] Xorg.0.log file of failure Unable to get the second display to work using the Intel Sandybridge linux driver. The xrandr program shows that the second display, VGA2 is connected and active but there is no sync (green light) on the display. Disabling and enabling VGA2 with xrandr does not work. Only VGA1 has sync. kernel-3.0.0-1.fc16.x86_64 libdrm-2.4.26-1.fc16.x86_64 xorg-x11-drv-intel-2.16.0-2.fc16.x86_64 Displays: VGA1 IBM ThinkVision L191p Type 9149-HB7 VGA2 IBM ThinkVision L200p Type 6736-HB0 From Xorg.0.org [ 90.994] (II) Module intel: vendor="X.Org Foundation" [ 90.994] compiled for 1.10.99.902, module version = 2.16.0 [ 90.994] Module class: X.Org Video Driver [ 90.994] ABI class: X.Org Video Driver, version 11.0 ... [ 91.017] (II) intel(0): Integrated Graphics Chipset: Intel(R) Sandybridge Desktop (GT1) [ 91.017] (--) intel(0): Chipset: "Sandybridge Desktop (GT1)" From lspci -n 00:02.0 0300: 8086:0102 (rev 09) # xrandr Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.0*+ 75.0 72.0 1152x864 75.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 TV1 disconnected (normal left inverted right x axis y axis) TV2 disconnected (normal left inverted right x axis y axis) VGA2 connected 1600x1200+1280+0 (normal left inverted right x axis y axis) 408mm x 306mm 1600x1200 60.0*+ 1280x1024 75.0 60.0 1152x864 75.0 1024x768 85.0 75.1 60.0 832x624 74.6 800x600 85.1 75.0 60.3 640x480 85.0 75.0 60.0 720x400 70.1 VGA1 - Sync VGA2 - No Sync # xrandr --output VGA2 --off # xrandr Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.0*+ 75.0 72.0 1152x864 75.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 TV1 disconnected (normal left inverted right x axis y axis) TV2 disconnected (normal left inverted right x axis y axis) VGA2 connected (normal left inverted right x axis y axis) 1600x1200 60.0 + 1280x1024 75.0 60.0 1152x864 75.0 1024x768 85.0 75.1 60.0 832x624 74.6 800x600 85.1 75.0 60.3 640x480 85.0 75.0 60.0 720x400 70.1 # xrandr --output VGA2 --auto # xrandr Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.0*+ 75.0 72.0 1152x864 75.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 TV1 unknown connection (normal left inverted right x axis y axis) 1280x1024 60.0 1024x768 60.0 920x766 60.0 832x624 60.0 800x600 60.0 768x576 60.0 720x576 60.0 704x576 60.0 720x540 60.0 720x480 60.0 TV2 unknown connection (normal left inverted right x axis y axis) 1280x1024 60.0 1024x768 60.0 920x766 60.0 832x624 60.0 800x600 60.0 768x576 60.0 720x576 60.0 704x576 60.0 720x540 60.0 720x480 60.0 VGA2 unknown connection 1600x1200+1280+0 (normal left inverted right x axis y axis) 408mm x 306mm 1600x1200 60.0*+ 1280x1024 75.0 60.0 1152x864 75.0 1024x768 85.0 75.1 60.0 832x624 74.6 800x600 85.1 75.0 60.3 640x480 85.0 75.0 60.0 720x400 70.1 VGA1 - Sync VGA2 - No Sync
Created attachment 51675 [details] dmesg trace of failure
Created attachment 51678 [details] Video ROM Video ROM dd if=/dev/mem of=/tmp/rom bs=64k skip=12 count=1
Created attachment 51681 [details] intel_reg_dump before starting X
Created attachment 51682 [details] intel_reg_dump after starting X
Created attachment 51683 [details] /var/log/messages trace file
Created attachment 51684 [details] packages
Created attachment 51685 [details] Smolt Profile
Hi, a quick question on this - if you disable VGA1 and enable VGA2, does it works?
Hello What happens if you use xrandr to set other modes for VGA2? ("xrandr --output VGA2 --mode 1024x768") If you have /etc/X11/xorg.conf and/or something inside /etc/X11/xorg.conf.d, could you please attach them? If you made any changes to the default files inside /usr/share/X11/xorg.conf.d, it would be nice if you could also attach them. The output of "xrandr --verbose" when both monitors are connected might also be helpful.
A few more tests just to make sure we're not trying to set wrong modes from X: Download and compile intel-gpu-tools: - make sure you have cairo, libudev and glib development packages installed - git clone http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git - compile it (./autogen.sh; make) - ctrl+alt+f1 so you switch back to console - login as root - plug the VGA2 monitor if it's not plugged - run "tests/testdisplay -i". Paste the output here - then, run just "tests/testdisplay" (without arguments). This test tries to set all possible modes for all monitors. If you can't see anything on the VGA2 monitor, then none of the modes work and the problem is definitely something else :) Another thing: Looking at the register diff before and after starting X, the HDMIB register (used for sDVO too) also draw my attention... It is disabled after starting X. Before starting X, did the monitor show anything?
Response to Comment 8: Does it work if VGA1 is disabled? VGA2 works if VGA1 is disabled. Both screens work when VGA1 is enabled. xrandr --output VGA1 --off --output VGA2 --auto VGA1 - No Sync VGA2 - Sync xrandr --output VGA1 --auto --left-of VGA2 VGA1 - Sync VGA2 - Sync Both displays working and VGA1 is left of VGA2. :) When X is started VGA2 does not have sync even though xrandr says it does. Disabling VGA1 and then enabling VGA1 seems to work around the problem. Response to Comment 9: What happens when xrandr is set to other modes for VGA2? After X is started, setting the VGA2 to other modes does not work. VGA2 does not have sync. xrandr --output VGA2 --mode 1024x768 VGA1 - Sync VGA2 - No Sync xrandr --output VGA2 --mode 1280x1024 VGA1 - Sync VGA2 - No Sync xrandr --output VGA2 --mode 1600x1200 VGA1 - Sync VGA2 - No Sync
Created attachment 52183 [details] "xrander --verbose" output after X is started with both displays connected to VGA1 and VGA2 "xrander --verbose" output after X is started with both displays connected to VGA1 and VGA2 ports VGA1 - Sync VGA2 - No Sync
Created attachment 52185 [details] No xorg.conf file being used and the 00-system-setup-keyboard.conf file is the only thing in /etc/X11/xorg.conf.d/ No xorg.conf file being used.
Ok, so let me see if I understood: 1 - When you start X, VGA1 is working but VGA2 is not working 2 - If you try to change VGA2 on/off or change modes, it still won't work 3 - If you disable and then re-enable VGA1, VGA2 will start working Is this correct? If it is correct, then it would be nice if you could attach the output of the "intel_reg_dumper" command in the cases described as "1" and "3" above. The difference between the registers in the two cases may tell us what is wrong... One question: before you start X, is VGA2 working?
Response to Comment 14: >Ok, so let me see if I understood: > >1 - When you start X, VGA1 is working but VGA2 is not working >2 - If you try to change VGA2 on/off or change modes, it still won't work >3 - If you disable and then re-enable VGA1, VGA2 will start working > >Is this correct? Yes, that is correct. VGA2 starts working when VGA1 is disabled. VGA2 continues to work after enabling VGA1. >One question: before you start X, is VGA2 working? No. When the system is booted, the BIOS screen is displayed on both VGA1 and VGA2. The boot loader menu is displayed on VGA1 and there is NO sync on VGA2. Before X is started, there is no sync on VGA2. I'll work on getting the intel_reg_dump data
Created attachment 52194 [details] inte_reg_dump after X is started: VGA1 - Sync
Created attachment 52195 [details] intel_reg_dump after disabling VGA1 and enabling VGA1: VGA1 and VGA2 have Sync This time it took a couple of tries of disabling VGA1 before VGA2 would sync. VGA1 - Sync # intel_reg_dumper > intel_reg_VGA1 # xrandr --output VGA1 --off VGA2 - No Sync # xrandr --output VGA1 --auto # xrandr --output VGA1 --off # xrandr --output VGA1 --off VGA1 - No Sync VGA2 - Sync # xrandr --output VGA1 --auto --left-of VGA2 # intel_reg_dumper > intel_reg_VGA1_VGA2
Ok, let's do an experiment and see if it works: - Reboot the system, start X - VGA2 should not be working - sudo ./intel_reg_read 0xe1140 The read value will probably be 0x4000001c (from comment #4) Then you do: - sudo ./intel_reg_write 0xe1140 0xc000001c (you have to turn the 31th bit on) Then check if VGA2 starts working.
VGA2 doesn't have sync after modifying 0xe1140 to 0xc000001c Rebooted Started X VGA1 - Sync VGA2 - No Sync # intel_reg_read 0xe1140 0xE1140 : 0x4000001C # intel_reg_write 0xe1140 0xc000001c Value before: 0x4000001C Value after: 0xC000001C # xrandr Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.0*+ 75.0 72.0 1152x864 75.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 TV1 disconnected (normal left inverted right x axis y axis) TV2 disconnected (normal left inverted right x axis y axis) VGA2 connected 1600x1200+1280+0 (normal left inverted right x axis y axis) 408mm x 306mm 1600x1200 60.0*+ 1280x1024 75.0 60.0 1152x864 75.0 1024x768 85.0 75.1 60.0 832x624 74.6 800x600 85.1 75.0 60.3 640x480 85.0 75.0 60.0 720x400 70.1 # intel_reg_read 0xe1140 0xE1140 : 0xC000001C VGA1 - Sync VGA2 - No Sync
Hello again =) Sorry for asking you to try to many things, but I don't have this hardware here, so the only way to find out is to ask you to try. Please one more test: - Reboot again (so we go back to the same settings as in comment #4, where the VGA2 monitor should be using transcoder B). If you intel_reg_dump here, you really should get something very similar to comment #4. - sudo ./intel_reg_write 0xe1140 0xa000001c This will not only enable the 31th bit, but also change 30:29 to 01 instead of 10, so we use the right transcoder. If this doesn't work, I would like to see the output of intel_reg_dumper just after you do these commands. I hope this one will work =) Thanks, Paulo
In Comments 11-17 I booted with "init 3" and started X manually using startx. I believe comment 4 was taken from booting with the GUI. I rebooted so that X would come up automatically. This is in a similar state of comment 4. The root window came up but didn't get a login window. The Cursor is in the wait state showing an animated counter clockwise circle. I updated 0xe1140 to 0xA000001C and got a Sync on VGA2. The VGA2 display was black and the cursor was fixed to the VGA1 display. I ran xrandr to enable VGA2 and the cursor was allowed to move off of VGA1 but was not shown on VGA2. The display on VGA2 was still black. # intel_reg_write 0xe1140 0xa000001c Value before: 0x4000001C Value after: 0xA000001C VGA1 - Syn VGA2 - Sync light came on: Black Screen # xrandr --output VGA2 --auto [root@mcnicholt1 ~]# xrandr Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 8192 x 8192 VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.0*+ 75.0 72.0 1152x864 75.0 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 72.8 75.0 66.7 60.0 720x400 70.1 TV1 disconnected (normal left inverted right x axis y axis) TV2 disconnected (normal left inverted right x axis y axis) VGA2 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 408mm x 306mm 1600x1200 60.0*+ 1280x1024 75.0 60.0 1152x864 75.0 1024x768 85.0 75.1 60.0 832x624 74.6 800x600 85.1 75.0 60.3 640x480 85.0 75.0 60.0 720x400 70.1 # intel_reg_read 0xe1140 0xE1140 : 0xA000001C VGA1 - Sync: Looks correct VGA2 - Sync but nothing showing on display: Black: No Cursor or root window I'm able to move the cursor off of VGA1 but it does not display on VGA2.
I think the display power manager may have kicked in and caused VGA2 to get refreshed when it woke up. VGA2 has a root window now and I can see the cursor.
(In reply to comment #22) > I think the display power manager may have kicked in and caused VGA2 to get > refreshed when it woke up. VGA2 has a root window now and I can see the > cursor. Great! So we might have found the culprit. I'll write a kernel patch so we can test a "real" fix for this.
I checked the history and "xrandr --output VGA2 --auto" was run after intel_reg_write 0xe1140 0xa000001c." 919 intel_reg_write 0xe1140 0xa000001c 920 export DISPLAY=:0 921 xrandr --output VGA2 --auto 922 xrandr 923 intel_reg_read 0xe1140 I'll check tomorrow to see if the display power manager, xrandr or both cleaned it up and caused it to work.
This morning I confirmed that after updating 0xe1140 to 0xA000001C, VGA2 had sync and xrandr showed one display as active. I ran xrandr to enable VGA2 and the cursor was allowed to move off of VGA1 but was not shown on VGA2. The display on VGA2 remained black until the display power manager kicked in and caused VGA2 to get refreshed when it woke up.
>So we might have found the culprit. I'll write a kernel patch so we can test a "real" fix for this. Thanks for you help on this! After we got it working, I ran "init 3" and noticed that the console was mirrored on both screens. I ran startx and X started correctly on both screens with VGA1 on the left and VGA2 on the right! :) I can test the patch when it's ready. Thanks!
Created attachment 52227 [details] [review] Proposed patch Hi Can you please test this kernel patch? I'm not sure if you'll still have to activate/deactivate dpms just like you're doing now. Thank you, Paulo
Thanks.. I'll build the kernel with your patch and give it a try
The patch looks good! I applied the patch to kernel-3.1.0-0 and X comes up on both displays. Thanks Paulo!
The patch was sent for review to our public mailing list. I'll close the bug when it gets to Linus's tree (and possibly the stable tree too).
Created attachment 52617 [details] dmesg.after_boot 19" VGA1; 15" IBM L150P plugged into VGA2 does not work Hi Paulo, Both VGA1 and VGA2 work with my 19" and 20" displays with the patch you provided. I have 15" L150P where dual display works when plugged into VGA1 and the 19" display is plugged into VGA2. However, when I plug the 15" L150P into VGA2 and the 19" into VGA1, the 15" display does not sync when linux is booting and displays "Input signal out of range" on the display. I see the BIOS startup screen on both screens. I was able to get X to mirror the second display when I set the Monitor sections in the xorg.conf file to: Option "PreferredMode" "800x600" Attached is the DRM trace after linux booted to tty. From drm/i915/intel_sdvo.c 1087 sdvox |= (9 << 19) | SDVO_BORDER_ENABLE; 1088 } 1089 1090 DRM_LOG_KMS("HHH: %d intel_sdvo->sdvo_reg == 0x%08x\n", __LINE__, intel_sdvo->sdvo_reg); 1091 DRM_LOG_KMS("HHH: %d sdvox == 0x%08x\n", __LINE__, sdvox); 1092 if (intel_sdvo->sdvo_reg == PCH_SDVOB) { 1093 DRM_LOG_KMS("HHH: %d HAS_PCH_IBX == 0x%08x\n", __LINE__, HAS_PCH_IBX(dev)); 1094 if (HAS_PCH_IBX(dev)) 1095 sdvox |= TRANSCODER(intel_crtc->pipe); 1096 else 1097 sdvox |= PORT_TRANS_SEL_CPT(intel_crtc->pipe); 1098 } else if (intel_crtc->pipe == 1) { 1099 sdvox |= SDVO_PIPE_B_SELECT; 1100 } 1101 DRM_LOG_KMS("HHH: %d intel_crtc->pipe == 0x%08x\n", __LINE__, intel_crtc->pipe); 1102 DRM_LOG_KMS("HHH: %d sdvox == 0x%08x\n\n", __LINE__, sdvox); 1103 1104 if (intel_sdvo->has_hdmi_audio) 1105 sdvox |= SDVO_AUDIO_ENABLE; 1106 Trace output from above code: 15" on VGA2 [ 3.361934] HHH: 1090 intel_sdvo->sdvo_reg == 0x000e1140 [ 3.361935] HHH: 1091 sdvox == 0x00000000 [ 3.361935] HHH: 1093 HAS_PCH_IBX == 0x00000000 [ 3.361936] HHH: 1101 intel_crtc->pipe == 0x00000001 [ 3.361937] HHH: 1102 sdvox == 0x20000000 Let me know if I should open a separate bug for this problem.
(In reply to comment #31) > Created attachment 52617 [details] > dmesg.after_boot 19" VGA1; 15" IBM L150P plugged into VGA2 does not work > > Hi Paulo, > Both VGA1 and VGA2 work with my 19" and 20" displays with the patch you > provided. I have 15" L150P where dual display works when plugged into VGA1 and > the 19" display is plugged into VGA2. However, when I plug the 15" L150P into > VGA2 and the 19" into VGA1, the 15" display does not sync when linux is booting > and displays "Input signal out of range" on the display. I see the BIOS > startup screen on both screens. I was able to get X to mirror the second > display when I set the Monitor sections in the xorg.conf file to: > Option "PreferredMode" "800x600" > Yes, this looks like a separate bug Please open a new bug and attach: - intel_reg_dumper with 15" on VGA2 and 19" on VGA1 (not working) - intel_reg_dumper with 15" on VGA1 and 19" on VGA2 (working) Comparing the two dumps might lead us to a fix.
Thanks. I opened Bug 42174. Let me know if you find anything. Thanks, Trey
Hi, I have tested this patch and is working fine. However, I was asked to test on the KOTD which didn't work. Is there any way we can push this patch upstream?
(In reply to comment #34) > Hi, I have tested this patch and is working fine. However, I was asked to test > on the KOTD which didn't work. Is there any way we can push this patch > upstream? I sent it to the intel mailing list. They proposed some trivial changes, then I re-sent with the changes. I already have some Signed-off-by tags and I'm waiting for it to be picked by Keith, so he can request a pull from Linus. The plan is to definitely have the patch in Linus' tree in this or the next week. Then it will land in 3.2 and maybe in 3.1 stable.
Bug fixed. The patch is already in Linus's tree and is part of Kernel >= 3.2.0-rc6. It was also proposed for the stable kernels. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=3573c4103f7a486838bb6b5b8353788103f91802 The patch is slightly different from the one in comment #27, but should be logically equivalent, so we don't expect any different behavior. If the patch does not solve the problem, please reopen the bug.
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.