steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

Steam client does not use Gnome's scaling setting

Open NTMan opened this issue 6 years ago • 153 comments

Your system information

  • Steam client version (build number or date): 1523923735
  • Distribution (e.g. Ubuntu): Fedora 28
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Steam client does not respond to scaling settings so it doesn't ready for 4K era screenshot from 2018-04-24 00-41-56

NTMan avatar Apr 23 '18 20:04 NTMan

Hello @NTMan, HiDPI is currently disabled by default at Steam -> Settings -> Interface -> Enlarge text and icons based on monitor size (requires restart). Please confirm this setting is checked.

kisak-valve avatar Apr 23 '18 20:04 kisak-valve

Yes, this option enable scale to 200% but client still ignore desktop settings. If desktop switch to 100% scaling steam client after restart will work with 200% scaling. It's not good. screenshot from 2018-04-24 02-09-46

Second issue this seting not affected to splash screen. (Window which show update steam message) screenshot from 2018-04-24 02-07-44

NTMan avatar Apr 23 '18 21:04 NTMan

Thanks for checking, marking as a feature request for Steam to consider GTK+'s scaling factor with its HiDPI support.

As for the initial update window, that is intentionally very basic so that it has as few requirements as possible while doing updates.

kisak-valve avatar Apr 23 '18 21:04 kisak-valve

How is basic functionality for 4K monitors on Linux a feature request? It's basically unusable on my 13 XPS, you can't even see to login it's so small

IamTails avatar Aug 10 '18 12:08 IamTails

Ditto.

DanielJoyce avatar Aug 11 '18 04:08 DanielJoyce

Same problem for me on Steam. The scaling settings from GNOME are not respected. Is there any movement towards a fix on this?

stanholzendorf avatar Aug 11 '18 22:08 stanholzendorf

If you can manage to actually see to login, there is a setting you can toggle to make it usable ish

IamTails avatar Aug 11 '18 22:08 IamTails

Well, I can log in and it is usable for me, just not a very pleasant experience. Regarding the setting, do you mean the interface setting, that says 'Enlarge text and icons based on monitor size'? If so, I do have it enabled/checked. Does not do anything for me, no different to when I have unchecked.

stanholzendorf avatar Aug 11 '18 23:08 stanholzendorf

Ya that made one made it slightly larger and useable but still small

IamTails avatar Aug 12 '18 01:08 IamTails

That "enlarge text" checkbox does nothing for me on Ubuntu 18.04 / Dell Precision M3800.

briskt avatar Oct 21 '18 18:10 briskt

You might want to start Steam with the environment variable GDK_SCALE=2 to ensure HiDPI support.

AFAIK GNOME and GTK internally uses XSettings to share information about scaling, but Steam only recognizes the environment variable (which is also recognized by GTK, and used in desktop environments without XSettings, such as KDE), not XSettings.

hexchain avatar Feb 09 '19 18:02 hexchain

You might want to start Steam with the environment variable GDK_SCALE=2 to ensure HiDPI support.

AFAIK GNOME and GTK internally uses XSettings to share information about scaling, but Steam only recognizes the environment variable (which is also recognized by GTK, and used in desktop environments without XSettings, such as KDE), not XSettings.

No effect in cinnamon, won't use gnome because it doesn't support zooming in on the screen with the mousewheel, not even an option to manually add it, tried looking for software too but nope, gnome is not user friendly, only developer friendly, that's the wrong way round for software

awsdert avatar Oct 15 '19 08:10 awsdert

Issue still present. Ubuntu 18.04.

ahyattdev avatar Dec 16 '19 22:12 ahyattdev

Still having this issue 19.10 and when using 125% scaling of wayland. Pleeeeese look into it Steam

sheerun avatar Jan 12 '20 11:01 sheerun

You might want to start Steam with the environment variable GDK_SCALE=2 to ensure HiDPI support.

Thanks for this workaround! I created a desktop starter for steam accordingly (see attachment). After saving it in your local ~/.local/share/applications directory as "Steam HiDPI.desktop", a "Steam HiDPI" icon will appear in your gnome shell overview.

Steam HiDPI.txt

errotu avatar Feb 09 '20 15:02 errotu

Issue still present in 19.10. If this was FOSS we would have fixed it ourselves by now. Simple GTK+ API call.

ahyattdev avatar Feb 09 '20 21:02 ahyattdev

Big picture mode seems to scale correctly in 19.10. How is this not considered a bug?

K1rdro avatar Apr 06 '20 03:04 K1rdro

The biggest cause of this problem I would reckon is because no base font size is used from what I've seen in the css files I found, I've only seen fixed pixel sizes, I suggest before you go back to this problem you make one global variable such as "BASE_FONT_SIZE" in everything that uses fonts whether it be css, js, C or something else, have steam set those variables at startup then make everything including UI elements calculate their size based on that, here's some example HTML/CSS I put together while looking for the optimal size for my projector that I wanted out of steam:

<!doctype html>
<html style="font-size: 8mm; padding: 0.2rem">
<head>
<title>Font-size test</title>
<style>
html, html *
{
	font-color: gray;
	line-height: 1.2em;
	vertical-align: text-bottom
}
body {
	border: 0.2rem solid blue;
	margin: 0;
	min-width: 50rem
}
.hbar
{
	display: block
}
.hbar li
{
	border: 0.2rem solid green;
	display: inline;
	display: inline-block;
	padding: 0.2rem;
	position: relative
}
.hbar li li
{
	display: block
}
.hbar ul, .hbar ol, .hbar dl
{
	display: none;
	position: absolute;
	top: 1.4em;
	left: 0
}
.hbar a:hover + ul, .hbar ul:hover,
.hbar a:hover + ol, .hbar ol:hover,
.hbar a:hover + dl, .hbar dl:hover
{
	display: block
}
img, .bg-img
{
	background: gray;
	border: 0.2rem solid gray;
	display: inline;
	display: inline-block;
	margin: 0;
	width: 5rem;
	height: 7rem
}
.bg-img
{
	background: no-repeat url("w3schools.jpg");
	background-size: 100% 100%;
	background-size: cover;
}
</style>
</head>
<body>
<div class="bar">
<ul class="hbar">
<li class="menu"><a>Store</a></li>
<li class="menu">
	<a>Library</a>
	<ul>
		<li><a href="#lib_games">Games</a></li>
		<li><a href="#lib_tools">Tools</a></li>
		<li><a href="#lib_both">Both</a></li>
	</ul>
</li>
<li class="menu"><a>Community</a></li>
<li class="menu">
	<a>Font examples</a>
	<ol>
		<li><b style="font-size: 1.0rem">1.0rem</b></li>
		<li><b style="font-size: 1.2rem">1.2rem</b></li>
		<li><b style="font-size: 1.4rem">1.4rem</b></li>
		<li><b style="font-size: 1.6rem">1.6rem</b></li>
		<li><b style="font-size: 1.8rem">1.8rem</b></li>
		<li><b style="font-size: 2.0rem">2.0rem</b></li>
	</ol>
</li>
</ul>
</div>
<input style="width: 5rem" value="123456" />
<img id="bg-img"
	src="https://www.w3schools.com/html/w3schools.jpg"
	alt="W3Schools" />
<hr class="bg-img" />
<div class="bg-img">&nbsp;</div>
</body>
</html>

Just swap out the image for whatever example image/s you need to work from, slap together a test app that modifies the base font-size then test on manjaro distro's via virtual box or something, if your code works there then it should work anywhere and put this issue to rest.

awsdert avatar Apr 18 '20 11:04 awsdert

Same problem here:

  • Fedora release 32 (Thirty Two)
  • Mesa Intel® UHD Graphics 620 (KBL GT2)
  • GNOME 3.36.2 (Wayland)

I just noticed this bug is opened since 2018... great.

tmrizzo avatar May 12 '20 23:05 tmrizzo

For any of you having problems with Steam client HiDPI, here is a "hack" step-by-step while you wait for an official solution.

Basically, you'll set the environment variable GDK_SCALE. I'll be using 2 - because GNOME - so the variable will be GDK_SCALE=2. Is it pretty? No. Does it work? Yes.

Important

  • When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.
  • You may try to enable fractional scale, however, this is an experimental feature in GNOME. If you're curious:
    • To enable fractional scale (again EXPERIMENTAL):
    $ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
    
    • To reset the value:
    gsettings reset org.gnome.mutter experimental-features
    

Tested on Fedora 32/GNOME 3.36.2 (Wayland):

  1. Make a copy of the steam.desktop file to the following location:
# cp /usr/share/applications/steam.desktop ~/.local/share/applications/

Note: The ~/.local/share/applications/steam.desktop will now take precedence over /usr/share/applications/steam.desktop so keep that in mind.

  1. Edit ~/.local/share/applications/steam.desktop with an editor of your choice. Append env GDK_SCALE=2 to the Exec= parameter.
  • From this:

    [Desktop Entry]
    Name=Steam
    Comment=Application for managing and playing games on Steam
    ....
    Exec=/usr/bin/steam %U
    ....
    
  • To this:

    [Desktop Entry]
    Name=Steam
    Comment=Application for managing and playing games on Steam
    ....
    Exec=env GDK_SCALE=2 /usr/bin/steam %U
    ....
    

Optional: change Name=Steam to Name=Steam HiDPI or something else for reference.

  1. Exit Steam client and start it again.

Now you may be able to read the screen.

If you want to revert the change, just delete ~/.local/share/applications/steam.desktop and you are good to go.

tmrizzo avatar May 13 '20 00:05 tmrizzo

The hack @tiagomdrizzo @errotu mentioned above doesn't solve the issue at all! GDK_SCALE=1 is too small, but GDK_SCALE=2 is too large for me. The correct value I want is 1.25 or 1.5.

2020-06-02_00001

2020-06-02_00002

JasonHK avatar Jun 01 '20 17:06 JasonHK

For any of you having problems with Steam client HiDPI, here is a "hack" step-by-step while you wait for an official solution.

Basically, you'll set the environment variable GDK_SCALE. I'll be using 2 - because GNOME - so the variable will be GDK_SCALE=2. Is it pretty? No. Does it work? Yes.

Important

* When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.

* You may try to enable fractional scale, however, this is an experimental feature in GNOME. If you're curious:
  
  * To enable fractional scale (again **EXPERIMENTAL**):
  
  ```
  $ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
  ```
  
  
  
  * To reset the value:
  
  ```
  gsettings reset org.gnome.mutter experimental-features
  ```

Tested on Fedora 32/GNOME 3.36.2 (Wayland):

1. Make a copy of the steam.desktop file to the following location:
# cp /usr/share/applications/steam.desktop ~/.local/share/applications/

Note: The ~/.local/share/applications/steam.desktop will now take precedence over /usr/share/applications/steam.desktop so keep that in mind.

1. Edit `~/.local/share/applications/steam.desktop` with an editor of your choice. Append `env GDK_SCALE=2` to the `Exec=` parameter.


* From this:
  ```
  [Desktop Entry]
  Name=Steam
  Comment=Application for managing and playing games on Steam
  ....
  Exec=/usr/bin/steam %U
  ....
  ```

* To this:
  ```
  [Desktop Entry]
  Name=Steam
  Comment=Application for managing and playing games on Steam
  ....
  Exec=env GDK_SCALE=2 /usr/bin/steam %U
  ....
  ```

Optional: change Name=Steam to Name=Steam HiDPI or something else for reference.

1. Exit Steam client and start it again.

Now you may be able to read the screen.

If you want to revert the change, just delete ~/.local/share/applications/steam.desktop and you are good to go.

That value has been repeated a number of times already and NO IT DOES NOT WORK! Please stop repeating what's already been said

awsdert avatar Jun 02 '20 11:06 awsdert

Bug still present in Ubuntu 20.04, more than 2 years after it was reported.

santiagofn avatar Jun 07 '20 00:06 santiagofn

  • When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.

That's plain wrong... these days GNOME has enabled fractional scaling by default.

compalmanel avatar Jun 09 '20 19:06 compalmanel

Workaround in https://github.com/ValveSoftware/steam-for-linux/issues/5460#issuecomment-583857902 works well for me in Ubuntu 20.04.

yesrod avatar Jun 21 '20 02:06 yesrod

  • When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.

That's plain wrong... these days GNOME has enabled fractional scaling by default.

Not really, some distros tried it but reversed it since it was too buggy, there is no fractional scaling in gnome shell unless you are one of the few that runs wayland.

sciroccogti82 avatar Jun 29 '20 18:06 sciroccogti82

  • When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.

That's plain wrong... these days GNOME has enabled fractional scaling by default.

Not really, some distros tried it but reversed it since it was too buggy, there is no fractional scaling in gnome shell unless you are one of the few that runs wayland.

I suggest you update yourself on the state of fractional scaling in the Linux Desktop, Wayland and GTK3 with Hi-DPI are the norm these days.

Unless you're one of those people running Gentoo on a text terminal, in which case you don't need the Steam Client, you just need to compile Dwarf Fortress.

compalmanel avatar Jun 29 '20 19:06 compalmanel

  • When using GNOME, you either use 1:1 or 2:1 scaling, there is nothing in between.

That's plain wrong... these days GNOME has enabled fractional scaling by default.

Not really, some distros tried it but reversed it since it was too buggy, there is no fractional scaling in gnome shell unless you are one of the few that runs wayland.

I suggest you update yourself on the state of fractional scaling in the Linux Desktop, Wayland and GTK3 with Hi-DPI are the norm these days.

Unless you're of those people running Gentoo on a text terminal, in which case you don't need the Steam Client, you just need to compile Dwarf Fortress.

Sarcasm aside you're either wrong or steam just doesn't play well with arch based distros like manjaro because I still have tiny text, can I suggest you switch to qt which seems to be popular these days and I've had no real issues with apps using that on manjaro, had to tweak global font defaults in the qt settings manager but otherwise no real issue with text

awsdert avatar Jul 01 '20 21:07 awsdert

Sarcasm aside you're either wrong or steam just doesn't play well with arch based distros like manjaro because I still have tiny text, can I suggest you switch to qt which seems to be popular these days and I've had no real issues with apps using that on manjaro, had to tweak global font defaults in the qt settings manager but otherwise no real issue with text

I'm running an Ubuntu system with every app using HiDPI without any issues. Except for the Steam client that is. Thanks to the GDK_SCALE=2 trick mentioned above I've been able to make the Steam Client usable again.

The Steam client doesn't properly implement scaling and needs a work around. That's what this bug is about. And I hope Valve doesn't dismiss it with an excuse as lame as "it's not our fault".

compalmanel avatar Jul 01 '20 21:07 compalmanel

Personally I'd rather steam did away with the "larger text based on screen size" option (which I've never seen work) and shove in a range box using the "pt" unit with minimum set to 6pt and maximum set to 100pt

awsdert avatar Jul 02 '20 16:07 awsdert