After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603551 - Image doesnt scale for dual monitors
Image doesnt scale for dual monitors
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks: 609809 610396 610398
 
 
Reported: 2009-12-02 03:29 UTC by Sisir
Modified: 2010-05-20 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch adding a "spanned" option for picture_options (1.64 KB, patch)
2010-02-10 22:34 UTC, amcnabb
none Details | Review
scale the image to fit (1.90 KB, patch)
2010-02-18 20:47 UTC, Matthias Clasen
committed Details | Review

Description Sisir 2009-12-02 03:29:30 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!
Comment 1 Sisir 2009-12-02 03:31:58 UTC
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.
Comment 2 Stijn Hoop 2010-01-12 08:20:21 UTC
The background image not spanning over your two monitors is probably bug 147808.

I don't think your X crashes are related.
Comment 3 Sisir 2010-01-12 09:04:35 UTC
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.
Comment 4 Michael Bienia 2010-01-15 10:54:32 UTC
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.
Comment 5 amcnabb 2010-02-10 00:27:30 UTC
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?
Comment 6 amcnabb 2010-02-10 22:34:53 UTC
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.
Comment 7 Sisir 2010-02-11 03:26:54 UTC
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
Comment 8 Matthias Clasen 2010-02-11 04:27:22 UTC
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.
Comment 9 Matthias Clasen 2010-02-13 03:54:42 UTC
Two line control-center patch is here: bug 609809
Comment 10 amcnabb 2010-02-13 04:25:03 UTC
There probably also needs to be a two-line patch for the gconf schema.
Comment 11 Matthias Clasen 2010-02-18 20:47:27 UTC
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.
Comment 12 Sisir 2010-02-22 15:58:53 UTC
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?
Comment 13 Sisir 2010-02-22 19:38:22 UTC
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?
Comment 14 Sisir 2010-02-23 12:56:07 UTC
I'd like to reopen this bug. Please move it back to fixed, if the feature is working for others...

Thanks.
Comment 15 Maciej Zenczykowski 2010-02-26 05:53:41 UTC
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).
Comment 16 Maciej Zenczykowski 2010-02-26 06:00:52 UTC
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).
Comment 17 Matthias Clasen 2010-02-26 13:54:06 UTC
Well, both of them work, scale to fit works slightly better.
Comment 18 Sisir 2010-02-26 14:27:04 UTC
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.
Comment 19 Maciej Zenczykowski 2010-02-26 19:43:23 UTC
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
Comment 20 Maciej Zenczykowski 2010-02-26 23:34:08 UTC
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.
Comment 21 Matthias Clasen 2010-02-26 23:43:49 UTC
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.
Comment 22 Maciej Zenczykowski 2010-02-26 23:45:05 UTC
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'.
Comment 23 amcnabb 2010-02-27 04:23:01 UTC
Maciej, I actually prefer the current behavior (scaling across both screens).  And this makes more sense with the word "spanned."
Comment 24 amcnabb 2010-02-27 04:25:39 UTC
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.
Comment 25 Sisir 2010-03-01 05:49:21 UTC
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.