You are not logged in.

#1 2016-09-21 09:29:59

knezi
Member
Registered: 2014-04-13
Posts: 45

setting DPI does not work

Hi,

I've got two screens. Sometimes I need to set at one of the screens lower DPI, so that text is readable. If I change a resolution, I lost quality.

So far, I successfully set up DPI after start up in ~/.Xdefaults, but I need to do it while running. I've tried:

xrandr --output VGA1 --dpi 192

which however does nothing. Any solutions?

Offline

#2 2016-09-21 18:18:24

jethronsun7
Member
Registered: 2016-04-29
Posts: 44
Website

Re: setting DPI does not work

I use two screen at the same time and I guess might help you a little. But I need more specific details, at least the output of the `xrandr` and the desired output you want.

What I did is, I setup the dpi of the laptop fixed and by default, it is somewhere mentioned in Arch Wiki, look it up. I know the model and desired output of the monitor, so I have this code:

run_once("xrandr --output DP-1-1 --rotate right --mode 1920x1080 --left-of eDP-1")

in my awesome config file. Of cause you can create a alias in bash or a script running at the start of your WM, so that the monitor will be configed as you like.


Happy coding!

Offline

#3 2016-09-28 09:21:20

knezi
Member
Registered: 2014-04-13
Posts: 45

Re: setting DPI does not work

Thank you for the reply. I thought I've subscribed to the topic, but apparently not.
By the command you still set just the resolution (e.i. --mode 1920x1680 means, that means you set FullHD resolution). What I want is to preserve resolution, but make text bigger. That is decrease DPI. If I just set lower resolution, then the picture is creepy.

Offline

#4 2016-09-28 13:07:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: setting DPI does not work

Knezi, afaik DPI is linked to the physical dimensions of a display .

Increasing DPI while keeping the same resolution would require your display to grow larger.

You probably want to increase Font Size, how to do that depends on the application you use.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2016-09-28 14:24:22

knezi
Member
Registered: 2014-04-13
Posts: 45

Re: setting DPI does not work

Lone_Wolf wrote:

Knezi, afaik DPI is linked to the physical dimensions of a display.

Is it? I was able to change it in ~/.Xdefaults by:

Xft.dpi:135

Only drawback is that I have to log off and on. I am trying to do it without logging off.

Offline

#6 2016-09-28 14:29:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: setting DPI does not work

X uses EDID to calculate the correct DPI, but some monitors have incorrect EDID information,leading to wrong dpi setting.
Using Xft.dpi allows you to override the auto-calculated dpi value.

Try setting dpi to 135 x 1.66  = 224 (approx) , if your reasoning is correct that will result in things being twice as big .

Last edited by Lone_Wolf (2016-09-28 14:30:32)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2016-09-28 18:38:46

knezi
Member
Registered: 2014-04-13
Posts: 45

Re: setting DPI does not work

Thank you for answer.
That is correct, if I set 244, it works. But then both my monitors change DPI. What I want to do is to be able to change DPI of one of the monitors without restarting X.
xrandr --dpi seems to solve exactly this, but it does not work for me.

Offline

#8 2016-09-29 10:03:44

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: setting DPI does not work

Knezi,

it seems there's a misunderstanding about what DPI means .
In X environment dpi is a value giving the physical size of a pixel on a screen .
xrandr --dpi    allows changing that value.


You however are referrring to Xft.dpi , a value that has to do with font size.

I should have noticed that  a lot sooner.
Unfortunately i know very little about Xft , hopefully others who do will help out.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2016-09-29 16:44:56

knezi
Member
Registered: 2014-04-13
Posts: 45

Re: setting DPI does not work

Lone_Wolf,

oh, I understand now. I haven't had any clue that Xft.dpi and xrandr --dpi mean something different. Thanks for clearing up.

Offline

Board footer

Powered by FluxBB