Can't change the DPI in Xorg

I have openbox with Xorg and lightdm, and everything is really small on my 3072x1920 screen, so I wanted to change the DPI. I added this line to the lightdm.conf file (rest is commented):

xserver-command=X -dpi 210

But the screen stays the same. When I run grep DPI /var/log/Xorg.0.log I get this output:

[     6.721] (==) AMDGPU(0): DPI set to (96, 96)
[     8.379] (WW) NVIDIA(G0): Unable to get display device for DPI computation.
[     8.379] (==) NVIDIA(G0): DPI set to (75, 75); computed from built-in default
[     8.681] (==) modeset(G1): DPI set to (96, 96)
[     9.604] (==) modeset(G1): DPI set to (96, 96)

Am I doing something wrong or is this a bug?

Welcome,

You also can try to change the display size.

https://wiki.archlinux.org/title/xorg#Display_size_and_DPI

That kind of worked, but now the title bars and everything openbox related is very big and all the apps stayed the same.

What about xrand before launching openbox-session

xrandr --output xxxxxxx --dpi 210

Bit of a dumb issue, but I’m not exactly sure what to put in output. “Screen 0” doesn’t work, nor do any other items on the list.

Here’s the result of xrandr --current

Screen 0: minimum 320 x 200, current 3072 x 1920, maximum 16384 x 16384
eDP connected primary 3072x1920+0+0 (normal left inverted right x axis y axis) 312mm x 195mm
   3072x1920     60.00*+ 120.00  
   1920x1200     60.00  
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     60.00  
   1280x1024     60.00  
   1440x900      60.00  
   1280x800      60.00  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.00  
   640x480       60.00  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 disconnected (normal left inverted right x axis y axis)
DisplayPort-5 disconnected (normal left inverted right x axis y axis)

The one that is connected, so eDP for you.

Ok yeah that didn’t work either. I’m starting to think there might be a deeper issue here.

The link you were given has several options to try. What exactly had you modified, and how did you test it?

This is included in the above link/article:

xrandr --dpi 144

FWIW, I would change gtk font size (with lxappearance or similar utility).

The link you were given has several options to try. What exactly had you modified, and how did you test it?


Made a file with exactly that name and those contents, then rebooted. Later changed the display name, still same result.
And xrandr --dpi doesn’t work either way.

Edit: Now that I think about it, obenbox does scale properly when I do that, the DPI is set correctly now, the apps just don’t really want to comply…

Try the standard methods.