linuxmint / cinnamon-screensaver

The Cinnamon screen locker and screensaver program
GNU General Public License v2.0
151 stars 86 forks source link

Cinnamon lock does not respect display scale (not fractional) #449

Open StormBytePP opened 8 months ago

StormBytePP commented 8 months ago

Distribution

Gentoo

Package version

5.8.1

Graphics hardware in use

NVIDIA GeForce RTX 4080

Frequency

Always

Bug description

I have configured my display with a 4K resolution (3840x2160) with a UI scale of 200%, however, when I lock screen, that scaling factor is turned into 50% instead and I see the lock image, text input, etc on the upper left corner halved.

Debug mode said why I see the size halved:

Scale factor of 2 applied. Monitor 0 is 0,0 960 x 540

And this seems to be indeed the problem, digging into the code I found in file libcscreensaver/cs-screen-x11.c in lines 162 and 163:

    infos[i].rect.width /= factor;
    infos[i].rect.height /= factor;

If I remove those and recompile/reinstall then debug now says "Scale factor of 2 applied. Monitor 0 is 0,0 1920 x 1080" and I can see the lock image in fullscreen again.

I guess this is not the optimal solution (and it is strange that it says monitor is 1920 x 1080 when it is actually 3840 x 2160) but I hope it gives a hint.

Steps to reproduce

Expected behavior

Lock screen occupies all screen instead of just a quarter of it (because it is halved)

Additional information

No response

StormBytePP commented 8 months ago

I attach the display config

imagen

StormBytePP commented 8 months ago

And this is how lock screen is like (without the hack)

shot

nhaggin commented 8 months ago

Something generally is rotten with scaling and the lock screen, even up to 6.0.2. Compare #438, where both 100% and 200% scaling work fine for me but I have problems at fractional values.

I've also had problems similar to #437 and #440 where the desktop was briefly visible.

Nuralii1i commented 3 months ago

Is this fixed?I also am a Gentoo user and I gave up on Cinnamon because exactly same issue on exactly same resolutioned monitor (I think it was 5.8.4) I noticed this for long time, but did not see somebody who is dev response for this

StormBytePP commented 3 months ago

Unfortunatelly it is not fixed yet neither there is any response from a dev. The whole scale factor seems a mess in GTK where sometimes it is respected and sometimes not. Unluckily I went back to xfce because these things are annoying enough