Announcements

Linux client barely usable on HiDPI displays

Solved!
Reply
Highlighted

Re: Linux client barely usable on HiDPI displays

Regular

searli not true. The GNOME DE will auto scale applications on an integer scale but you can force some individual applications to do fractional scaling.

 

Experiment:  force the resolution at 1.3, 1.7, 2.0, 2.5. You will see they all increase in size fractionally. I know this because I've done it on Fedora running GNOME.

Highlighted

Re: Linux client barely usable on HiDPI displays

Casual Listener
I have experimented and this was my experience on Fedora / Gnome - if you
use the fractional scaling when starting spotify in the terminal or if you
update spotify.desktop it did not work for me, it simply ignored the
scaling - it did work however setting it to 2.0 - so I shall leave it at
that 🙂
Highlighted

Re: Linux client barely usable on HiDPI displays

Newbie

Baller, Thanks.

Highlighted

Re: Linux client barely usable on HiDPI displays

Casual Listener

I'm pretty new to linux, and this command worked for me, however, I want to understand why. Is putting that command after the Exec=spotify %U like running an execute command with the option of forcing the ui to scale up? Hopefully my question is clear. Just wanted some background info or knowledge on why this worked I guess. Thanks.

Highlighted

Re: Linux client barely usable on HiDPI displays

Regular

Yes, the command option --force-device-scale-factor=1.8 forces the UI to scale up. I don't know all the details but the Spotify app doesn't respect your desktops scaling settings on HiDPI screens. adding that option forces it to work. Just be aware when you get an update for the Spotify application you will need to do this again. An update means you will get a new desktop file as well. 

Highlighted

Re: Linux client barely usable on HiDPI displays

Newbie

Debian 9 

 

sudo vim /usr/local/share/applications/spotify.desktop

 

Highlighted

Re: Linux client barely usable on HiDPI displays

Casual Listener

Anyone know how to set the --force-device-scale-factor permanently in the desktop app? I'm on Ubuntu 17.10, and Spotify is not using /usr/share/applications. It's apparently a "snap" application now, whatever that is.. so there's probably a different way of changing the parameters.

Highlighted

Re: Linux client barely usable on HiDPI displays

Newbie

If you've installed Spotify via the Snap you could edit /usr/share/applications/spotify.desktop

 

Add --force-device-scale-factor=1.5 so that the Exec line becomes:

 

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify --force-device-scale-factor=1.5 %U

Highlighted

Re: Linux client barely usable on HiDPI displays

Casual Listener

Like I mentioned, /usr/share/applications/spotify.desktop doesn't exist. I can't figure out where the desktop file is actually saved.

Highlighted

Re: Linux client barely usable on HiDPI displays

Newbie

Oddly enough, it's in /snap/spotify/5/usr/share/spotify/spotify.desktop. This is read-only, however and I can't edit it, even as root.

 

What I did was copy that .desktop file to ~/.local/share/applications, where I edited it to add `--force-device-scale-factor=1.5`. This fixes the hidpi problem.

 

However, my new .desktop file was missing the icon, for some reason still pointing to /usr/share/spotify/icons, which no longer exists. So I had to edit the Icon entry in my new .desktop entry to Icon=/snap/spotify/current/usr/share/spotify/icons/spotify-linux-128.png.

 

Sadly, this means I have two results in the heads-up display when I search for Spotify -- my version and the snap version. Don't know how to fix that.

SUGGESTED POSTS