19

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.

you are viewing a single comment's thread
view the rest of the comments
[-] lurch@sh.itjust.works 1 points 10 months ago

You can also put a script in /usr/local/bin/ and make sure all users have that in their PATH and .desktop files use it. The script can set the env vars, then exec the original binary with full path and "$@"

[-] semperverus@lemmy.world 1 points 10 months ago* (last edited 10 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

this post was submitted on 08 Jan 2024
19 points (100.0% liked)

Linux

8189 readers
8 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS