Manjaro Difference between revisions of "Configure NVIDIA (non-free) settings and load them on Startup"

Difference between revisions of "Configure NVIDIA (non-free) settings and load them on Startup"

From Manjaro
imported>Verityproductions
(Marked this version for translation)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Introduction=
<languages/>
__TOC__
<translate>
= Introduction= <!--T:1-->


{note| This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.}}
<!--T:2-->
{{note| This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.}}




<!--T:3-->
You can check what drivers you have installed by entering the following command into your terminal:
You can check what drivers you have installed by entering the following command into your terminal:


  inxi -G
  <!--T:4-->
inxi -G


= Install NVIDIA Drivers = <!--T:5-->


= Install NVIDIA Drivers =
<!--T:6-->
 
If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the [[Configure_Graphics_Cards| Manjaro Hardware Detection (MHWD)]] utility. To do so, enter the following command into your terminal:
If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the [[Configure_Graphics_Cards| Manjaro Hardware Detection (MHWD)]] utility. To do so, enter the following command into your terminal:


  sudo mhwd -a pci nonfree 0300
  <!--T:7-->
sudo mhwd -a pci nonfree 0300




<!--T:8-->
Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:
Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:


  mhwd -li
  <!--T:9-->
mhwd -li






=Configure The Resolution/Refresh Rate=
=Configure The Resolution/Refresh Rate= <!--T:10-->


<!--T:11-->
{{warning|The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.}}
{{warning|The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.}}




1.  Open your terminal and enter the following command:
<!--T:12-->
'''1.''' Open your terminal and enter the following command:
 
<!--T:13-->
sudo nvidia-settings
 
 
<!--T:14-->
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.
 
<!--T:15-->
'''3.'''  Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''
 
<!--T:16-->
'''4.'''  Now enter the following command into the terminal to complete the process:
 
<!--T:17-->
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
 
=Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)= <!--T:18-->
 
 
<!--T:19-->
'''1.'''  Open your terminal and enter the following command:
 
<!--T:20-->
nvidia-settings
 
 
<!--T:21-->
'''2.''' Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.
 
<!--T:22-->
'''3.''' Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.
 
<!--T:23-->
'''4.''' Save the .nvidia-settings-rc to the default location specified ('''/home/[your account name]''')
 
<!--T:24-->
'''5.''' Edit the .xinitrc file with your preferred text editor. For example, run this in your terminal:
 
<!--T:25-->
gedit ~/.xinitrc
 
 
<!--T:26-->
'''6.''' Once opened, add the following line into the configuration file, before the last line that starts with 'exec' :
 
<!--T:27-->
nvidia-settings --load-config-only
exec $(get_session)
 
<!--T:28-->
'''7.''' Save and exit.
 
= Troubleshooting: X-Server Failed to Start and Install = <!--T:29-->
 
<!--T:30-->
Where there has been an error during the installation process, upon rebooting you may see the following error message: '''modprobe: ERROR: could not insert nvidia : No such a device'''
 
 
<!--T:31-->
If this happens:
 
<!--T:32-->
'''1.''' Remove the NVIDIA driver by entering the following command into your terminal:
 
<!--T:33-->
sudo mhwd -r pci video-nvidia   
 
 
<!--T:34-->
'''2.''' Reboot your computer
 
 
<!--T:35-->
'''3.''' Enter the following into your terminal:
 
<!--T:36-->
sudo gedit /etc/mkinitcpio.conf
 
 
<!--T:37-->
'''4.''' delete the word '''nouveau''' from the following line:
 
<!--T:38-->
MODULES=" nouveau"
 
 
<!--T:39-->
It should now look like this (i.e. keep the speech marks ("")):


  sudo nvidia-settings'
  <!--T:40-->
MODULES=""




2. Change resolution and refresh rate in 'X Server Display Configuration' tab.
<!--T:41-->
'''5.''' Save and close the file.


3.  Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''


4. Now enter the following command into the terminal to complete the process:
<!--T:42-->
'''6.''' It is now necessary to reconfigure your existing kernel to take into account this change. The syntax of the necessary command to enter into your terminal is:


  sudo mhwd-gpu --setgl nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
  <!--T:43-->
sudo mkinitcpio -p [linux kernel version]




<!--T:44-->
For example, if you are currently using Kernel 3.10, you would enter the following:


==To configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo):==
<!--T:45-->
sudo mkinitcpio -p linux310




1. Open terminal and run 'nvidia-settings'
<!--T:46-->
For kernel 3.11, you would enter the following:


2. Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.
<!--T:47-->
sudo mkinitcpio -p linux311


3. Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.


4. Save the .nvidia-settings-rc to the default location specified ( /home/user_name )
<!--T:48-->
And so on.


5. Open terminal and type 'sudo gedit ~/.xinitrc' (or 'sudo gedit /home/user_name/.xinitrc') -> replace gedit with text editor of choice.
<!--T:49-->
'''7.''' Now re-install the NVIDIA driver by entering the following command into your terminal:


6. Once opened, add 'exec nvidia-settings --load-config-only' on a new line (do not add the ' ' ).
<!--T:50-->
sudo mhwd -a pci nonfree 0300


7. Save and exit.


==Summary:==
<!--T:51-->
'''8.''' Reboot your system. Now it should work ;)


There you go. This should (hopefully) solve those having issues with the NVIDIA non-free drivers for loading specific resolutions/refresh rates and X Screen settings on startup.
=Bumblebee and Steam= <!--T:52-->


= Troubleshooting =
<!--T:53-->
{{warning|These instructions are outdated. Until they are reviewed for validity, please do not follow them blindly. Especially consider that there are also legacy nvidia drivers for older cards, like nvidia390xx and nvidia340xx. If you are not sure, please look for a tutorial or ask for assistance at the [https://forum.manjaro.org forum].}}


X Server failed to start after install and reboot


If you restart your computer after the nvidia driver installation, and shows you that the X Server failed to start and the log shows you " modprobe: ERROR: could not insert nvidia : No such a device
then deinstall the nvidia driver with "sudo mhwd -r pci video-nvidia"    then reboot your computer
back to your desktop open a terminal write in "sudo gedit /etc/mkinitcpio.conf delete the nouveau out of MODULES, MODULES=" nouveau" -> MODULES=""
after that write in the terminal for kernel 3.10 "sudo mkinitcpio -p linux310"  for Kernel 3.11 "sudo mkinitcpio -p linux311"
then install the nvidia driver "sudo mhwd -a pci nonfree 0300"  reboot and it should work ;)


==Feedback:==
<!--T:54-->
Properly using and configuring Bumblebee with Steam is much easier than it seems at first.


<!--T:55-->
'''1.''' Install bumblebee for nonfree nvidia. Please run in terminal command in proper order:
<!--T:56-->
sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
<!--T:57-->
sudo mhwd -f -i pci video-hybrid-intel-nvidia-bumblebee
<!--T:58-->
sudo systemctl enable bumblebeed
<!--T:59-->
'''2.''' Reboot system:
<!--T:60-->
sudo reboot
<!--T:61-->
'''3.''' Next run:
<!--T:62-->
optirun -b none nvidia-settings -c :8
<!--T:63-->
'''4.''' Verify it is working
<!--T:64-->
primusrun glxspheres64
and
glxspheres64
<!--T:65-->
so you can see the difference.
<!--T:66-->
'''5a.''' To have all games with Steam run using the NVidia card.
Run Steam with command:
<!--T:67-->
primusrun steam
<!--T:68-->
'''5b.''' Alternatively, you can run specific games by:
<!--T:69-->
Select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties.
Click the SET LAUNCH OPTIONS... button and specify primusrun %command% for the command line.
Save your changes.This method allows you to pick when the discrete NVidia GPU should be used on a per-game basis.
=Feedback and Support= <!--T:70-->
<!--T:71-->
If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [http://forum.manjaro.org/index.php?topic=4489.0]
If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [http://forum.manjaro.org/index.php?topic=4489.0]
</translate>


 
[[Category:Contents Page{{#translation:}}]]
[[Category:Contents Page]]
[[Category:Nvidia{{#translation:}}]]

Latest revision as of 16:27, 7 September 2021

Other languages:
English • ‎русский

Introduction

Note
This tutorial is meant for users who are using the NVIDIA Proprietary (non-free) drivers.


You can check what drivers you have installed by entering the following command into your terminal:

inxi -G

Install NVIDIA Drivers

If you have the Nouveau driver you can install the proprietary NVIDIA driver by using the Manjaro Hardware Detection (MHWD) utility. To do so, enter the following command into your terminal:

sudo mhwd -a pci nonfree 0300


Once Complete, reboot your system to complete the process. You can then confirm that the driver has been installed and is working by entering the following command into your terminal:

mhwd -li


Configure The Resolution/Refresh Rate

Warning
The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.


1. Open your terminal and enter the following command:

sudo nvidia-settings


2. Change resolution and refresh rate in 'X Server Display Configuration' tab.

3. Hit the 'Save to X Configuration File' button and save to /etc/X11/mhwd.d/nvidia.conf

4. Now enter the following command into the terminal to complete the process:

sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)

1. Open your terminal and enter the following command:

nvidia-settings


2. Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.

3. Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.

4. Save the .nvidia-settings-rc to the default location specified (/home/[your account name])

5. Edit the .xinitrc file with your preferred text editor. For example, run this in your terminal:

gedit ~/.xinitrc


6. Once opened, add the following line into the configuration file, before the last line that starts with 'exec' :

nvidia-settings --load-config-only
exec $(get_session)

7. Save and exit.

Troubleshooting: X-Server Failed to Start and Install

Where there has been an error during the installation process, upon rebooting you may see the following error message: modprobe: ERROR: could not insert nvidia : No such a device


If this happens:

1. Remove the NVIDIA driver by entering the following command into your terminal:

sudo mhwd -r pci video-nvidia    


2. Reboot your computer


3. Enter the following into your terminal:

sudo gedit /etc/mkinitcpio.conf 


4. delete the word nouveau from the following line:

MODULES=" nouveau" 


It should now look like this (i.e. keep the speech marks ("")):

MODULES="" 


5. Save and close the file.


6. It is now necessary to reconfigure your existing kernel to take into account this change. The syntax of the necessary command to enter into your terminal is:

sudo mkinitcpio -p [linux kernel version]


For example, if you are currently using Kernel 3.10, you would enter the following:

sudo mkinitcpio -p linux310


For kernel 3.11, you would enter the following:

sudo mkinitcpio -p linux311


And so on.

7. Now re-install the NVIDIA driver by entering the following command into your terminal:

sudo mhwd -a pci nonfree 0300


8. Reboot your system. Now it should work ;)

Bumblebee and Steam

Warning
These instructions are outdated. Until they are reviewed for validity, please do not follow them blindly. Especially consider that there are also legacy nvidia drivers for older cards, like nvidia390xx and nvidia340xx. If you are not sure, please look for a tutorial or ask for assistance at the forum.


Properly using and configuring Bumblebee with Steam is much easier than it seems at first.

1. Install bumblebee for nonfree nvidia. Please run in terminal command in proper order:

sudo pacman -S virtualgl lib32-virtualgl lib32-primus primus
sudo mhwd -f -i pci video-hybrid-intel-nvidia-bumblebee
sudo systemctl enable bumblebeed

2. Reboot system:

sudo reboot

3. Next run:

optirun -b none nvidia-settings -c :8

4. Verify it is working

primusrun glxspheres64

and

glxspheres64

so you can see the difference.

5a. To have all games with Steam run using the NVidia card. Run Steam with command:

primusrun steam

5b. Alternatively, you can run specific games by:

Select a game - that you want to run using your discrete Nvidia card - from the Library page of the Steam client, right-click, and select Properties. Click the SET LAUNCH OPTIONS... button and specify primusrun %command% for the command line. Save your changes.This method allows you to pick when the discrete NVidia GPU should be used on a per-game basis.

Feedback and Support

If you have any problems, improvements or see any errors in this tutorial, please post in this Manjaro forum thread: [1]

Cookies help us deliver our services. By using our services, you agree to our use of cookies.