changing screen resolution and frequency with nvidia-settings from the CLI
What I actually want to do is create a startup script on Slackware, that runs this utility and changes my resolution and frequency. The man pages aren't quite detailed. I should be able to do something with the -a flag, but I don't understand the exact parameters that I have to put in.
Problem: I can't get a frequency higher than 60 with either kde's or xfce's settings pannel. With the nvidia-settings utility, I can, but it gets resetted after a reboot, or logout. (yes, I have tried disabling "apply settings at kde startup" from the control center on kde) Temporary solution: I have to run nvidia-settings every time I reboot or log out. Long-term solution: The script I'm talking about, something to automate this process. So, does anyone know the CLI option I have to put in? Can I even do this? Thanks for reading. Any info/suggestion is welcomed. If anyone has another solution, I'm open to that as well. |
Hi
The 'man nvidia-settings' explains how to load the settings : it's in the USER GUIDE Quote:
|
thanks for the reply.
It seems like what I wanted,but... Tried typing in a terminal nvidia-settings --load-config-only But it doesn't modify anything. Maybe the file is resetted each time? I have to check this. By the way, I don't seem to have .xinitrc in my home dir. I can't place it in /etc/rc.d either, as those scripts run before x starts... Where does KDE store it's list with programs running at startup? I noticed it has a folder ~/.kde/Autostart, is that it? |
Quote:
Of course before being able to use the '~/.nvidia-settings-rc' file, you have to run nvidia-settings once under user login, not root, and configure your settings there. To be sure check the presence of the '~/.nvidia-settings-rc' file after you have configured your settings. If it works when you run the nvidia-settings utility, it should work also when you reboot and/or you log in as the user who made the settings. But be sure to put the command 'nvidia-settings --load-config-only &' in a user's file which runs at login time and graphical mode. It should not be too difficult to find or to create one (see above for suggestions). I hope so for you. |
You may also want to look at xrandr
|
Thank you all for the replies.
berbae, I'll follow your advice, and put it in /etc/X11/xinit/xinitrc But first I need to get it to work. Typing nvidia-settings --load-config-only in a console seems not to do anything. Taking a look in the .nvidia-settings-rc file, I noticed there isn't any line about the resolution and refresh rate. Here's the file: Code:
# ConfigProperties: Any ideas? BTW, from the xrandr manual: "Xrandr is used to set the screen size, orientation and/or reflection." Can I use it for this too? If so, how? |
Because you said in your OP :
Quote:
Can you give precisions on how you can change the frequency higher than 60 with nvidia-settings. You spoke of a -a flag in your OP, I can't see that option in the nvidia-settings manual. Another way to cope with this question would be to edit the /etc/X11/xorg.conf file ; add in the Section "Device" the line : Option "UseEdidFreqs" "false" and put the right values in the Section "Monitor" : HorizSync 30-80 VertRefresh 56-76 these values are mine but you should write yours to comprise the values from the monitor manual. Then choose the right resolution for the mode option in the Section "Screen". |
I change the frequency rate from the nvidia-settings GUI. Here's a snapshot:
http://img267.imageshack.us/img267/9...pshot11co2.png I set it to 75 and it seems to work. The Quit button shows a tooltip saying it will save the configuration to ./nvidia-settings-rc when it exits. From KDE's menu, it appears to be at 57, and I can only get 50-60. Here's a snapshot of that too, just in case: http://img442.imageshack.us/img442/3829/snapshot13vy6.png I think I misread what the -a does, in the manual it says: Code:
-a, --assign=assign Code:
Section "Monitor" |
I think your nvidia/xorg configuration is good.
Your problem is to get the right refresh rate when you boot/log in as a user. To do that it's preferable not to use the KDE control center as it doesn't give right values for the refresh rate. The command to get the real refresh rate is : nvidia-settings --query RefreshRate For example on my machine this command gives : Attribute 'RefreshRate' (arch:0.0; display device: CRT-0): 75,02 Hz. although in KDE control center only 50hz and 53hz are shown, and I know these are wrong values. So in your case to know what is your refresh rate after a boot/log in, run in a console just after you logged in : nvidia-settings --query RefreshRate You will get the real refresh rate used by the nvidia driver. If this is not the one you want, try to change it with : nvidia-settings --assign="RefreshRate=75" then verify it with : nvidia-settings --query RefreshRate Can you tell me if this works for you. |
Message deleted because of accidental double post.
|
Hmm,thanks for the suggestions, there's a little problem here, it says the refresh rate attribute is read only.
Tried both as user and with sudo nvidia-settings --assign="RefreshRate=75" and got: Code:
ERROR: The attribute 'RefreshRate' specified in assignment As for nvidia-settings --query RefreshRate, this is what I get at KDE startup: Code:
Attribute 'RefreshRate' (host:0.0; display device: CRT-0): 43.48 Code:
Attribute 'RefreshRate' (host:0.0; display device: CRT-0): 75.03 |
Yes it was my fault to suggest to you the nvidia-settings --assign="RefreshRate=75" command, I had not realized it was a read-only attribute as the output of the '--query RefreshRate' command shows.
The nvidia driver knows the ModeLine parameters for the 75Hz refresh rate, because you can set it with the nvidia-settings GUI. A solution now is to force this ModeLine at X startup in the /etc/X11/xorg.conf file. It should be named "1280x1024_75" as this is the way valid modes are given a unique name by the nvidia driver. So in the Section "Screen" add the ModeLine you want as default like that : Quote:
|
Yup, that did it :D Thank you! |
All times are GMT -5. The time now is 03:39 PM. |