Bug 537488

Summary: Initial X server video mode is 640x480 when external monitor is connected at startup
Product: [openSUSE] openSUSE 12.1 Reporter: David Reveman <dreveman>
Component: X.OrgAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium CC: crmafra, sbron, sndirsch
Version: Milestone 5   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Force initial use of preferred mode when multiple outputs are present
Adjusted patch (*not* the supposed solution)
Xorg.0.log

Description David Reveman 2009-09-08 19:21:48 UTC
Especially bad right now as a lot of mutter-moblin components can't deal with UI resize properly so even though gnome-settings-daemon might apply a useful stored display configuration at startup most of the moblin UI components will not adjust to this size.

Seems like an intel video driver issue.
Comment 1 Stefan Dirsch 2009-09-08 19:29:42 UTC
Thanks, please attach /var/log/Xorg.0.log. Is this on Samsung N130?
Comment 2 David Reveman 2009-09-08 22:39:02 UTC
Created attachment 317314 [details]
Force initial use of preferred mode when multiple outputs are present
Comment 3 David Reveman 2009-09-08 22:43:58 UTC
Turns out it's not an intel driver issue. The X server will try to find a common mode unless something else is specified in xorg.conf.

The attached patch will make the server use each outputs preferred mode instead. Together with the patch attached to bug 531562 this improves the moblin multiple output experience hugely.
Comment 4 Stefan Dirsch 2009-09-09 03:56:55 UTC
Matthias, could you review the patch? I'm wondering that now xf86TargetUserpref()
always returns with

  xf86TargetFallback(scrn, config, modes, enabled, width, height);

I mean what are the if clauses still good for?
Comment 5 Matthias Hopf 2009-09-09 10:52:37 UTC
I'm have some headaches with this patch.

I agree that it is very suboptimal if external monitor and panel can only agree on 640x480 (because of the nonstandard panel size). OTOH we want to clone as often as possible, because otherwise we will get tons of bug reports of one of the monitors being cropped.

My proposed solution would be:
- Try the native resolution of the smaller monitor for cloning
  If all monitors support that resolution we get cloning
- If that fails try the native resolution of the smaller monitor, find a reasonably close resolution on the other monitors and use panning.
- Only if that fails use native resolution on both monitors

Alternative:
- Use native resolutions on all monitors, use panning to display the whole frame on all monitors
- If panning is not possible, ignore.
Comment 6 Matthias Hopf 2009-09-09 10:54:39 UTC
Created attachment 317375 [details]
Adjusted patch (*not* the supposed solution)

Additionally, the code resulting from the patch is IMHO misleading. AFAICS this patch will create an equivalent result, while clearly stating what changes are done in the called code path.
Comment 7 Matthias Hopf 2009-09-09 11:02:57 UTC
David, what do you think (comment 5 + 6)?
Comment 8 David Reveman 2009-09-09 15:56:53 UTC
Exactly what the X server is doing is not extremely important as gnome-settings-daemon will adjust the outputs to whatever the user have configured using the gnome-display-properties tool. The important part with moblin is that the panel is at the native resolution on X server startup. We obviously want to avoid mode switching as it will look bad but more importantly the moblin UI will not work properly at this resolution even after using g-s-d have adjusted it to something more useful.

So if you're change makes sure the panel output is native resolution at startup i'm happy to see it go in.
Comment 9 Matthias Hopf 2009-09-09 16:10:08 UTC
I understand we want the panel to get native resolution.
However, the proposed patch has little to no chance to get accepted upstream, as for the general case we need a more reasonable fix. If it isn't accepted upstream we would have to maintain it forever, and we don't want that.

So this is something to be discussed upstream.

How important (time-wise) is this fix? Eventually we have to stick an intermediate fix in our moblin packages.
Comment 10 David Reveman 2009-09-09 18:44:39 UTC
(In reply to comment #9)
> I understand we want the panel to get native resolution.
> However, the proposed patch has little to no chance to get accepted upstream,
> as for the general case we need a more reasonable fix. If it isn't accepted
> upstream we would have to maintain it forever, and we don't want that.

I never thought of it going upstream. I figured whatever upstream is currently doing makes sense on most systems and that our moblin system was a special case which had to be maintained separately anyhow. However, if you think that your adjusted patch as a chance of making it upstream, i'm all for using that one.

> 
> So this is something to be discussed upstream.
> 
> How important (time-wise) is this fix? Eventually we have to stick an
> intermediate fix in our moblin packages.

Critical bug 531562 depends on this and I'd like to see that one fixed asap.
Comment 11 Stefan Dirsch 2009-09-09 20:54:23 UTC
If it's an urgent issue what we can do is apply Matthias' patch from comment #6 *now*, but *only* on Moblin. Then Matthias can fix it later in general for Factory and upstream the right way.
Comment 12 Stefan Dirsch 2009-09-09 21:51:59 UTC
done. Patch applied now to X11:XOrg/xorg-x11-server, so it's also active for the linked packages Moblin:Factory/xorg-x11-server and Moblin:Base/xorg-x11-server. No longer blocking Bug #531562.
Comment 13 David Reveman 2009-09-11 19:25:05 UTC
Perfect. Thanks.
Comment 14 Stefan Dirsch 2009-11-01 12:53:17 UTC
The issue is resolved for Moblin (only), so let's move it to openSUSE.
Comment 15 Stefan Dirsch 2009-11-11 10:28:27 UTC
*** Bug 553822 has been marked as a duplicate of this bug. ***
Comment 16 G J 2010-01-06 13:12:16 UTC
Created attachment 335150 [details]
Xorg.0.log
Comment 17 G J 2010-01-06 13:14:04 UTC
Comment on attachment 335150 [details]
Xorg.0.log

I don't know if my problem is the related to this bug but it's the closest I found in the search.

I'm using 11.2 final and kde4.3.4.

When I dock my laptop (Thinkpad X60s with Intel 945GM video) my external monitor always starts in the wrong resolution. My laptop's native resolution is 1024x768 and the external monitor's native resolution is 1280x1024.

So after booting with the laptop docked the external monitor always comes up with 1024x768 instead of 1280x1024. Even after setting the resolution back to 1280x1024 with KDE's display seyyings the setting isn't remembered after a reboot. I've tried with and with using the SCPM profile manager and it makes not difference, the external monitor always starts with 1024x768.

i've attached my Xorg.0.log for reference. I you require any other details let me know.
Comment 18 Stefan Dirsch 2010-01-07 02:50:35 UTC
Yes, this is the initial situation where you currently get the biggest resolution that both outputs, i.e internal panel and external monitor, support. In your case this is 1024x768, but you can easily change this setup in KDE4 permanently with krandrtray.
Comment 19 Stefan Dirsch 2010-01-07 02:53:52 UTC
I'm not familiar with SCPM profile manager, so I don't know whether it's possible
to work with different xorg.conf files using a static X configuration for the different setups.
Comment 20 Schelte Bron 2010-03-28 14:06:38 UTC
Bug #553822, which was closed as a dup of this bug, has disappeared after a clean install of OpenSuSE 11.2. See bug 553822 for more details.
Comment 21 Matthias Hopf 2010-04-29 15:55:05 UTC
(In reply to comment #17)
> So after booting with the laptop docked the external monitor always comes up
> with 1024x768 instead of 1280x1024. Even after setting the resolution back to
> 1280x1024 with KDE's display seyyings the setting isn't remembered after a
> reboot. I've tried with and with using the SCPM profile manager and it makes
> not difference, the external monitor always starts with 1024x768.

Differnt bug; apparently krandrtray doesn't remember monitor ids and the associated configuration. AFAIK gnome-display-properties does that already.
Comment 22 Stefan Dirsch 2010-08-14 15:54:42 UTC
Moving to 11.3.
Comment 23 Stefan Dirsch 2010-09-02 13:20:31 UTC
There has been a related discussion in Bug #623250 (comment #8 and later).
Comment 24 Stefan Dirsch 2011-09-01 14:17:18 UTC
Unfortunately we do not have the ressources to address that issue
still for openSUSE 11.4. Could you please test again with
a current Milestone of openSUSE 12.1, whether the issue still
exists and give me feedback about the result? Thanks.
Comment 26 Stefan Dirsch 2011-09-01 20:38:03 UTC
ok.
Comment 27 Stefan Dirsch 2011-09-02 13:08:31 UTC
Moving to 12.1.
Comment 28 Stefan Dirsch 2014-05-22 12:28:29 UTC
openSUSE 12.1 is no longer supported. Hence the issue won't be fixed for this product. In case the issue still is reproducable with a supported product (openSUSE 12.3/13.1 at the moment) or with openSUSE:Factory, please feel free to reopen. Thanks.