Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QT applications and plasma have their icons under-scaled on a HiDPI display when running KDE #131032

Open
poscat0x04 opened this issue Jul 22, 2021 · 1 comment
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: qt/kde

Comments

@poscat0x04
Copy link
Contributor

poscat0x04 commented Jul 22, 2021

Describe the bug
QT applications and plasma will have their icons under-scaled if you only set services.xserver.dpi.
While you can adjust the icon size in the system settings, it does not work for some applications such as Krita.

After some debugging, I found out that this is caused by startplasma-x11 which always sets QT_AUTO_SCREEN_SCALE_FACTOR to 0 even if you've already set them in /etc/profile (via environment.sessionVariables). If I set QT_AUTO_SCREEN_SCALE_FACTOR to 1 (or just unset it) for any QT application then it will display icons with the right size. After some more research, I found this similar issue #96055. According to this comment under that issue, there was a time where QT_AUTO_SCREEN_SCALE_FACTOR is unset but now it is always set (to 1). I think this is what caused this bug and I wonder what might have changed between then and now.

Of course, this issue can be avoided if we use only KDE to configure HiDPI (through display configurations > global scale), that is to not set services.xserver.dpi. But this workaround is not deterministic and does not work when you want to switch between a DE and a pure WM without rebuilding (the latter requires services.xserver.dpi to be set to work properly on a HiDPI screen).

To Reproduce
Steps to reproduce the behavior:

  1. use a HiDPI screen (mine is 4k 14")
  2. install NixOS with plasma as the DE
  3. set services.xserver.dpi to a proper value and set the environment variable PLASMA_USE_QT_SCALING to 1 via environment.sessionVariables
  4. open any qt applications that have icons, some examples include

Expected behavior
HiDPI should work on KDE/plasma

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Notify maintainers
@petabyteboy @worldofpeace @ttuegel @NixOS/freedesktop @NixOS/qt-kde

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.12.12, NixOS, 21.11.20210704.20887e4 (Porcupine)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20210601_5985b8b
  • channels(root): ""
  • nixpkgs: /nix/store/rplqpacaa11i2wlpjbjz71g8vfynnvb3-source

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@poscat0x04 poscat0x04 added 0.kind: bug Something is broken 6.topic: qt/kde 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Jul 22, 2021
@stale
Copy link

stale bot commented May 1, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: qt/kde
Projects
None yet
Development

No branches or pull requests

1 participant