You are not logged in.

#1 2014-08-18 12:50:55

buntolo
Member
Registered: 2011-10-11
Posts: 202

Change Xorg dpi

https://wiki.archlinux.org/index.php/xo … ze_and_DPI

Xorg always sets dpi to 96

What could I do?

I have a 1920x1080 13.3" screen and it is unreadable. I have adjusted font size in applications, but it is messy and time-consuming (I have to set size and whatever in every application/piece of software).

Offline

#2 2014-08-18 14:52:08

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,562

Re: Change Xorg dpi

I have done it this way :

- find out the REAL physical dimensions of your screen in millimeters .
I got them from the manufacturer documentation for my screen, then verified them by measuring .

my screen turned out to be exactly 519x324 mm .

I added this line to ~/.xinitrc :

xrandr --fbmm 519x324

I did try other xrandr options like --dpi & --fb  , but both of them had no effect.
They were overriddden somewhere during X start and reset to the same values dpi / size had when not using any options.


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2014-08-18 16:16:45

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: Change Xorg dpi

How do you check if it is working?
I does not seem to have any effect.

I have tried also xrdb as well, without success.

Here is my .xinitrc:

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

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

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources &

xrandr --fbmm 294x166

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

Offline

#4 2014-08-18 17:09:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Change Xorg dpi


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-08-18 19:03:27

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: Change Xorg dpi

I have followed that for hours, it is in the first post:

buntolo wrote:

https://wiki.archlinux.org/index.php/xo … ze_and_DPI

Xorg always sets dpi to 96

What could I do?

I have a 1920x1080 13.3" screen and it is unreadable. I have adjusted font size in applications, but it is messy and time-consuming (I have to set size and whatever in every application/piece of software).

Offline

#6 2014-08-18 19:07:17

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Change Xorg dpi

Lone_Wolf wrote:

They were overriddden

See e.g. patch for XFCE, to stop it from forcing 96 DPI.

Offline

#7 2014-08-18 19:08:52

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,562

Re: Change Xorg dpi

Buntolo,

run xdpyinfo | grep resolution with and without the xrandr line in .xinitrc .

You should see different values.


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2014-08-18 19:59:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Change Xorg dpi

buntolo wrote:

I have followed that for hours, it is in the first post:

buntolo wrote:

https://wiki.archlinux.org/index.php/xo … ze_and_DPI

Xorg always sets dpi to 96

What could I do?

I have a 1920x1080 13.3" screen and it is unreadable. I have adjusted font size in applications, but it is messy and time-consuming (I have to set size and whatever in every application/piece of software).


Saying you have followed it doesn't tell us anything helpful. What specific approaches did you apply?
I use a file in /etc/X11/xorg.conf.d/ on my boxes and it works perfectly.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2014-08-19 10:26:33

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: Change Xorg dpi

Lone_Wolf wrote:

Buntolo,

run xdpyinfo | grep resolution with and without the xrandr line in .xinitrc .

You should see different values.

I see different values, but I do not see any visual difference/

With:

xdpyinfo | grep resolution 
  resolution:    166x165 dots per inch

Without:

$ xdpyinfo | grep resolution
  resolution:    96x96 dots per inch
jasonwryan wrote:

Saying you have followed it doesn't tell us anything helpful. What specific approaches did you apply?
I use a file in /etc/X11/xorg.conf.d/ on my boxes and it works perfectly.

The same approaches suggested in the wiki and in the forum (I applied them gruadually).
Firstly the 20-monitor.conf in xorg.conf.d:

Section "Monitor"
    Identifier             "Monitor0"
    DisplaySize             294 166
EndSection


Section "Monitor"
    Identifier             "Monitor0"
    DisplaySize             294 166    # 168 @ 1920x1080
    Option                 "DPI" "168 x 168"
EndSection


Section "Monitor"
    Identifier             "Monitor0"
    DisplaySize             294 166    # 168 @ 1920x1080
    Option                 "DPI" "168 x 168"
    Option                 "NoDDC"
    Option                 "DDCMode" "false"
EndSection

Secondly using .Xresources and xrandr:

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

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

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources &

xrandr --fbmm 294x166

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice
$ cat ~/.Xresources 
! Xcursor --------------------------------------------------------------------

Xcursor.theme: Vanilla-DMZ-AA
Xcursor.size:  24

! Xft settings ---------------------------------------------------------------

Xft.dpi:        168
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight

Last edited by buntolo (2014-08-19 11:33:46)

Offline

#10 2014-08-19 13:02:25

Napaim
Member
From: Scotland
Registered: 2009-03-09
Posts: 26

Re: Change Xorg dpi

Which video driver are you using? Do you know which DPI you want or are you just testing different ones?

Offline

#11 2014-08-20 01:20:43

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: Change Xorg dpi

I am using xf86-video-intel https://www.archlinux.org/packages/?nam … ideo-intel

It seems working discarding /etc/X11/xorg.conf.d/20-monitor.conf and ~/.Xresources and using only xrandr --fbmm 294x166 in ~/.xinitrc
Anyway it is not the perfect solution as I still have 2 problems:
1) DPI are still low in tty
2) If I logout from XFCE and re-enter I lose everything and I have to do a full restart.

I know the exact DPI: 166x165 or something like that. However wiki suggest round numbers near 125/150/175/200%. The nearest round DPI for my screen is 168 (150%).

Last edited by buntolo (2014-08-22 22:18:46)

Offline

Board footer

Powered by FluxBB