You are not logged in.

#1 2014-09-13 11:59:34

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

nVIDIA setting wrong resolution

I have a nVIDIA GTX260 and a Hanns-g HW191D screen (1440x900@60/75Hz).
I always get 1024x768 resolution on every boot. I can change it to the right one without problem, it just sets the wrong one at boot. Always.
This problem is going on for an year, I just gave up but now I want to solve this problem to the root.

$ pacman -Q nvidia
nvidia 340.32-1

I have used nvidia-xconfig to generate a valid xorg.conf.
The I have changed resolution and frequency from "nvidia X server settings" and saved them to X configuration file, with this result:

$ cat /etc/X11/xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 340.32  (buildmeister@swio-display-x64-rhel04-01)  Tue Aug  5 21:15:22 PDT 2014

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 340.32  (buildmeister@swio-display-x64-rhel04-01)  Tue Aug  5 21:15:33 PDT 2014

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "HannStar Display Corp HW191D"
    HorizSync       30.0 - 80.0
    VertRefresh     49.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 260"
    Option         "NoLogo" "1"
EndSection

    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "HannStar Display Corp HW191D"
    HorizSync       30.0 - 80.0
    VertRefresh     49.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 260"
    Option         "NoLogo" "1"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "1440x900_75 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Still it's not working.
I can also set the right resolution by launchign:

xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0

I have tried to put that in .xinitrc, both before and after xfce4 execution, but without success:

$ 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


##################################
####### Personalizzazioni ########

xmodmap -e 'add mod3 = Scroll_Lock'
xrandr --fbmm 408x255
#xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0

##################################


##################################
######## Ambiente singolo ########

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


##################################
######### Post ambiente ##########
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0
##################################

##################################
######## Ambiente multiplo #######
# exec ck-launch-session --exit-with-session startxfce4
#DEFAULT_SESSION="exec ck-launch-session --exit-with-session startxfce4"

#case $1 in
#
#xfce4)
#	exec startxfce4
#	;;
#gnome)
#	exec gnome-session
#	;;
#e17)
#	exec enlightenment_start
#	;;
#esac

##################################


Anyway I do not like having to launch a xrandr command to get the right resolution, if this is rightly set in xorg.conf.

Offline

#2 2014-09-13 14:54:18

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: nVIDIA setting wrong resolution

Hello
Normally you don't need a xorg.conf file, and using the nvidia-xconfig tool should not be necessary.

And the output of the 'cat /etc/X11/xorg.conf' presents errors:
duplicated sections
missing heading for a useless duplicated ServerLayout section.

But all this is superfluous nowadays.
I advise you to try without the xorg.conf file.

In your .xinitrc file, the 'exec ...' line must be the last one; so your 'xrandr ...' command is misplaced.

Cheers.

Last edited by berbae (2014-09-13 15:00:01)

Offline

#3 2014-09-13 23:02:24

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

Re: nVIDIA setting wrong resolution

Renamed xorg.conf so it will not be loaded.
Nothing has changed, I still get 1024x768.
If it can help I have utterly low resolution in tty console as well, it is totally different from arch live usb. And yes, from lives (I have tried Mint and arch) I have an higher resolution in console/shell.

Regarding xrandr, I have put it after because putting it before was not sorting any effect.

Offline

#4 2014-09-14 09:11:17

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: nVIDIA setting wrong resolution

I think the Arch live installation disk uses nouveau and so kms is enabled which gives a higher resolution in the console/shell.
The nvidia driver can't use kms, so the resolution you get in the console is lower.
You could compare the output of dmesg with and without the Arch installation disk.

But that is a different matter than the resolution in graphical environment.
Also compare the /var/log/Xorg.0.log files with the Arch installation disk and with your installed system without a xorg.conf
Edit: as there is not xorg in the installation disk, you can only look at the Xorg.0.log file when booting from your installed system without a xorg.conf file, to see what happens.

As for the .xinitrc, everything after the 'exec ..' line will not be executed and so it is useless. But you'd rather try to solve the issue without using the 'xrandr ...' command.

Last edited by berbae (2014-09-14 14:22:58)

Offline

Board footer

Powered by FluxBB