Good day,
I’m having hard time tracking who sets QT_AUTO_SCREEN_SCALE_FACTOR env var. I’m my system it’s set to 0 which make VLC UI look tiny.

I’ve tried to override it with Home-Manager:

    systemd.user.sessionVariables = {
      FOOBAR = "1";

and it made into ~/.config/environment.d/10-home-manager.conf. After apply/relogin/reboot I see that FOOBAR propagates, but QT_AUTO_SCREEN_SCALE_FACTOR is still 0.

Next thing I’ve tried is to trace it with pstee by checking environ in /proc.
In the pstree output below, all of the children of (sd-pam) already have QT_AUTO_SCREEN_SCALE_FACTOR set to 0 while (sd-pam) itself has nothing of that.

Is that some kind of tricky systemd configuration that sets this env var on spawning new process?

           │                     └─X(5236)
           │               ├─.at-spi-bus-lau(2271)
           │               ├─.baloo_file-wra(1744)
           │               ├─.baloorunner-wr(6066)
           │               ├─.dolphin-wrappe(11870)
           │               ├─.easyeffects-wr(19840)
           │               ├─.gmenudbusmenup(5755)
           │               ├─.kactivitymanag(5754)
           │               ├─.kdeconnectd-wr(5536)
           │               ├─.kded5-wrapped(5678)
           │               ├─.kio_http_cache(14318)
           │               ├─.ksmserver-wrap(5676)
           │               ├─.kwin_wayland_w(5538)───.kwin_wayland-w(5546)───Xwayland(5619)
           │               ├─.org_kde_powerd(5757)
           │               ├─.plasmashell-wr(5734)
           │               ├─.polkit-kde-aut(5756)
           │               ├─.xdg-desktop-po(1754)
           │               ├─.xdg-desktop-po(8725)
           │               ├─.xdg-document-p(1760)───fusermount3(1773)
           │               ├─.xdg-permission(1764)
           │               ├─.xembedsniproxy(5758)
           │               ├─chrome_crashpad(6196)
           │               ├─chrome_crashpad(6198)
           │               ├─dbus-daemon(1728)
           │               ├─dconf-service(2067)
           │               ├─obexd(2194)
           │               ├─pipewire(1978)
           │               ├─pipewire-pulse(2337)
           │               ├─ssh-agent(1722)
           │               └─wireplumber(1985)

home-manager should not solve your problem, you should try nixos configuration.

environment.sessionVariables = {

Well, there is a bit of progress with they system-wide approach - the auto made it to my shells but the kde processes, e.g. krunner still have it set to 0 (judging by their environ in /proc) so if I run VLC using krunner as I usually would it still pops up with tiny UI.

Is this something plasma systemd module overrides?