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 648193 - The background of the "lock screen" password prompt dialog is distorted on a dual-monitor setup
The background of the "lock screen" password prompt dialog is distorted on a ...
Status: RESOLVED OBSOLETE
Product: gnome-screensaver
Classification: Deprecated
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-19 10:02 UTC by Timur Kristóf
Modified: 2014-08-20 20:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to correct background scaling in multiple monitor setups (1.31 KB, patch)
2011-07-29 09:34 UTC, Martin Schmölzer
none Details | Review
Screenshots of patched and unpatched gnome-screensaver with different background alignment options. (571.41 KB, application/x-xz-compressed-tar)
2011-10-16 13:05 UTC, Martin Schmölzer
  Details
Patch to correct background scaling in multiple monitor setups (2.22 KB, patch)
2011-10-16 14:25 UTC, Martin Schmölzer
committed Details | Review

Description Timur Kristóf 2011-04-19 10:02:14 UTC
I have a dual-monitor setup.
When I click on "lock screen", it turns both my screens to to black. Then if I move the mouse, a dialog appears which prompts me to enter my password.

The background behind this dialog seems to be the default background. However, it is distorted in there. It appears as if it has been resized to an incorrect resolution. (I have Fedora 15's striped default background. The stripes appear wider and the birds are not visible.)

The issue doesn't occour when I only use one screen.
Comment 1 Timur Kristóf 2011-04-19 10:04:14 UTC
I forgot to mention, but it may be important. This issue was not present in gnome-shell 2.91.x versions.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-07-21 15:47:42 UTC
This would be a gnome-screensaver bug.
Comment 3 Martin Schmölzer 2011-07-29 09:34:17 UTC
Created attachment 192859 [details] [review]
Patch to correct background scaling in multiple monitor setups
Comment 4 Martin Schmölzer 2011-07-29 09:35:00 UTC
Hi!

Yesterday, I also noticed this bug in a fresh installation of Arch Linux + GNOME 3.

The problem seems to be that the apply_background_to_window() function in gs-manager.c in the gnome-screensaver package scales the background image to the entire screen, not the monitor which displays the password prompt.

I've attached a patch that changes this behavior by calling gdk_screen_get_monitor_geometry() instead of gdk_screen_get_width() and gdk_screen_get_height().

I tested this patch in three different setups:
 - Two identical 23" LCDs, resolution of each monitor 1920x1200
 - One 23" LCD + one 19" LCD, resolution 1920x1200 + 1280x1024
 - Single 23" LCD

Worked every time.

I'm unable to test a triple-head setup at this time (graphics card has only two connectors).

Best regards,
Martin
Comment 5 Ray Strode [halfline] 2011-08-01 17:35:14 UTC
This makes sense and fixes a real problem for a lot configurations.  What about G_DESKTOP_BACKGROUND_STYLE_SPANNED backgrounds though?
Comment 6 Ray Strode [halfline] 2011-08-01 18:33:08 UTC
i think fixing this to work for SPANNED will require gnome-desktop changes
Comment 7 Sebastien Bacher 2011-10-13 16:50:32 UTC
Could that patch be commited if it improves things even if other changes will be required later for extra cases?
Comment 8 Ray Strode [halfline] 2011-10-14 03:00:25 UTC
I guess so.  I'd like to hear more from Martin on what he thinks though.
Comment 9 Martin Schmölzer 2011-10-16 13:05:43 UTC
Created attachment 199116 [details]
Screenshots of patched and unpatched gnome-screensaver with different background alignment options.

Sorry for the delayed response.

Just did some further testing of all available background alignment options.

I have attached an archive containing screenshots of all options with a test background image. Both screenshots from the unpatched gnome-screensaver and screenshots from gnome-screensaver with my patch applied are included. There are two screenshots for each option - one showing the empty desktop and one showing the screensaver/lock screen feature.

Short summary of the screenshots: The unpatched gnome-screensaver exhibits this bug in dual-monitor setups with the following background alignment options: 'Center', 'Fill', 'Scale' and 'Zoom' while the 'Span' and 'Tile' options work as intended.

The patched gnome-screensaver works as intended with all options EXCEPT 'Span'.
Comment 10 Martin Schmölzer 2011-10-16 14:25:23 UTC
Created attachment 199124 [details] [review]
Patch to correct background scaling in multiple monitor setups

Also uploading a git patch against current HEAD.
Comment 11 Ray Strode [halfline] 2011-10-17 18:13:11 UTC
Comment on attachment 199124 [details] [review]
Patch to correct background scaling in multiple monitor setups

Thanks. We'll leave the bug open until we come up with a sane spanning story.
Comment 12 Bastien Nocera 2014-08-20 20:23:07 UTC
The screen lock is now implemented directly in gnome-shell, not in
gnome-screensaver (as it was with older version of GNOME 3 and GNOME 2.x).

If the reported problems persists in recent versions of GNOME, please file a new bug against gnome-shell with the "lock-screen" component selected.

If your installation is an older version of GNOME that cannot be upgraded (such as an enterprise version), please use the appropriate support mechanism from your vendor, or your distribution instead.