I’d been having problems with the scale of the VLC interface at 4K on my Linux machine (KDE Plasma, Wayland).

I found a solution from a mix of previous solutions for Windows and other Linux solutions which did not work for me. The problem is with QT (which is used by VLC) and the linux solution was to put extra lines in the /etc/environment file but I found while this fixed VLC it mucked up all other QT apps including my Plasma desktop.

The solution is to use VLC flatpak and set the environment variables for the VLC flatpak app only using Flatseal or the Flatpak Permission Settings in KDE.

Add two Environment variable:

Variable name: QT_AUTO_SCREEN_SCALE_FACTOR Variable value: 0

Variable name: QT_SCREEN_SCALE_FACTORS Variable value: 2

For the second variable, scale_factors, set it to match the scaling you use on your desktop. 1.0 means 100%, 1.5 is 150%, 2 is 200% and so on. My desktop is set to 225% scaling, so I set mine to 2.25 and it worked. In the end I went up to 3 for VLC because I liked the interface even more at that scale (it’s a living room TV Linux machine)

Hopefully this will help other people using VLC in Linux.

If you don’t want to use Flatpak, you can add the same variables to your /etc/environment file (in the format QT_AUTO_SCREEN_SCALE_FACTOR=0) but be warned you may get jank elsewhere. This may be less problematic outside of KDE Plasma as that is QT based desktop environment. For Windows users it is a similar problem with QT and there are posts out there about where to put the exact same variables to fix the problem.

  • Semperverus
    link
    English
    1
    edit-2
    11 months ago

    Or just dump the variables into /etc/environment, or even better, edit the .desktop file using KDE’s editor to add the env variables to just VLC