GNOME Bugzilla – Bug 603551
Image doesnt scale for dual monitors
Last modified: 2010-05-20 18:39:26 UTC
I use GNOME nautilus 2.28.1 on Fedora 12. After a recent update involving nautilus-2.28.1-4.fc12.i686 nautilus-extensions-2.28.1-4.fc12.i686 totem-nautilus-2.28.3-1.fc12.i686 brasero-nautilus-2.28.2-3.fc12.i686 as the only nautilus related packages... I'm facing weird behavior. I use a dual monitor setup. Before the update I was able to scale the background image. eg. If the image is of resolution 2560x1024 and I have two monitors each of 1280X1024 resolution then the pic would appear to be spread across the two monitors. Now the same 2560x1024 image appears as *two different* images on both monitors. Also I dont know if this is related, but after using the desktop for a while X randomly restarts(the restart always happens when I happen to be opening a window) Another observation I made is that when I set a wallpaper, then it appears first on my left screen and then on the right screen with a *lag*. I feel its all happening because of one single reason. I've already lost data I was working on due to these restarts. Can someone please look into this. I'd be happy to assist in terms of logs/tests. Thanks!
Forgot to mention that I use xrandr to set up my dual screen which combines both screens into one virtual screen of size 2560x1024. After this, xdpyinfo output also confirms 1 screen rather that two.
The background image not spanning over your two monitors is probably bug 147808. I don't think your X crashes are related.
Right. It seems the X restarts were caused by bad libdrm that came in as part of the same update. Whoever works on this, please disregard the X portion in the bug description. The problem of wallpaper not scaling on a dual monitor setup still stands. Thanks.
I upgraded my computer from Ubuntu karmic to Ubuntu lucid (this also included an upgrade of gnome-control-center 2.28.1 to 2.29.4) and I have this problem now too. I've two monitors (one 1280x1024 and one 1920x1200) creating a 3200x1200 desktop and made me in the past wallpapers of the same size to span the whole desktop which I can't use anymore (at least I couldn't find a setting making it work). The current available settings aren't optimal for two different sized monitors. I currently use a wallpaper in the size of my bigger monitor (1920x1200) and either select "Zoom" or "Scale" to have a decent looking wallpaper on my smaller monitor (depending on the wallpaper which looks better). The other options don't produce satisfying results.
I'm having this problem, too. Ever since upgrading to Fedora 12, my background has been broken, and it looks really ugly. Is there any way to get a dual-head image to correctly stretch across the whole virtual display?
Created attachment 153485 [details] [review] patch adding a "spanned" option for picture_options I am attaching a spanned-background.patch which adds a "spanned" option to the gconf key /desktop/gnome/background/picture_options. The spanned picture option produces the behavior desired by people with dual-screen wallpaper images. The patch does not add the "spanned" option to the schema for /desktop/gnome/background/picture_options (I'm not sure which package this is in, and it would be an easy change anyway). The patch also does not add support for the "spanned" option to the gnome-appearance-properties panel, although this also seems like a fairly easy change. However, the patch does allow the option to be set with gconf-editor or gconftool-2, and in my testing it seems to work perfectly. I hope that this patch adequately addresses the problem and can be included.
This burt needs to be assigned to control-center maintainers so that it receives proper attention. See: https://bugzilla.gnome.org/show_bug.cgi?id=147808
The attached patch is against gnome-desktop, so that is where this bug should go. A separate bug should be opened against gnome-control-center for adding the Spanned option to the UI.
Two line control-center patch is here: bug 609809
There probably also needs to be a two-line patch for the gconf schema.
Created attachment 154174 [details] [review] scale the image to fit I think it is better to scale the image to fit, in the spanning case.
It seems the patch is not working for me: Packages: gnome-desktop-2.28.2-5.fc12.i686 control-center-2.28.1-18.fc12.i686 control-center-filesystem-2.28.1-18.fc12.i686 I tried all the options(stretch/scale/span/fill screen) on my dual monitor setup. Did I miss something.. or does this bug need to be reopened?
amcnabb said that the patch worked for him. The only noticeable difference that I can see between his patch and the patch that was committed is: amcnabb's patch: switch (placement) { + case GNOME_BG_PLACEMENT_SPANNED: + new = g_object_ref (pixbuf); + break; where g_object_ref() has been replaced with pixbuf_scale_to_fit(). Could this have a bearing?
I'd like to reopen this bug. Please move it back to fixed, if the feature is working for others... Thanks.
FYI, I just updated https://bugzilla.redhat.com/show_bug.cgi?id=556369 to state that the current patch in Fedora 12 koji (which I assume is a patch from here) doesn't seem to fix the problem for me. 'spanned' seems to behave like centered (each screen has a separate wallpaper, the central part of the huge wallpaper, without any scaling, centered on screen).
Per comments in this thread (well I actually wasn't sure how to interpret them), I rebuilt the rpm with the patch changed from: +<-----><------>new = pixbuf_scale_to_fit (pixbuf, width, height); +<-----><------>/* new = g_object_ref (pixbuf); */ to: +<-----><------>/* new = pixbuf_scale_to_fit (pixbuf, width, height); */ +<-----><------>new = g_object_ref (pixbuf); and it does _NOT_ fix the problem (it still doesn't work).
Well, both of them work, scale to fit works slightly better.
Matthias, It seems that this works for you. Since you are the developer, you'll have a better idea why its not working for certain people. I'd be happy to provide logs. Thanks.
OK, this finally works for me - you don't need to login and log back out again, but you do have to grab not only an updated gnome-desktop, but also control-center and nautilus. $ sudo yum --enablerepo=updates-testing update gnome-desktop control-center nautilus $ killall nautilus $ rpm -q gnome-desktop control-center nautilus gnome-desktop-2.28.2-5.fc12.x86_64 control-center-2.28.1-18.fc12.x86_64 nautilus-2.28.4-2.fc12.x86_64
Mind you, it turns out this still isn't the old (desired) behaviour. The code is still doing scaling and centering of the wallpaper across all screens. This is relevant because my second screen is only sometimes connected to my laptop. I now have a correct display when both are plugged in, but when I unplug the second screen, the entire wallpaper gets scaled to fit and centered on the first screen. We should not be scaling, nor centering a spanned wallpaper, just trust in the user to be doing the right thing.
I don't agree. I could be convinced that the patch should not add 'span' as another picture_option, but instead add a separate boolean 'span' flag. That would give you the freedom to combine 'span' with any other style option you prefer. But that would be a more invasive change, and probably has to wait until 2.31 at this point.
Changing: + new = pixbuf_scale_to_fit (pixbuf, width, height); + /* new = g_object_ref (pixbuf); */ to: + /* new = pixbuf_scale_to_fit (pixbuf, width, height); */ + new = g_object_ref (pixbuf); and: + pixbuf_blend (scaled, dest, 0, 0, w, h, x, y, 1.0); to: + pixbuf_blend (scaled, dest, 0, 0, w, h, 0, 0, 1.0); Appears to get the desired (from my point of view effect) of a big wallpaper which is just plain tiled, with no scaling and no centering. I see two possible solutions: either we fix spanned as above, or we leave spanned alone, and add in a new mode called 'manual'.
Maciej, I actually prefer the current behavior (scaling across both screens). And this makes more sense with the word "spanned."
Maciej, I just read your comment on the Fedora bugzilla: "This is relevant because my second screen is only sometimes connected to my laptop. I now have a correct display when both are plugged in, but when I unplug the second screen, the entire wallpaper gets scaled to fit and centered on the first screen." You have a really good point, and I think I'm convinced.
Now that the spanning works, this bug can be closed. However, the scaling still doesnt work... For example, I have a laptop+TFT screen in dual screen mode, both at 1280x1024. The dual screen wallpaper in question is 3055x1050. Spanning works in the sense that both the parts of the dual screen wallpaper appear on two screens... but they are not scaled on both screens and appear to be embedded in a ribbon. I worked around this by resizing my wallpaper to 2560x1024 and now it fills both the screens. Spanning+Scaling of a wallpaper is desirable but not a requirement for this bug. Closing this.