linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.48k stars 730 forks source link

Spotify & Steam clients looks very small when fractional scaling is on 125% #11428

Open Jrgels opened 1 year ago

Jrgels commented 1 year ago
 * Cinnamon version 5.6.7 Stable Release
 * Distribution - Mint 21.1
 * AMD Ryzen 5 4500U with Radeon Graphics & Linux Integrated Driver
 * 64 bit

Issue

Spotify & Steam clients looks very small when fractional scaling is on 125%

Steps to reproduce

On a 1920x1980 screen set the fractional scaling at 125% and open Steam and/or Spotify

Expected behaviour

Have a constant fractional scaling with all the system

anaximeno commented 1 year ago

Are they installed as deb packages or flatpak?

Jrgels commented 1 year ago

both of them are .deb, the spotify one provided from the repo of their webpage and steam .deb downloaded also from the webpage

winkmal commented 1 year ago

Issue

Spotify & Steam clients looks very small when fractional scaling is on 125%

Same here (Intel UHD Graphics 620, internal display), with Steam and KeePass (both .deb). Used to work on Mint 20.3, so it looks like a regression.

conradax commented 1 year ago

got same problem with steam and watt toolkit. tried ~/.Xresources but no luck. integral scaling are all the same size, fractional scaling are all at the smaller same size than integral scaling.
( i mean physical size) scaling

I also notice that resolution reported by screenfetch is wired at different scaling. scaling resolution in screenfetch times
100% 2240x1400 1.0
125% 3584x2240 1.6
150% 2976x1860 1.32857...
175% 2560x1600 1.14285...
200% 2240x1440 1.0

OS: Manjaro 23.0.0 UltimaThule
Cinnamon Version: 5.6.8
Kernel: x86_64 Linux 6.1.31-2-MANJARO
Resolution: 2240x1400
CPU: AMD Ryzen 7 5800H with Radeon Graphics @ 16x 3.2GHz
GPU: AMD/ATI Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]
atiredman commented 1 year ago

Just wanted to chime in and say I have noticed the same issue, with the Flatpak versions of Steam and Minecraft. I also tried ~/.Xresources with no luck. Has anyone found a fix/workaround?

Screenshot from 2023-09-03 10-18-34

From what I can tell, this issue occurs due to how Cinnamon handles fractional scaling by scaling everything up to the nearest full integer then downsizing it to the desired %. It seems like certain programs cannot be scaled up beyond 100%, yet they still get scaled down. If there was a way to keep the programs at 100% it would improve the issue if not fix it outright.

winkmal commented 1 year ago

Same here (Intel UHD Graphics 620, internal display), with Steam and KeePass (both .deb). Used to work on Mint 20.3, so it looks like a regression.

Since I upgraded to Mint 21.2 (Cinnamon 5.8), this seems to be fixed, at least for KeePass. Can anybody confirm for Steam?

conradax commented 1 year ago

Same here (Intel UHD Graphics 620, internal display), with Steam and KeePass (both .deb). Used to work on Mint 20.3, so it looks like a regression.

Since I upgraded to Mint 21.2 (Cinnamon 5.8), this seems to be fixed, at least for KeePass. Can anybody confirm for Steam?

tested steam just now, still small

OS: Manjaro 23.0.0 Uranos Kernel: x86_64 Linux 6.1.49-1-MANJARO Cinnamon: 5.8.4

Soremir commented 11 months ago

I have the same problem with a fresh install of LMDE 6. When scaling is set to 125% steam gets smaller. It is a really weird bug.

Alquas commented 10 months ago

Just to confirm, the problem is still there for Steam on Mint 21.2 (Cinnamon 5.8.4). GIMP seems to be broken too.

LukasThyWalls commented 10 months ago
Linux Mint 21.2 Cinnamon
Cinnamon 5.8.4
AMD Ryzen 7 3700U with Radeon Vega Mobile 10 Graphics
1920x1080 14'' display

Hello. I have a freshly installed Linux Mint 21.2 this week, and with 125% (Experimental Fractional Scaling), i have this issue with these apps:

Maybe is any SDL app?

Also looking in the system info, it says:

Screen-1: 0 s-res: 3072x1728 s-dpi: 120
Monitor-1: eDP res: 3072x1728 dpi: 253 diag: 355mm (14")

Just to confirm, the problem is still there for Steam on Mint 21.2 (Cinnamon 5.8.4). GIMP seems to be broken too.

GIMP looks "fine"* to me.

(*) Edit: Looking more closely, some elements seems fine meanwhile other ones look different that they look in Windows: Text in docked dialogs are in a very different size compared to the main menu ones, also the space between the items in the main menus is very tiny. But something that sticks out is the limit layer pattern (... - - - - - ...) in the image, it's very very tiny and almost seems dots instead lines, and also each of the image preview tabs are very very small.

(*) Definitely, is wrong. With a 100% Zoom of a 1920x1080 canvas it doesn't fill the screen because GIMP "thinks" that is really in a 3072x1728 screen.


Thanks!

winkmal commented 9 months ago

Since I upgraded to Mint 21.2 (Cinnamon 5.8), this seems to be fixed, at least for KeePass. Can anybody confirm for Steam?

Sorry for raising false hopes. Seems that somehow my scaling got reset to 100 %. After re-applying 125 %, problem is there again, in KeePass as well as Steam. So still an issue!

stelcodes commented 9 months ago

Same problem here with Steam. Gimp looks fine for me. -forcedesktopscaling=2 works in the meantime.

axoletl commented 8 months ago

Bumping, encountered this on the new Mint 21.3 beta with the 6.5 kernal. Steam, XIVLauncher (flatpak app) and most egregiously wine/proton apps suffer from the smaller size (proton being the most problematic since they seem to render at massive resolutions when fullscreened like this).

Interestingly I was also running Ubuntu 22.04 with Cinnamon 5.2.7 on this same system and did not encounter this issue. I chose to move to Mint proper to get new Cinnamon features and applets (and snapless ubuntu base) so was very confused what the discrepancy could be, hard to say since theres so much difference between these two installs.

LukasThyWalls commented 8 months ago

I have been adding some extra info I have been gathering all this time in my comment above https://github.com/linuxmint/cinnamon/issues/11428#issuecomment-1806500375 to no disrupt the thread with little new bits (mostly other apps with the issue), but I wanted to share this because tried to do also some mathematics with my settings and mostly fits what is said above:

75%
  Screen-1: 0 s-res: 2560x1440 s-dpi: 72 s-size: 903x508mm (35.6x20.0") s-diag: 1036mm (40.8")
  Monitor-1: eDP res: 2560x1440 hz: 60 dpi: 210 size: 309x174mm (12.2x6.9") diag: 355mm (14")

100%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") s-diag: 583mm (23")
  Monitor-1: eDP res: 1920x1080 hz: 60 dpi: 158 size: 309x174mm (12.2x6.9") diag: 355mm (14")

125%
  Screen-1: 0 s-res: 3072x1728 s-dpi: 120 s-size: 650x366mm (25.6x14.4") s-diag: 746mm (29.4")
  Monitor-1: eDP res: 3072x1728 hz: 60 dpi: 253 size: 309x174mm (12.2x6.9") diag: 355mm (14")

150%
  Screen-1: 0 s-res: 2560x1440 s-dpi: 72 s-size: 903x508mm (35.6x20.0") s-diag: 1036mm (40.8")
  Monitor-1: eDP res: 2560x1440 hz: 60 dpi: 210 size: 309x174mm (12.2x6.9") diag: 355mm (14")

175%
  Screen-1: 0 s-res: 2208x1242 s-dpi: 167 s-size: 336x189mm (13.2x7.4") s-diag: 386mm (15.2")
  Monitor-1: eDP res: 2208x1242 hz: 60 dpi: 181 size: 309x174mm (12.2x6.9") diag: 355mm (14")

200%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 192 s-size: 254x143mm (10.0x5.6") s-diag: 291mm (11.5")
  Monitor-1: eDP res: 1920x1080 hz: 60 dpi: 158 size: 309x174mm (12.2x6.9") diag: 355mm (14")

... with this data the relationship between every bit of data looks like:

125% -> ratio = 1.6 (160%)

150% -> ratio = 1.333... or 4/3 (133,333...% or 400/3 %)

175% -> ratio = 1.15 (115%)

... and knowing that, the calculation between seems to be (set% is noted data for each percentage setting):

res(set%) = res(100%) * ratio(set%)

dpi(set%) ≃ dpi(100%) * ratio(set%)

s-res(set%) = eDP_res(set%)

s-dpi(set%) ≃ s-dpi(100%) / ratio(set%)

And then I saw something else (res is equal to s-res and _eDPres):

res(set%) * set% ≃ 4 * res(100%)

3072x1728 * 125% = 3840x2160 = 4 * res(100%)

2560x1440 * 150% = 3840x2160 = 4 * res(100%)

2208x1242 * 175% = 3864x2173.5 ≃ 3840x2160 = 4 * res(100%)

This also matches the data shared by @conradax above:

3584x2240 * 125% = 4480x2800 = 4 * 2240x1400

2976x1860 * 150% = 4464x2790 ≃ 4480x2800 = 4 * 2240x1400

2560x1600 * 175% = 4480x2800 = 4 * 2240x1400

Which brings to the topic what is said just above: The performance is also weird, and it is because some apps are in fact rendering a 4 times the real screen resolution at any time (4K with a 1080p screen in my case, for example) and you can see that because the fan goes at full speed directly without warning and It sucks much more the battery (I was guessing it was a driver/app performance issue in Linux, but with this it make more sense). I don't know if it's the common approach to the High DPi settings thing in other Linux desktop environments but it's rough, to say, at least.

Anyway, I'm only throwing my info to see if someone who knows better about how this should work understand what is happening to make it less experimental soon...

Thanks.

EDIT: I just updated the info with the one from Linux Mint 21.3 instead of the one from 21.2, as the new one is more verbose.

aleex5 commented 3 months ago

the same thing happens in the games, everything looks very small at 125%, I also noticed that it affects steam notifications, they look out of place.

mtwebster commented 3 months ago

You can try having cinnamon 'upscale' instead of 'downscale':

gsettings set org.cinnamon.muffin.x11 fractional-scale-mode 'scale-up' 

This changes the way fractional scaling is applied, and should allow the steam client to appear normal sized.

If you have multiple monitors this may not work properly, due to a bug (will be fixed in the next Cinnamon release) If you have issues, just repeat the above command with scale-down

You should restart Cinnamon after changing this (alt-f2, r, enter)

LukasThyWalls commented 3 months ago

Just tested the option mentioned by @mtwebster and... well, for me It have some of the same issues but in the opposite way, although some things are better this way and others don't.

Any application seems to work better as the "real" rendering is not 4K and downscaled to the display, It's more like the resolution is changed to a lower one and because that everything is bigger. But all application still uses the original resolution when is set inside the application itself, because they still use the real resolution instead the virtual one. But that's fine when we are talking with a window, It's what It's supposed to happen, although because It's like a changed resolution to a lower one, the display looks blurry, something that didn't happen with the other option.

This are the resolutions showing in my case in the System information to compare with the other option:

75%
  Screen-1: 0 s-res: 2560x1440 s-dpi: 72 s-size: 903x508mm (35.6x20.0") s-diag: 1036mm (40.8")
  Monitor-1: eDP res: 2560x1440 hz: 60 dpi: 210 size: 309x174mm (12.2x6.9") diag: 355mm (14")

100%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") s-diag: 583mm (23")
  Monitor-1: eDP res: 1920x1080 hz: 60 dpi: 158 size: 309x174mm (12.2x6.9") diag: 355mm (14")

125%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
  Monitor-1: eDP res: 1536x864 hz: 60 dpi: 126 size: 309x174mm (12.2x6.9") diag: 355mm (14")

150%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
  Monitor-1: eDP res: 1280x720 hz: 60 dpi: 105 size: 309x174mm (12.2x6.9") diag: 355mm (14")

175%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
  Monitor-1: eDP res: 1104x621 hz: 60 dpi: 91 size: 309x174mm (12.2x6.9") diag: 355mm (14")

200%
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") s-diag: 583mm (23")
  Monitor-1: eDP res: 960x540 hz: 60 dpi: 79 size: 309x174mm (12.2x6.9") diag: 355mm (14")

I should test other distros to see what they do to with this, but I supposed that the High-DPI settings normally should scale the all UI elements compatible according to the setting, with other things using the real one or scaling specific windows. But this instead this scale everything indiscriminately, causing issues to apps that doesn't know what resolution the display is really using.

By the way:

You can try having cinnamon 'upscale' instead of 'downscale':

gsettings set org.cinnamon.muffin.x11 fractional-scale-mode 'scale-up' 

This changes the way fractional scaling is applied, and should allow the steam client to appear normal sized.

If you have multiple monitors this may not work properly, due to a bug (will be fixed in the next Cinnamon release) If you have issues, just repeat the above command with scale-down

You should restart Cinnamon after changing this (alt-f2, r, enter)

The settings to change this are 'scale-up' and 'scale-ui-down':

$ gsettings range org.cinnamon.muffin.x11 fractional-scale-mode
enum
'scale-up'
'scale-ui-down'
gsettings set org.cinnamon.muffin.x11 fractional-scale-mode 'scale-up' 
gsettings set org.cinnamon.muffin.x11 fractional-scale-mode 'scale-ui-down' 

Also, to reset via CLI the scale if the window can fit the screen (I've had some issues with that when testing) (NOTE: eDP is my Id of my display show in the xrandr command line, yours can be different):

xrandr --output eDP --scale 1x1

Thanks.