2nd monitor is detected infrequently
I am running a Ubuntu 14.04 Minimal installation with two external monitors. My window manager is Openbox and display manager is LXDM. The first monitor is connected to the VGA port and the second is connected via a VGA to HDMI converter to the HDMI port. My Laptop is a Lenovo G510 with integrated Intel graphics hardware.
Problem statement:
1. Boot the laptop with both external monitors attached.
2. Occasionally both are detected at the time when the display manager (LXDM) comes up. But quite often, LXDM is shown only on the VGA monitor and not on the HDMI monitor.
3. Even on the primary monitor, LXDM is displayed on the external VGA monitor at the resolution of the laptop internal display, i.e. it's like exactly viewing the laptop screen on the external monitor.
4. Once I log in, the screen resolution on the primary monitor is corrected, but the second monitor is still undetected.
Running lspci |grep VGA shows this:
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
Issuing xrandr shows this:
eDP1 connected (normal left inverted right x axis y axis)
1366x768 60.0 *+
1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 connected 1400x1050+0+0 (normal left inverted right x axis y axis) 408mm x 306mm
1400x1050 60.0*+
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI1 connected 1400x1050+1400+0 (normal left inverted right x axis y axis) 408mm x 306mm
1400x1050 60.0*+
1280x1024 75.0 60.0
1152x864 75.0
1280x720 60.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
I looked at Xorg.0.log and found this. To me, it seems correct.
[ 6045.187] (II) intel(0): switch to mode 1400x1050@60.0 on VGA1 using pipe 1, position (0, 0), rotation normal, reflection none
[ 6045.218] (II) intel(0): switch to mode 1400x1050@60.0 on HDMI1 using pipe 0, position (1400, 0), rotation normal, reflection none
Currently what I am doing is to run this set of commands about a dozen times, and it fixes the problem, but this is not a proper solution.
xrandr --output HDMI1 --auto --off
xrandr --output HDMI1 --auto --right-of VGA1
This is all the debugging I could do. How can I proceed from here? I hope someone can point me in the right direction.
Note: The same problem also repeats after the laptop revives from a pm-suspend.
|