You are not logged in.

#1 2022-11-09 19:21:44

prayner96
Member
Registered: 2022-03-06
Posts: 72

DPI too low

Laptop: Lenovo ideapad Slim 7i Pro
Dual booting w/ W11.
Screen resolution: 2880x1800
Screen size: 14".
WM: Qtile
No KDE installed.

All fonts on my laptop using Arch Linux are too small to read at a normal distance from my laptop and my vision is good. When I start up the laptop in qtile, font is too small, I open firefox, anki, etc. - font too small. When I use the CLI, it's a good font size because I've set it using Terminator, though previously this was also too small.

Upon booting up:

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    2880x1800 pixels 
  resolution:    96x96 dots per inch

So I looked at Xorg documentation on Arch Linux wiki and changed the dpi.
According to some site on google, dpi for my laptop should be 242.
Tried changing dpi to 242 using 'xrandr --dpi 242', but nothing changed after opening up different apps (firefox, anki, keycombiner).

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    2880x1800 pixels (243x152 millimeters)
  resolution:    301x301 dots per inch

xrandr output:

$ xrandr
Screen 0: minimum 8 x 8, current 2880 x 1800, maximum 32767 x 32767
eDP1 connected primary 2880x1800+0+0 (normal left inverted right x axis y axis) 300mm x 190mm
   2880x1800     90.01*+
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.96    59.95  
   2048x1536     85.00    75.00    60.00  
   1920x1440     85.00    75.00    60.00  
   1856x1392     75.00    60.01  
   1792x1344     75.00    60.01  
   2048x1152     59.90    59.91  
   1920x1200     90.00    59.88    59.95  
   1920x1080     59.96    59.93  
   1600x1200     85.00    75.00    70.00    65.00    60.00  
   1680x1050     90.00    59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      90.00  
   1400x900      90.00    59.96    59.88  
   1280x960      85.00    60.00  
   1368x768      59.88    59.85  
   1280x800      90.00    59.81    59.91  
   1152x864      75.00  
   1280x720      59.86    59.74  
   1024x768      85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   1024x576      59.90    59.82  
   832x624       74.55  
   960x540       59.63    59.82  
   800x600       85.14    72.19    75.00    60.32    56.25  
   864x486       59.92    59.57  
   640x480       85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   640x400       85.08  
   640x360       59.84    59.32  
   640x350       85.08  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
DP4 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

I also tried to change the dpi in ~/.xinitrc, but that didn't do anything either.

Possible avenues:
1. I know you can edit dpi in ~/.Xresources, but I couldn't find this folder using grep -r.
2. Arch wiki mentions GPK, but I don't think this is relevant to me. "$ xrdb -query | grep dpi" has no output.

Last edited by prayner96 (2022-12-09 12:26:48)

Offline

#2 2022-11-09 20:41:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,427

Re: DPI too low

using 'xrandr --dpi 242', but nothing changed after opening up different apps

This will only affect processes started afterwards (not "new windows", see "ps aux")

I also tried to change the dpi in ~/.xinitrc, but that didn't do anything either.

Do you use startx/xinit/xdm? Because otherwise your xinitrc won't do anything.
If you do, please post your xinitrc

I know you can edit dpi in ~/.Xresources, but I couldn't find this folder using grep -r.

This makes no sense, there're no "folders" involved in this

xrdb -q | grep -i dpi

is the proper query
You can set eg. "Xft.dpi: 243", https://wiki.archlinux.org/title/X_resources

Arch wiki mentions GPK, but I don't think this is relevant to me.

No it doesn't? Where and what's a "GPK" and how is that relevant to the DPI situation?

Offline

#3 2022-11-12 21:09:42

prayner96
Member
Registered: 2022-03-06
Posts: 72

Re: DPI too low

I also tried to change the dpi in ~/.xinitrc, but that didn't do anything either. Do you use startx/xinit/xdm? Because otherwise your xinitrc won't do anything.
If you do, please post your xinitrc

I do not use xdm to my knowledge. Checked using `grep -r "xdm"` and `sudo pacman -Q xorg-xdm`.

I know you can edit dpi in ~/.Xresources, but I couldn't find this folder using grep -r.
This makes no sense, there're no "folders" involved in this

xrdb -q | grep -i dpi

is the proper query
You can set eg. "Xft.dpi: 243", https://wiki.archlinux.org/title/X_resources

Okay, I set dpi to 144 in .Xresources and it affected terminal and my applications (e.g., firefox, anki), but shows no change to arch linux on startup (BIOS menu), LightDM interface, or the QTile bar font size. DPI does not change either. Note that I did not set dpi change in ~/.xinitrc.

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    2880x1800 pixels (762x476 millimeters)
  resolution:    96x96 dots per inch

Last edited by prayner96 (2022-12-06 17:04:20)

Offline

#4 2022-11-12 22:52:44

lfitzgerald
Member
Registered: 2021-07-16
Posts: 175

Re: DPI too low

Xft.dpi in .Xresources has mostly served this need for me. Technically some programs like Chrome use their own parallel config. https://wiki.archlinux.org/title/HiDPI has a lot more details. I just try to avoid GTK cancer now, and the few programs that I'm forced to use I just configure through the program's own settings.

The DPI in xdpyinfo doesn't do anything. There are ways to change it (I think xrandr --dpi) but it seems like an "informational" field, not actually used for rendering. There is xrandr --scale, but I find that it looks very ugly on X. People say in wayland it's better.

For the boot screens etc., of course X settings won't change that lol. X doesn't run until the very end of your boot settings. You probably have the same issue in your ttys (ctrl+alt+f2-7). You need to change the Linux console font: https://wiki.archlinux.org/title/HiDPI# … sole_(tty) Your boot loader might also have some customization for the boot menu.

Offline

#5 2022-11-13 09:18:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,427

Re: DPI too low

Please try to correctly structure quotes.

I do not use xdm to my knowledge. Checked using `grep -r "xdm"` and `sudo pacman -Q xorg-xdm`.

This isn't at all how you'd figure that, but w/

LightDM interface

it's clear that you don't.
Incidentally see https://wiki.archlinux.org/title/LightD … ng_monitor - just use "xrandr --dpi 243" there.

@lfitzgerald "xrandr --scale" is only a required option when you need to align various DPIs across different outputs - and it doesn't do anything on wayland.
If you operate on integer mulitples, try eg. "--scale 2x2 --filter nearest"

Offline

Board footer

Powered by FluxBB