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

Jusaus
Newbie

Problem still exist today, but this fix works like a charm. Using Mint 18, just added scale-factor command to spotifys startup command in launcher and that's it.

festuquet
Newbie

In a 15.4" 4k i use a 2 has a factor.

Very happy with my archlinux (artengos), very easy to install with yaourt -S spotify.
easy like android instalation, or more easy than windows.

colivaresm
Newbie

Thanks man! worked for me

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

berciktymule
Newbie

This only works for running it from command line.

Updating /usr/share/applications/spotify.desktop didn't work

Updating /usr/share/spotify/spotify.desktop didn't work.

Not even after reboot.

What fixed it for me globally (command line and unity apps) was to replace /usr/bin/spotify with a script to force the scale:

sudo rm /usr/bin/spotify && sudo echo "/usr/share/spotify/spotify --force-device-scale-factor=2" > /usr/bin/spotify && sudo chmod 755 /usr/bin/spotify 

but seriously why is spotify the only ubuntu app that does not read this value from ubuntu's config?

gricelsepulveda
Newbie

it works!! thanks a lot ❤️ 

Screenshot from 2017-07-06 16-24-38.png

 

pacuna
Newbie

This worked for me. Thanks!

Luco1
Casual Listener
That's the beauty of Linux Mint... I installed it directly from th Software
Manager of Linux Mint. 15 seconds later, it's running perfectly on my HiPDI
screen. No command line, no research to do... just playing music!

anonymousUser1
Regular

But the command line is where the fun is at. It's the most efficient way to interact with your computer.

 

As long as you got what you needed in the end, it's all good.

adrianbsuy
Casual Listener
​Yes of course that's why we all start every single gui app from the terminal passing arguments like "--look-nice-in-my-screen". The terminal shouldn't be used to type "chromium --please-run-nice", that should be default, if you pass an argument to start a gui app from terminal it should not be obvious, it should be a special case.
 
So I don't think that typing "spotify --force-device-scale-factor=1.5" instead of just typing "spotify" is "most efficient way to interact with your computer". And I don't think you should add an argument to an application just to make it usable.

jooon
Spotify
Spotify

I realized, I have never answered this thread, but this is obviously a bug that should just be fixed by Spotify. There is also another related, not as important, but much more complicated problem. It needs to rescale on the fly when you move the window between screens with different resolution. That probably requires the user to run a different display server, like Wayland or Mir, which is also not supported natively. Both problems are bugs and filed internally in the spotify desktop client bug tracker.

 

dan-ator
Newbie

I tried doing this but it wouldn't give me write access to actually save the change to the file. How can I override that?

spacepluk
Regular
You need root access. Try running your editor with sudo, for example:

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

kingtuna
Newbie

Debian 9 

 

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

 

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

bencevans
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

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

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

RaphaelBacher
Newbie

To avoid this double items, instead of copying the desktop file, the original snap app desktop file can be edited (with sudo) in /var/lib/snapd/desktop/applications/spotify_spotify.desktop (cf https://askubuntu.com/questions/919091/why-snap-files-cannot-be-modified-in-any-way).

Adding `--force-device-scale-factor=1.5` (or 2.5 in my case with a UHD screen) gets everything in order except the mouse size...

 

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

MDesigner
Casual Listener

Thanks for that, that solved it for me!

SUGGESTED POSTS