← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 366270] Re: [i945] [Xubuntu, i945] wrong screen resolution after upgrade to Jaunty

 

Quick fix, in case someone has the same problem: add the following to /etc/gdm/Init/Default:
if xrandr -q | grep -q "VGA connected"; then
	xrandr --output LVDS --off --output VGA --auto
fi

What it does: if an external monitor is detected, it will switch off the
internal one and sets the monitor to its optimal resolution. An even
better solution would be to set-up an extended desktop in the case the
laptop lid is opened, but I do not know how to detect this...

--------
More info about why this patch works

It looks like the original bug is a combination of two issues:
1. The system does not detect that the laptop lid is closed and starts with LVDS output on
2. When both LVDS and VGA outputs are on (and the lid is closed), they get both drawn on the main monitor, the LVDS being drawn over the VGA screen..

This can be illustrated by the following three versions of /etc/gdm/Init/Default. (Note that I am now running with an 1280x1024 external monitor, while the original post was done with 1680x1050 - but is should not make any difference):
I. no changes
- system (gdm) starts in 1024x768 resolution
- after login, I see the LVDS wallpaper
- xrandr -q gives:
----
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1280 x 1280
VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0 +   75.0     60.0  
   1152x864       75.0  
   1024x768       75.0*    70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3  
   640x480        75.0     72.8     59.9  
   720x400        70.1  
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       60.0 +
   1024x768       85.0     75.0*    70.1     60.0  
   832x624        74.6  
   800x600        85.1     72.2     75.0     60.3     56.2  
   640x480        85.0     72.8     75.0     59.9  
   720x400        85.0  
   640x400        85.1  
   640x350        85.1  
TV disconnected (normal left inverted right x axis y axis)
----
Note that LVDS is connected (even if the lid is closed) and that both LVDS and VGA have wrong resolution (which happens to be the biggest common resolution - is this a coincidence?)

II. /etc/gdm/Init/Default with added "xrandr --output VGA --auto"
- system starts with the correct resolution (1280x1024)
- I get the LVDS wallpaper drawn over the VGA one
- xrandr -q gives (deleted the lower resolutions lines for brevity):
----
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1280 x 1280
VGA connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+   75.0     60.0* 
   1152x864       75.0  
   1024x768       75.0     70.1     60.0  
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       60.0 +
   1024x768       85.0     75.0*    70.1     60.0  
TV disconnected (normal left inverted right x axis y axis)
----

III. The fix from the start of this post
- everything works OK, assuming one has a closed lid
- xrandr -q output:
----
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1280 x 1280
VGA connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+   75.0     60.0* 
   1152x864       75.0  
LVDS connected (normal left inverted right x axis y axis)
   1280x800       60.0 +
   1024x768       85.0     75.0     70.1     60.0  
TV disconnected (normal left inverted right x axis y axis)
----
Note that there is no "*" in the LVDS output, so it is connected but not active

-- 
[i945] [Xubuntu, i945] wrong screen resolution after upgrade to Jaunty
https://bugs.launchpad.net/bugs/366270
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xserver-xorg-video-intel in ubuntu.