Bug 19968 - clone mode: If projector does not report its default resolution, wrong resolution gets selected
Summary: clone mode: If projector does not report its default resolution, wrong resolu...
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: MaLing
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 08:20 UTC by Till Kamppeter
Modified: 2009-02-13 01:25 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
please try the patch on your machine, if the issue still occurs, I will reopen it. Thanks (424 bytes, patch)
2009-02-05 22:50 UTC, MaLing
no flags Details | Splinter Review
xrandr --verbose with VGA projector just plugin after boot up (5.31 KB, text/plain)
2009-02-13 01:22 UTC, Michael Fu
no flags Details
xrandr --verbose after run 'xrandr --auto' (5.37 KB, text/plain)
2009-02-13 01:24 UTC, Michael Fu
no flags Details

Description Till Kamppeter 2009-02-05 08:20:22 UTC
I have a laptop with i945 chipset and use the "intel" X driver. The internal display has a resolution of 1280x800 (16:10). The projector is capable of many different resolutions, its LCD has a 4:3 ratio. It does not report its default resolution (no "+" at any resolution in "xrandr" output, the laptop reports 1280x800 as its default resolution:

------------------------------------------------------------------------

till@till-laptop:~$ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 1680 x 1680
VGA connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1680x1050      60.0* 
   1600x1024      60.2  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       59.8  
   1152x864       75.0     75.0     70.0     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  
LVDS connected (normal left inverted right x axis y axis)
   1280x800       52.8 +
   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)
till@till-laptop:~$

------------------------------------------------------------------------

I have no problem to use the projector when I activate and deactivate it supplying all settings explicitly to the xrandr command (projector connected after login):

Activate same image on projector and laptop display:

xrandr --output LVDS --mode 1024x768 --output VGA --mode 1024x768 --same-as LVDS

Back to laptop display in its native resolution:

xrandr --output LVDS --mode 1280x800 --output VGA --off

Projector only in a higher resolution than the laptop (Note: non 4:3 modes give a stretched image):

xrandr --output LVDS --off --output VGA --mode 1680x1050
xrandr --output LVDS --off --output VGA --mode 1280x1024

Now if I plug the projector after logging in and do

xrandr --auto

(or press Fn + F7) the projector gets activated but the resolution not adjusted. The screen stays on 1280x800 and the projector shows a truncated image, of only the 1024x768 upper left pixels. The projector does not tell its default/preferred resolution when it gets probed by X which probably auses the problem when activating it without explicitly specifying the desired resolution.

Strangely enough, fully automatic projector integration works when the projector is plugged while X is started (projector connected before logging in). Then X comes up in clone mode, with the highest resolution of the projector which fits into the preferred resolution of the laptop. On the laptop this resolution is displayed with aspect ratio conserved (black margins at the left and the right). When unplugging the projector the laptop returns to its default resolution and when plugging again, it goes automatically to clone mode.

So automatic projector setup is possible and implemented, only X does not do it when running "xrandr --auto" or pressing Fn + F7.

My suggestion is that if the projector does not report a usable default resolution, that the highest resolution of the projector which still fits into the laptop's preferred resolution gets chosen (and display on the laptop screen aspect-ratio conserving, which means that there can be black margins. If the laptop also does not report a preferred resolution, I suggest to take the highest common resolution of laptop and projector. This assures that one sees the complete projection screen on one's laptop screen to have full control over one's presentation.
Comment 1 MaLing 2009-02-05 17:23:34 UTC

*** This bug has been marked as a duplicate of bug 19931 ***
Comment 2 MaLing 2009-02-05 22:50:42 UTC
Created attachment 22627 [details] [review]
please try the patch on your machine, if the issue still occurs, I will reopen it. Thanks
Comment 3 Till Kamppeter 2009-02-05 23:02:59 UTC
The attached patch I had already applied before reporting this bug, to fix bug 19933. The problem is occurring with the patched version of the Intel driver.
Comment 4 Michael Fu 2009-02-08 22:48:36 UTC
I bet you are using a xserver of 1.4.x... this is exactly the usage model what I was looking for and has been fixed by xserver 1.5.x

technically, this is not our driver bug... 

Anyway, pls attach logs as http://intellinuxgraphics.org/how_to_report_bug.html
Comment 5 Martin Pitt 2009-02-08 23:32:29 UTC
No, both Till and I are using X server 1.5.99.902.
Comment 6 Michael Fu 2009-02-08 23:46:46 UTC
(In reply to comment #5)
> No, both Till and I are using X server 1.5.99.902.
> 

ok. please provide what I asked in comment# 4 then... Also, can you grab a liveCD of Ubuntu 8.10 to see if it works as you expected? i remember it fixes my issue...
Comment 7 Martin Pitt 2009-02-08 23:56:54 UTC
I leave the log submission to Till as the original reporter. Just mentioning that this was tested on current Ubuntu 9.04, which has newer versions of both X.org and -intel.
Comment 8 Michael Fu 2009-02-09 00:20:53 UTC
(In reply to comment #7)
> I leave the log submission to Till as the original reporter. Just mentioning
> that this was tested on current Ubuntu 9.04, which has newer versions of both
> X.org and -intel.
> 

OK. it must be very easy for you to test 8.10. :) Does it works? I'm trying to see if it's a regression...
Comment 9 Till Kamppeter 2009-02-09 00:25:01 UTC
Unfortunately, I cannot test any more as my observations were made with a projector on a conference and the conference is over now.

Martin, do you have some suitable device to connect to your laptop to trigger the problem?
Comment 10 Martin Pitt 2009-02-09 00:58:13 UTC
No, same problem for me. I do use an external TFT, but it reports a proper default resolution.
Comment 11 Michael Fu 2009-02-09 00:59:59 UTC
(In reply to comment #10)
> No, same problem for me. I do use an external TFT, but it reports a proper
> default resolution.
> 

even on 8.10?
Comment 12 Bryce Harrington 2009-02-09 09:13:30 UTC
MaLing,

We had a Ubuntu conference last week, and since projectors are hard to come by we used the opportunity to do testing against the projector devices on hand.  A consequence is that we do not have access to the device any longer for testing.
Comment 13 Michael Fu 2009-02-09 21:14:33 UTC
(In reply to comment #12)
> MaLing,
> 
> We had a Ubuntu conference last week, and since projectors are hard to come by
> we used the opportunity to do testing against the projector devices on hand.  A
> consequence is that we do not have access to the device any longer for testing.
> 

this should be easy to reproduce on any projector, as long as its max resolution is less than the laptop. what we want to prove ( which is also the bug about ) is, when you hotplug the project _after_ boot, and run xrand --auto, xserver should choose the smallest resolution of LVDS and projector, so that on either screen, you can read the whole content...

Otherwise, we will have to close this bug, if it's impossible to reproduce this any more...
Comment 14 Julien Cristau 2009-02-10 03:14:49 UTC
> --- Comment #13 from Michael Fu <michael.fu@intel.com>  2009-02-09 
> what we want to prove ( which is also the
> bug about ) is, when you hotplug the project _after_ boot, and run xrand
> --auto, xserver should choose the smallest resolution of LVDS and projector, so
> that on either screen, you can read the whole content...

AIUI xrandr chooses the modes itself, the server isn't involved here, as
opposed to server startup where the modes are chosen in
xf86InitialConfiguration().
Comment 15 Till Kamppeter 2009-02-10 03:23:05 UTC
Then my suggestion is to make xrandr use xf86InitialConfiguration() for the "--auto" call. If this is not possible, make it using exactly the same algorithm as xf86InitialConfiguration(), to get consistency.
Comment 16 Michael Fu 2009-02-13 01:22:53 UTC
Created attachment 22891 [details]
xrandr --verbose with VGA projector just plugin after boot up
Comment 17 Michael Fu 2009-02-13 01:24:35 UTC
Created attachment 22892 [details]
xrandr --verbose after run 'xrandr --auto'

I've just tried a Ubuntu 8.10 LiveCD and things works as I expected. Besides, this is not a driver bug, anyway...


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.