You are not logged in.

#1 2023-01-03 20:11:58

Katherine1
Member
Registered: 2011-05-02
Posts: 41

[Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

As mentioned in the title, I'm set up with KDE Plasma and scaling of various applications is off. It looks like something in the range of 150% - 200% scaling, which makes everything way too large. Over in a Wayland session, everything is scaled correctly, so it seems like it could be an xorg problem.

Alienware m15 r3
Nvidia RTX 2080 Super Max-Q, running with nvidia-open-dkms drivers
Linux-zen kernel

Everything is up-to-date as of a few hours ago.

I tried generating an xorg.conf with nvidia-xconfig and adding the dpi to the device to force it to 100% scaling. It didn't do anything.

Here is the xorg.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 525.60.11

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "DPI" "96 X 96"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

The only reason I don't just stick with Wayland is that there are some graphical issues with Xwayland applications that, from what I could find through research, happen to just be Nvidia driver issues, so there isn't anything I can do about that.

Last edited by Katherine1 (2023-01-03 23:55:19)

Offline

#2 2023-01-03 21:24:13

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

xrandr -q
xdpyinfo | grep -i resolu
printenv | grep -iE '(scal|dpi)'

Also remove that config file again.

Offline

#3 2023-01-03 21:54:39

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

Deleted and rebooted.

xrandr -q

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.01 + 300.18* 
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)

xdpyinfo | grep -i resolu

  resolution:    143x144 dots per inch

printenv | grep -iE '(scal|dpi)'

QT_SCREEN_SCALE_FACTORS=DP-0=1;DP-1=1;HDMI-0=1;DP-2=1;DP-3=1;DP-4=1;
QT_AUTO_SCREEN_SCALE_FACTOR=0

Offline

#4 2023-01-03 22:40:58

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

I guess "Alienware m15 r3" means that you do have a 15" monitor, so the 144DPI are correct.
Qt applications are forced to scale 1, though "2" would be more realistic (and make everything bigger)

scaling of various applications

Name some, please (to give an impression of the concerned toolkits)

If you run "xrandr --dpi 96" and then start one of the oversized applications afterwards (make sure there's no running instance), does it now behave as expected?

Offline

#5 2023-01-03 23:02:05

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

Pretty much any KDE and Qt application are affected. The KDE desktop elements, the KDE apps, Q4Wine, KeepassXC.

EDIT: That xrandr did correct new apps going forward.

Last edited by Katherine1 (2023-01-03 23:03:32)

Offline

#6 2023-01-03 23:10:36

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

/etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier    "Default nvidia Device"
    Driver        "nvidia"
    Option        "DPI"                    "96x96"
    Option        "UseEdidDpi"             "False"
EndSection

This will make X11 run at 96DPI, but the session *might* override that, https://wiki.archlinux.org/title/HiDPI#KDE_Plasma

Offline

#7 2023-01-03 23:25:43

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

That did it! I'm aware upscaling can be applied through KDE. I'd actually prefer to apply it through KDE as that applies regardless of if I'm in an Xorg session or a Wayland session.

Thanks for the help.

Offline

#8 2023-01-03 23:29:41

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [Resolved]KDE scaled up in Xorg in spite of being set to 100% scale

\o/

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB