You are not logged in.

#1 2009-04-21 22:22:31

caligula9
Member
Registered: 2009-04-21
Posts: 5

howto change DPI, without xorg.conf if possible?

So, once and for all I'd like to have DPI issue solved hmm

I want to have DPI set to 96. At this size fonts and everything seems at normal size, I don't want to argue about that...

Practically,

$ xdpyinfo | grep inch
  resolution:    121x121 dots per inch

I want it to be:

$ xrandr --dpi 96
$ xdpyinfo | grep inch
  resolution:    96x96 dots per inch

I have intel 965M chipset, using the intel driver:
xf86-video-intel 2.6.3-3
xorg-server 1.6.1-1

So, when I run xrandr manually, it gets fixed to 96x96 but how to do it automatically?

I think I tried all of the common methods that are advised to this problem, like adding

Xft.dpi: 96

into ~/.Xdefaults and ~/.Xresources.

I also changed /etc/X11/xinit/xserverrc into

exec /usr/bin/X -dpi 96 -nolisten tcp

but no result.

I remember that DisplaySize option in section monitor in xorg.conf used to work but now doesn't. (Not sure however whent it stopped working and if it was also intel driver). I even put

Option     "UseEDID" "false"

into Section Screen...

I would prefer if this could be done without using xorg.conf cause now I only have Option "DontZap" "false" there. tongue

I use kdm, if that matters.. but the dpi is wrong in all DEs.

Offline

#2 2009-04-21 22:39:18

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: howto change DPI, without xorg.conf if possible?

Adding the following to your ~/.xinitrc will work

xrandr --dpi 96 &

Offline

#3 2009-04-22 00:56:54

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: howto change DPI, without xorg.conf if possible?

Any way for kdm?
I just modified /etc/X11/xdm/Xservers so it launches:
:0 local /usr/bin/X :0 -dpi 146
But this file can/will be overwritten...

Offline

#4 2009-04-22 00:59:21

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: howto change DPI, without xorg.conf if possible?

There is an option in System Settings -> Appearance -> Fonts but only between 96 and 120 DPI (I need 146...)

Offline

#5 2009-04-22 01:07:34

caskale13c
Member
From: Colleyville, TX, US
Registered: 2008-12-29
Posts: 33

Re: howto change DPI, without xorg.conf if possible?

big_gie wrote:

Any way for kdm?
I just modified /etc/X11/xdm/Xservers so it launches:
:0 local /usr/bin/X :0 -dpi 146
But this file can/will be overwritten...

Find the ServerArgsLocal value in /usr/share/config/kdm/kdmrc and add -dpi 96 (or 146) to it.  It will be located in the [X-:*-Core] section.

Last edited by caskale13c (2009-04-22 01:09:45)

Offline

#6 2009-04-22 09:56:26

caligula9
Member
Registered: 2009-04-21
Posts: 5

Re: howto change DPI, without xorg.conf if possible?

rusty99: sorry, that doesn't work for me. it seems that kdm doesn't source the file

big_gie: I set it too in System settings, but it seems like not all applications take the setting. For example opera uses still 121x121.

caskale13c: Great, this one works smile but... now I found that it causes problems with dual monitor setup..
When I boot laptop without external monitor, I get finally 96x96. Cool.
But when I then attach a monitor and run

xrandr --output LVDS --auto --output VGA --auto --same-as LVDS

it looks like the external monitor doesn't change resolution or something.. But still better that nothing.

I think I'm gonna try Slim instead of kdm now, and try the trick that rusty99 advised.

Offline

#7 2009-04-22 10:02:17

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: howto change DPI, without xorg.conf if possible?

I think the xrandr command goes into '/usr/share/config/kdm/Xsetup' for kdm usage for automatic setup.

Offline

#8 2009-04-22 10:30:06

caligula9
Member
Registered: 2009-04-21
Posts: 5

Re: howto change DPI, without xorg.conf if possible?

Okay, both of the recommended settings work.

First:

caskale13c wrote:

Find the ServerArgsLocal value in /usr/share/config/kdm/kdmrc and add -dpi 96 (or 146) to it.  It will be located in the [X-:*-Core] section.

Second:
add

xrandr --dpi 96

into /usr/share/config/kdm/Xsetup

For making it work also with an external monitor I had to add

Section "Screen"
        Identifier "Screen0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Virtual 1920 1080   
        EndSubSection
EndSection

into xorg.conf. This wasn't needed before.

Anyway, now it all works fine smile
Thank you, guys.

Offline

#9 2009-04-22 14:15:05

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: howto change DPI, without xorg.conf if possible?

Won't you need bigger Virtual values with two monitors like
'Virtual 2960 1080' ?

Offline

#10 2009-04-22 16:06:19

caligula9
Member
Registered: 2009-04-21
Posts: 5

Re: howto change DPI, without xorg.conf if possible?

Sometimes I was using extended desktop, I mean laptop and monitor right to it. At that time, yeah, I had something like 'Virtual 4000 1080', just to be sure it's enough...

But now when at home, I connect the laptop to 24'' LCD and I don't use extended but instead I set clone output to the LCD, close the laptop and use usb keyb and mouse. wink The monitor's resolution itself is 1920x1080 and it's just about enough for me so "Virtual 1920 1080" is ok.

Offline

#11 2009-04-23 21:27:14

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: howto change DPI, without xorg.conf if possible?

caskale13c wrote:
big_gie wrote:

Any way for kdm?
I just modified /etc/X11/xdm/Xservers so it launches:
:0 local /usr/bin/X :0 -dpi 146
But this file can/will be overwritten...

Find the ServerArgsLocal value in /usr/share/config/kdm/kdmrc and add -dpi 96 (or 146) to it.  It will be located in the [X-:*-Core] section.

I think the file is a pacman save, right? So its probably the best place to put it... Thanx! wink

Offline

#12 2009-04-23 22:21:40

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,853
Website

Re: howto change DPI, without xorg.conf if possible?

Taken from this thread:

graysky wrote:

I found this dpi page on the wiki and added that Options "DPI" "96x96" line to my /etc/X11/xorg.conf and now when I restarted gdm, I get:

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

The conky fonts still look the same though... hmm

Last edited by graysky (2009-04-23 22:22:13)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB