Linux client barely usable on HiDPI displays

Solved!
Reply

Linux client barely usable on HiDPI displays

TurkeyBloke
Casual Listener

I have a 4k display, and the Linux (at least?) client is practically unusable.

Is HiDPI support on the roadmap?

4 ACCEPTED SOLUTIONS
Solution!

Tangram
Regular

Add --force-device-scale-factor=1.5 (or whatever fits your UI scale) as a command line option.

 

You could edit /usr/share/applications/spotify.desktop or wherever the .desktop file is located and change the line with Exec= to:

 

Exec=spotify --force-device-scale-factor=1.5 %U

 

Problem solved.

View solution in original post

Solution!

mobman02
Newbie
I can confirm that this option does not have any effect on Spotify 0.9.17.1, the official version you get here: https://www.spotify.com/fr/download/linux/

View solution in original post

Solution!

andriesfilmer
Newbie

I made a Alias in my .bashrc

 

alias spotify="/usr/bin/spotify --force-device-scale-factor=1.5"

 

This works on Ubuntu 16.04

 

 

View solution in original post

Solution!

jxjj
Newbie

Great tip! Here's what I did on 17.10 in case it helps anyone:

  1. Open up Spotify snap desktop shortcut:
    $ sudo gedit /var/lib/snapd/desktop/applications/spotify_spotify.desktop
  2. Add --force-device-scale-factor=2.0 (or 1.5 or whatever scale factor you want) to the Exec line:
    Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify --force-device-scale-factor=2.0 %U 

     

View solution in original post

54 Replies

esssbee
Newbie

For anyone interested, for Elementary OS (Loki) the corresponding actions are below:

sudo gedit /usr/share/applications/spotify.desktop

Once you have the file open, change the Exec to:

Exec=spotify --force-device-scale-factor=2.0 %U

Change the scale to whatever suits you - 2.0 works for me on a 13" Retina Macbook...

Le26
Newbie

I'm new to linux (I have the Ubuntu 16.04 version) and I tried to change the spotify.desktop file. I could do that by nothing has changed when I open Spotify again. All I get is the reply in the terminal:

ATTENTION: default value of option force_s3tc_enable overridden by environment.

Could someone help me, please?

 

P.S. I installed it via the command lines Spotify gives on the Download page for Linux, not via snap

rasodhi
Newbie

How should one apply these command parameters for a HiDpi display on a FlatPak installed version? I can't find the spotify.desktop file in either of the following folders:

~/.local/share/applications/

or

/usr/share/applications/

gfierro
Casual Listener

The flatpak .desktop is in:

/var/lib/flatpak/exports/share/applications

 

that you can copy to your home and edit.

anonymousUser1
Regular

Works for me on GNU/Linux. Spotify client version 1.0.33.106 on Fedora 24, using a 4k monitor. although I had to bump up the scale to 1.8.

 

Here is my desktop file also attached.

 

[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Spotify streaming music client
Icon=spotify-client
Exec=/usr/bin/spotify --force-device-scale-factor=1.8 %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;

 

 

thomasc6
Newbie

I confirm this does not seem to work with the latest beta.

spacepluk
Regular

Nevermind, it does work, I just forgot to restart gnome-shell to reload the .desktop file.

adrianbsuy
Casual Listener

It should be automatically. Or at least have a GUI option to set the scaling factor.

brooksa321
Newbie

Unfortunately, It does not follow the scaling factor set in the OS.

Solution!

Tangram
Regular

Add --force-device-scale-factor=1.5 (or whatever fits your UI scale) as a command line option.

 

You could edit /usr/share/applications/spotify.desktop or wherever the .desktop file is located and change the line with Exec= to:

 

Exec=spotify --force-device-scale-factor=1.5 %U

 

Problem solved.

View solution in original post

elite4seth
Newbie

Baller, Thanks.

searli
Casual Listener

Note that under Fedora / Gnome you need to set the scaling factor to 2.0 - Gnome Desktop does not allow for decimal scaling; 

anonymousUser1
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.

searli
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 🙂

solaronzim
Newbie

For all y'all noobs like me who aren't too fancy with the Terminal, put the commands in one line at a time:

cd /usr/share/applications

sudo nano spotify.desktop

 

Then put in your password and press enter. You'll see your terminal enter text edit mode. Go down to the like that reads:

Exec=spotify %U

And change it to

Exec=spotify %U --force-device-scale-factor=1.5

Or if you want an even more scaled up version like myself:

Exec=spotify %U --force-device-scale-factor=2

 

Then press ctrl+O and hit Enter.

Then Exit the text editor by pressing ctrl+X

Then restart Spotify and you'll be able to read all the things finally!

beroost
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.

anonymousUser1
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. 

Luco1
Casual Listener

I'm a newbie in Linux... can you explain in detail the sequence for editing the file. I found the file but I have no idea how to edit it ! Thanks

anonymousUser1
Regular
Where ever you found the file it will be easier for you to use nano to edit
the file from the terminal.

Actually. Jump on Reddit and create a post in /r/linux4noobs. I (or someone
else) will answer your questions to edit the file.

Luco1
Casual Listener

Finally, I succeed doing it  by myself... learning a little bit of Linux in the process. Thank you !

SUGGESTED POSTS