If you’re in the unfortunate position of needing to use MuseScore4 on linux for some reason (for example to use its excellent MIDI to notation conversion) and are having issues with the Flatpak version having an unreadably tiny UI on high-DPI screens, here’s how to fix it.

Open the .desktop file for MuseScore 4 – mine was in /var/lib/flatpak/app/org.musescore.MuseScore/current/active/export/share/applications/org.musescore.MuseScore.desktop

Find the Exec key, and change the command to include --env=QT_SCALE_FACTOR=2. Mine ended up looking like this:

Exec=/usr/bin/flatpak run --env=QT_SCALE_FACTOR=2 --branch=stable --arch=x86_64 --command=mscore --file-forwarding org.musescore.MuseScore @@ %F @@

Save (you’ll need to enter your password, or to have launched the editor with sudo).

Try launching MuseScore again. If you’re lucky, it’ll have a readable UI. If not, try restarting and launching it again — I haven’t found a way of successfully getting KDE to force-update all its .desktop files. Presumably there’s a cache somewhere? If anyone knows how to reliably do this, please let me know!

This should work for any Flatpak which uses QT, on any desktop environment which uses .desktop files. I really hope “UI Scale” becomes a standard per-application setting in the near future.

EDIT: thanks to carmanaught on the KDE forums for this additional suggestion to copy the .desktop file to ~/.local/share/applications rather than editing it in-place, and for details about how to set up a service to watch this folder and clear the desktop file cache whenever it’s edited.