Bug 353040

Summary: After upgrading to frameworks 5.14, KDE ignores xrandr DPI setting
Product: [I don't know] kde Reporter: Jin Liu <m.liu.jin>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jin Liu 2015-09-22 13:49:20 UTC
I run "xrandr --dpi 168" in .xinitrc, before /usr/bin/startkde. In frameworks <=5.13, this always works. But since I upgraded to 5.14, all KDE applications and Plasma shell no longer respect this setting, and all UI elements are much smaller than before.

If I run "xrandr --dpi 168" again after KDE startup, then any newly launched KDE application would restore to the old behavior -- correctly sized UI. (The only exception is the "Screen Scaling" dialog in systemsettings, where the UI example is still small.) But UI in already running applications like Plasma and kwin decorations would remain small.

Reproducible: Always

Steps to Reproduce:
1. Use a Hi-DPI screen.
2. Run "xrandr --dpi 168" in .xinitrc, before /usr/bin/startkde.
3. Reboot and start KDE.
4. All UI is too small.
5. Run "xrandr --dpi 168" in konsole.
6. Launch Dolphin.
7. UI in Dolphin is larger, where other applications remain small.


Expected Results:  
UI size should be normal when KDE starts.

My .xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

export DESKTOP_SESSION="plasma"

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
xrandr --dpi 168
xset -b
eval `ssh-agent` 
xbindkeys

exec /usr/bin/startkde
Comment 1 Jin Liu 2015-09-22 14:30:51 UTC
The problem is not caused by frameworks upgrades, but by systemd upgrading to 226. And it affects all applications, not limited to KDE. Sorry, should report to systemd developers.