LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   DisplaySize on Xorg.conf with nv/nvidia doesn't change my DPI (https://www.linuxquestions.org/questions/slackware-14/displaysize-on-xorg-conf-with-nv-nvidia-doesnt-change-my-dpi-653413/)

jsmith6 07-03-2008 03:22 PM

DisplaySize on Xorg.conf with nv/nvidia doesn't change my DPI
 
I used to set this on xorg.conf:

Code:

DisplaySize 270 200
Which gave me around 92 DPI in my 17 inch display. But on my new hardware, it just doesn't work. Not in "nv" nor in "nvidia" drivers.

The new hardware is:
CPU: Intel 8200
MOBO: Gigabyte EP35-DS4
RAM: 4GB
SOUND: onboard
VGA: Nvidia 8800GT

I tried setting UseEdidDpi which I found on the Gentoo Wiki but nothing changed.

When I type:

Code:

xdpyinfo | grep dimensions
xdpyinfo | grep resolution
xrdb -query | grep dpi

I get this:

Code:

  dimensions:    1024x768 pixels (333x241 millimeters)
  resolution:    78x81 dots per inch
Xft.dpi:        91

The last line, "Xft.dpi: 91" comes from my ~/.Xresources which, in an effort to enforce 91 DPI, has this line: "Xft.dpi: 91". Removing that line and adding it back doesn't change anything.

So, how can I set/change my DPI?

maddox1976 07-03-2008 08:14 PM

Quote:

Originally Posted by jsmith6 (Post 3203267)
I used to set this on xorg.conf:

Code:

DisplaySize 270 200
Which gave me around 92 DPI in my 17 inch display. But on my new hardware, it just doesn't work. Not in "nv" nor in "nvidia" drivers.

The new hardware is:
CPU: Intel 8200
MOBO: Gigabyte EP35-DS4
RAM: 4GB
SOUND: onboard
VGA: Nvidia 8800GT

I tried setting UseEdidDpi which I found on the Gentoo Wiki but nothing changed.

When I type:

Code:

xdpyinfo | grep dimensions
xdpyinfo | grep resolution
xrdb -query | grep dpi

I get this:

Code:

  dimensions:    1024x768 pixels (333x241 millimeters)
  resolution:    78x81 dots per inch
Xft.dpi:        91

The last line, "Xft.dpi: 91" comes from my ~/.Xresources which, in an effort to enforce 91 DPI, has this line: "Xft.dpi: 91". Removing that line and adding it back doesn't change anything.

So, how can I set/change my DPI?


I use this in xorg.conf and works for me:

Section "Device"

VideoRam 128
# Insert Clocks lines here if appropriate
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce FX 5700 Ultra"
Option "NvAGP" "1"
Option "RenderAccel" "true"
Option "ConnectedMonitor" "CRT"
Option "IgnoreDisplayDevices" "DFP, TV"
Option "UseEDID" "FALSE"
Option "DPI" "96 x 96"

Woodsman 07-03-2008 11:16 PM

I have a 17 inch LCD monitor with a native resolution of 1280 x 1024.

Usually I boot into runlevel 3. In my /usr/bin/startx I have the following:

serverargs="-dpi 120 -ac -nolisten tcp"

Occasionally I boot into runlevel 4 and I use the KDM display manager to manage logins. In my /etc/kde/kdm/kdmrc I have the following:

[X-:*-Core]
ServerArgsLocal=-dpi 120 -ac -nolisten tcp

I always boot into X at 120 dpi.

As a test, to xorg.conf I added a DisplaySize option for 96 x 96 dpi (DisplaySize 338 271). The DisplaySize option was ignored because the startx option took precedence.

You can manually test at the command line by running:

startx -- -dpi 92

jsmith6 07-04-2008 06:58 AM

One of these options made my CRT shut off when starting X:

Code:

VideoRam 128
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "RenderAccel" "true"
Option "ConnectedMonitor" "CRT"
Option "IgnoreDisplayDevices" "DFP, TV"
Option "UseEDID" "FALSE"
Option "DPI" "96 x 96"

Not a problem though, I just used only "DPI" "96 x 96" and now I have 96 DPI inside X. That's very nice, the fonts look smooth again :-) The only problem with this solution is that this works only with the "nvidia" driver, it doesn't work with "nv".

Then I tried this at the command line:

Code:

startx -- -dpi 92
And it works even with "nv". I didn't want to edit /usr/bin/startx (although I can keep a backup and so on) so I just created a new alias on /etc/profile.d/coreutils-dircolors.sh with:

Code:

alias startx='startx -- -dpi 96'
Thank you!

Franklin 07-04-2008 07:42 AM

It's been a while since I used nvidia, but I believe the line

Option "UseEDID" "FALSE"

is the option that is required to get DisplaySize to act as expected with the nvidia proprietary driver.

HTH

Woodsman 07-04-2008 03:10 PM

Quote:

alias startx='startx -- -dpi 96'
Good thinking with the alias!

Question:

1. Start X from runlevel 3 using your alias.
2. Toggle to another console session (Ctrl-Alt-F2).
3. Start X from there using your alias.

Does X start in the second console session?


All times are GMT -5. The time now is 08:46 PM.