Difference between revisions of "Configure Graphics Cards"

Marked this version for translation
(added translate tag)
(Marked this version for translation)
Line 1: Line 1:
<translate>
<translate>
= Overview =
= Overview = <!--T:1-->


<!--T:2-->
{{note|The mhwd command is still ''under development'', and at present is only able to install drivers for graphics cards connected internally via pci.}}
{{note|The mhwd command is still ''under development'', and at present is only able to install drivers for graphics cards connected internally via pci.}}


<!--T:3-->
Where installing the full version of Manjaro (i.e. complete with a pre-installed desktop environment, codecs, and software applications), the mhwd command will be automatically run by the GUI and CLI installer to automatically detect your graphics card and install the most appropriate driver for it. '''Whether free or proprietary drivers are installed will depend on your initial choice of using free or nonfree graphics drivers to boot up'''.  
Where installing the full version of Manjaro (i.e. complete with a pre-installed desktop environment, codecs, and software applications), the mhwd command will be automatically run by the GUI and CLI installer to automatically detect your graphics card and install the most appropriate driver for it. '''Whether free or proprietary drivers are installed will depend on your initial choice of using free or nonfree graphics drivers to boot up'''.  
Otherwise, it will be necessary to run the mhwd command manually as part of the post-installation process for the minimalistic '''NET-Edition''' of Manjaro.  
Otherwise, it will be necessary to run the mhwd command manually as part of the post-installation process for the minimalistic '''NET-Edition''' of Manjaro.  


<!--T:4-->
'''For Beginners, it is recommended to use "Hardware Detection" in [[Manjaro Settings Manager]] to change or install new graphics drivers.'''<br />
'''For Beginners, it is recommended to use "Hardware Detection" in [[Manjaro Settings Manager]] to change or install new graphics drivers.'''<br />
For intermediate and advanced users, it is also possible to use the mhwd command to install, re-install, and remove installed graphics drivers at any time, as illustrated below.
For intermediate and advanced users, it is also possible to use the mhwd command to install, re-install, and remove installed graphics drivers at any time, as illustrated below.


= Automated Identification and Installation =
= Automated Identification and Installation = <!--T:5-->


<!--T:6-->
This is the recommended method for the detection and installation of graphics drivers. The syntax for the automated installation method is:
This is the recommended method for the detection and installation of graphics drivers. The syntax for the automated installation method is:


  sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300
  <!--T:7-->
sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300




<!--T:8-->
A breakdown of the command used for the automated method is as follows:
A breakdown of the command used for the automated method is as follows:


<!--T:9-->
* '''-a''': Automatically detect and install the appropriate driver
* '''-a''': Automatically detect and install the appropriate driver
* '''[pci or usb]''': Install the appropriate driver for devices connected internally via pci, or externally via usb (again, mhwd currently only supports pci connections at this stage in its development)
* '''[pci or usb]''': Install the appropriate driver for devices connected internally via pci, or externally via usb (again, mhwd currently only supports pci connections at this stage in its development)
Line 25: Line 32:




<!--T:10-->
For example, the following command would result in the automatic detection and installation of the best available '''proprietary driver''' for a pci-connected graphics card:
For example, the following command would result in the automatic detection and installation of the best available '''proprietary driver''' for a pci-connected graphics card:


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




<!--T:12-->
Otherwise, the following command would result in the automatic detection and installation of the best available '''free driver''' for a pci-connected graphics card:
Otherwise, the following command would result in the automatic detection and installation of the best available '''free driver''' for a pci-connected graphics card:


  sudo mhwd -a pci free 0300
  <!--T:13-->
sudo mhwd -a pci free 0300




= Manual Identification and Installation =
= Manual Identification and Installation = <!--T:14-->


<!--T:15-->
Taking a do-it-yourself approach is itself relatively easy and straightforward using the mhwd command. This should be undertaken in two stages:
Taking a do-it-yourself approach is itself relatively easy and straightforward using the mhwd command. This should be undertaken in two stages:


<!--T:16-->
'''1.''' Identify the appropriate driver to be installed, and then
'''1.''' Identify the appropriate driver to be installed, and then


<!--T:17-->
'''2.''' Install the driver
'''2.''' Install the driver


<!--T:18-->
{{tip| Just ensure that you have identified and are indeed about to install the correct driver for your particular graphics card!}}
{{tip| Just ensure that you have identified and are indeed about to install the correct driver for your particular graphics card!}}




== Identifying Available Drivers ==
== Identifying Available Drivers == <!--T:19-->


<!--T:20-->
Prior to manually installing a graphics driver, it will be necessary to identify what drivers are available for your system. To list the appropriate drivers available, the basic syntax is:
Prior to manually installing a graphics driver, it will be necessary to identify what drivers are available for your system. To list the appropriate drivers available, the basic syntax is:


  mhwd -l [optional: detailed view] [optional: --pci or --usb connection]
  <!--T:21-->
mhwd -l [optional: detailed view] [optional: --pci or --usb connection]




<!--T:22-->
Using this command without the additional options will list basic information for all the available drivers for devices connected to your system. '''All drivers graphics card drivers will have the prefix (video-) in their name'''. The basic information provided for all listed drivers will be:
Using this command without the additional options will list basic information for all the available drivers for devices connected to your system. '''All drivers graphics card drivers will have the prefix (video-) in their name'''. The basic information provided for all listed drivers will be:


<!--T:23-->
* Name
* Name
* Version
* Version
Line 61: Line 80:




<!--T:24-->
A more detailed list of installed drivers can be obtained by entering:
A more detailed list of installed drivers can be obtained by entering:


  mhwd -l -d
  <!--T:25-->
mhwd -l -d




<!--T:26-->
A detailed list will provide the following information:
A detailed list will provide the following information:


<!--T:27-->
* Name
* Name
* Version
* Version
Line 80: Line 103:




<!--T:28-->
In addition, using the ''--pci'' filter in the following example will list detailed information for only the drivers available for devices (e.g. graphics cards) using an internal PCI connection:
In addition, using the ''--pci'' filter in the following example will list detailed information for only the drivers available for devices (e.g. graphics cards) using an internal PCI connection:


  mhwd -l -d --pci
  <!--T:29-->
mhwd -l -d --pci




== Installing a Driver ==
== Installing a Driver == <!--T:30-->


<!--T:31-->
To install a driver for a graphics card, the syntax is:
To install a driver for a graphics card, the syntax is:


  sudo mhwd -i pci [name of driver]
  <!--T:32-->
sudo mhwd -i pci [name of driver]




<!--T:33-->
A breakdown of the command used to manually install a driver is as follows:
A breakdown of the command used to manually install a driver is as follows:


<!--T:34-->
* '''-i''': Install a driver
* '''-i''': Install a driver
* '''[pci]''': Install a driver for a device connected internally via pci (e.g. graphics cards)
* '''[pci]''': Install a driver for a device connected internally via pci (e.g. graphics cards)
* '''[name of driver]''': The name of the driver to be installed
* '''[name of driver]''': The name of the driver to be installed


<!--T:35-->
For example, to install the proprietary nvidia graphics card driver, the following command would be used:
For example, to install the proprietary nvidia graphics card driver, the following command would be used:


  sudo mhwd -i pci video-nvidia
  <!--T:36-->
sudo mhwd -i pci video-nvidia


== Force Reinstall a Driver ==
== Force Reinstall a Driver == <!--T:37-->


<!--T:38-->
{{warning|use this command with care!}}
{{warning|use this command with care!}}




<!--T:39-->
To force the re-installation of an existing driver without removing it first, the syntax is:
To force the re-installation of an existing driver without removing it first, the syntax is:


  sudo mhwd -f -i pci [name of driver]
  <!--T:40-->
sudo mhwd -f -i pci [name of driver]




<!--T:41-->
For example, to force the re-installation of a previously installed nvidia graphics card driver, the following command would be used:
For example, to force the re-installation of a previously installed nvidia graphics card driver, the following command would be used:


  sudo mhwd -f -i pci video-nvidia
  <!--T:42-->
sudo mhwd -f -i pci video-nvidia


= Removing an Installed Driver =
= Removing an Installed Driver = <!--T:43-->


<!--T:44-->
On occasion it may be necessary to remove an installed graphics card driver. Similarly to manually installing a graphics card driver, two steps should be undertaken for removal:
On occasion it may be necessary to remove an installed graphics card driver. Similarly to manually installing a graphics card driver, two steps should be undertaken for removal:


<!--T:45-->
'''1.''' Identify the installed driver
'''1.''' Identify the installed driver


<!--T:46-->
'''2.''' Remove the identified driver
'''2.''' Remove the identified driver


<!--T:47-->
After all, it would be somewhat difficult to remove an installed driver if you don't know what it's called!
After all, it would be somewhat difficult to remove an installed driver if you don't know what it's called!




== Identifying Installed Drivers ==
== Identifying Installed Drivers == <!--T:48-->


<!--T:49-->
To identify and list Manjaro's installed drivers - including the graphics driver to be removed, the syntax is:
To identify and list Manjaro's installed drivers - including the graphics driver to be removed, the syntax is:


  mhwd  -li [optional: detailed view] [optional: pci or usb devices only]
  <!--T:50-->
mhwd  -li [optional: detailed view] [optional: pci or usb devices only]




<!--T:51-->
Using this command without the additional options will list the basic information of all the drivers currently installed on your system. '''Once again, all drivers for graphics cards will have the prefix (video-) in their name'''. As with listing drivers available for your system, the ''-d'' option used in the following command will list detailed information:
Using this command without the additional options will list the basic information of all the drivers currently installed on your system. '''Once again, all drivers for graphics cards will have the prefix (video-) in their name'''. As with listing drivers available for your system, the ''-d'' option used in the following command will list detailed information:


  mhwd -li -d
  <!--T:52-->
mhwd -li -d




<!--T:53-->
This information may prove useful to determine any otherwise unforeseen consequences or problems upon removing a driver. And again, it is also possible to filter your list of installed drivers by whether they are used on hardware connected via pci or usb. In this instance, a detailed list will be generated only for installed drivers used on hardware with a PCI connection:
This information may prove useful to determine any otherwise unforeseen consequences or problems upon removing a driver. And again, it is also possible to filter your list of installed drivers by whether they are used on hardware connected via pci or usb. In this instance, a detailed list will be generated only for installed drivers used on hardware with a PCI connection:


  mhwd -li -d --pci
  <!--T:54-->
mhwd -li -d --pci




<!--T:55-->
One other way of reporting drivers installed andin use is using the {{ic|inxi}} tool.
One other way of reporting drivers installed andin use is using the {{ic|inxi}} tool.


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




<!--T:57-->
{{note|The mhwd profile 'video-linux' corresponds to the latest opensource driver availablefor your hardware.}}
{{note|The mhwd profile 'video-linux' corresponds to the latest opensource driver availablefor your hardware.}}
{{note|The mhwd profile 'video-vesa' is a generic fallback driver which should not be used in the vast majority of cases.}}
{{note|The mhwd profile 'video-vesa' is a generic fallback driver which should not be used in the vast majority of cases.}}




== Removing Installed Drivers ==
== Removing Installed Drivers == <!--T:58-->


<!--T:59-->
{{warning|use this command with care!}}
{{warning|use this command with care!}}




<!--T:60-->
To remove an installed driver, the syntax is:
To remove an installed driver, the syntax is:


  sudo mhwd -r [pci or usb] [name of driver]
  <!--T:61-->
sudo mhwd -r [pci or usb] [name of driver]




<!--T:62-->
For example, to remove the installed driver for a nvidia graphics card (connected internally via pci), the following command would be used:
For example, to remove the installed driver for a nvidia graphics card (connected internally via pci), the following command would be used:


  sudo mhwd -r pci video-nvidia
  <!--T:63-->
sudo mhwd -r pci video-nvidia




= Checking configuration =
= Checking configuration = <!--T:64-->


<!--T:65-->
You can check configuration with:
You can check configuration with:
  mhwd-gpu --check  
  mhwd-gpu --check  
  mhwd-gpu --status  
  mhwd-gpu --status  


<!--T:66-->
And if needed fix issues with:
And if needed fix issues with:
  mhwd-gpu --setmod
  mhwd-gpu --setmod
  mhwd-gpu --setxorg [PATH]
  mhwd-gpu --setxorg [PATH]


<!--T:67-->
Make sure the path to xorg config file is valid.  
Make sure the path to xorg config file is valid.  


<!--T:68-->
Note about ati, xorg file and login artifacts or kicad: if you get artifacts upon logging in or if kicad rendering and zooming is slow, try adding [Option "EXAPixmaps" "off"] in the "Device" section of xorg config file. See [https://wiki.archlinux.org/index.php/ATI#Artifacts_upon_logging_in here.]
Note about ati, xorg file and login artifacts or kicad: if you get artifacts upon logging in or if kicad rendering and zooming is slow, try adding [Option "EXAPixmaps" "off"] in the "Device" section of xorg config file. See [https://wiki.archlinux.org/index.php/ATI#Artifacts_upon_logging_in here.]




=Dual GPU=
=Dual GPU= <!--T:69-->


==PRIME GPU offloading==
==PRIME GPU offloading== <!--T:70-->


<!--T:71-->
If your hardware includes more than one GPU card you can make use of PRIME offloading. PRIME is a technology used to manage hybrid graphics found on recent desktops and laptops (Optimus for NVIDIA, AMD Dynamic Switchable Graphics for Radeon). PRIME detects both cards and automatically selects Intel card by default; using the more powerful discrete graphics card, when called, for more demanding applications.  
If your hardware includes more than one GPU card you can make use of PRIME offloading. PRIME is a technology used to manage hybrid graphics found on recent desktops and laptops (Optimus for NVIDIA, AMD Dynamic Switchable Graphics for Radeon). PRIME detects both cards and automatically selects Intel card by default; using the more powerful discrete graphics card, when called, for more demanding applications.  


<!--T:72-->
In Manjaro this will automatically be available for hybrid graphics systems using intel/modesetting for the integrated card and free drivers (AMDGPU or Nouveau) for the dGPU.
In Manjaro this will automatically be available for hybrid graphics systems using intel/modesetting for the integrated card and free drivers (AMDGPU or Nouveau) for the dGPU.


<!--T:73-->
You may choose to run a program with a specific GPU, prepending the application's command with ''DRI_PRIME=x'', where ''x'' is the card priority number.  
You may choose to run a program with a specific GPU, prepending the application's command with ''DRI_PRIME=x'', where ''x'' is the card priority number.  


<!--T:74-->
For example, to run an application using the second card prepend the application command with '''DRI_PRIME=1'''
For example, to run an application using the second card prepend the application command with '''DRI_PRIME=1'''


   DRI_PRIME=1 glxspheres64
   <!--T:75-->
DRI_PRIME=1 glxspheres64


<!--T:76-->
To use the 1st card (usually when the CPU has an embedded GPU, this is used)
To use the 1st card (usually when the CPU has an embedded GPU, this is used)


   DRI_PRIME=0 glxspheres64
   <!--T:77-->
DRI_PRIME=0 glxspheres64


<!--T:78-->
If you want to always run some application with the discrete gpu, you may copy that application's .desktop file to {{ic|~/.local/share/applications/}} and edit the "Exec" property
If you want to always run some application with the discrete gpu, you may copy that application's .desktop file to {{ic|~/.local/share/applications/}} and edit the "Exec" property


   Exec=DRI_PRIME=1 inkscape
   <!--T:79-->
Exec=DRI_PRIME=1 inkscape


<!--T:80-->
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  


<!--T:81-->
For example, in Steam, 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.
For example, in Steam, 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 for the command line options followed by the default launch hook %command%.
Click the SET LAUNCH OPTIONS... button and specify for the command line options followed by the default launch hook %command%.


  DRI_PRIME=1 %command%
  <!--T:82-->
DRI_PRIME=1 %command%


<!--T:83-->
To use the dGPU by default see '''[https://wiki.archlinux.org/index.php/PRIME#Reverse_PRIME Reverse Prime]'''
To use the dGPU by default see '''[https://wiki.archlinux.org/index.php/PRIME#Reverse_PRIME Reverse Prime]'''




= NVIDIA Proprietary (non-free) drivers =
= NVIDIA Proprietary (non-free) drivers = <!--T:84-->


<!--T:85-->
If you have a Nvidia card, you have the option to use the proprietary (closed source = non-free) drivers instead of the open source (free) nouveau driver.  
If you have a Nvidia card, you have the option to use the proprietary (closed source = non-free) drivers instead of the open source (free) nouveau driver.  


<!--T:86-->
For Legacy/older nvidia cards, Manjaro maintains older drivers for compatibility. In these cases the driver name is different, instead of nvidia it is nvidia-390xx or nvidia340xx, whether in nvidia-only or bumblebee mhwd driver configuration.
For Legacy/older nvidia cards, Manjaro maintains older drivers for compatibility. In these cases the driver name is different, instead of nvidia it is nvidia-390xx or nvidia340xx, whether in nvidia-only or bumblebee mhwd driver configuration.


<!--T:87-->
When you install the non-free driver, mhwd includes a Nvidia utility "Nvidia Settings Utility" that can help you configure several settings. You can find this utility in your GUI Applications Menu or start it from a terminal
When you install the non-free driver, mhwd includes a Nvidia utility "Nvidia Settings Utility" that can help you configure several settings. You can find this utility in your GUI Applications Menu or start it from a terminal


   sudo nvidia-settings
   <!--T:88-->
sudo nvidia-settings


<!--T:89-->
If you are using bumblebee, the nvidia utility needs a special command
If you are using bumblebee, the nvidia utility needs a special command


   sudo optirun -b none nvidia-settings -c :8
   <!--T:90-->
sudo optirun -b none nvidia-settings -c :8




==Nvidia Optimus==
==Nvidia Optimus== <!--T:91-->
For Optimus laptops or dual GPU hardware with intel and nvidia GPUs, you have three options to utilize the card driver usage at your preference or your hardware capabilities.
For Optimus laptops or dual GPU hardware with intel and nvidia GPUs, you have three options to utilize the card driver usage at your preference or your hardware capabilities.


<!--T:92-->
'''[[#nvidia-prime|PRIME]] (mhwd default)'''
'''[[#nvidia-prime|PRIME]] (mhwd default)'''


<!--T:93-->
'''[[#Bumblebee|Bumblebee]]'''
'''[[#Bumblebee|Bumblebee]]'''


<!--T:94-->
'''[[Optimus Manager]]'''
'''[[Optimus Manager]]'''


<!--T:95-->
When you install Manjaro with the non-free option selected from Grub menu, or when you use automatic driver installation, PRIME or bumblebee is installed by default, depending on support for your GPU, PRIME being preferred. In these cases, the mhwd driver is named "video-hybrid-intel-nvidia-***xx-prime" or "video-hybrid-intel-nvidia-***xx-bumblebee".
When you install Manjaro with the non-free option selected from Grub menu, or when you use automatic driver installation, PRIME or bumblebee is installed by default, depending on support for your GPU, PRIME being preferred. In these cases, the mhwd driver is named "video-hybrid-intel-nvidia-***xx-prime" or "video-hybrid-intel-nvidia-***xx-bumblebee".




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


<!--T:97-->
{{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.}}




<!--T:98-->
'''1.'''  Start nvidia-settings utility
'''1.'''  Start nvidia-settings utility


<!--T:99-->
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.


<!--T:100-->
'''3.'''  Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''
'''3.'''  Hit the 'Save to X Configuration File' button and save to '''/etc/X11/mhwd.d/nvidia.conf'''


<!--T:101-->
'''4.'''  Now start your terminal and enter the following command to complete the process:
'''4.'''  Now start your terminal and enter the following command to complete the process:


  sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
  <!--T:102-->
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf


==Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)==
==Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)== <!--T:103-->




<!--T:104-->
'''1.'''  Start nvidia-settings utility
'''1.'''  Start nvidia-settings utility


<!--T:105-->
'''2.''' Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.
'''2.''' Change settings in X Server XVideo Settings, OpenGL and Antialiasing, in the 'X Screen' tab.


<!--T:106-->
'''3.''' Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.
'''3.''' Click on 'nvidia-settings configuration' tab and click on the 'Save Current Configuration' button.


<!--T:107-->
'''4.''' Save the .nvidia-settings-rc to the default location specified ('''/home/[your account name]''')
'''4.''' Save the .nvidia-settings-rc to the default location specified ('''/home/[your account name]''')


<!--T:108-->
'''5.''' Edit the .xinitrc file with your preferred text editor. For example, if you use gedit, run this in your terminal:
'''5.''' Edit the .xinitrc file with your preferred text editor. For example, if you use gedit, run this in your terminal:


  gedit ~/.xinitrc
  <!--T:109-->
gedit ~/.xinitrc




<!--T:110-->
'''6.''' Once opened, add the following line into the configuration file:
'''6.''' Once opened, add the following line into the configuration file:


  exec nvidia-settings --load-config-only
  <!--T:111-->
exec nvidia-settings --load-config-only




<!--T:112-->
'''7.''' Save and exit.
'''7.''' Save and exit.




==Nvidia settings for special cases ==
==Nvidia settings for special cases == <!--T:113-->


<!--T:114-->
In case your monitor is not entering powersave mode (DPMS), try adding `Option "HardDPMS" "true"` in your Xorg monitor section. For example:
In case your monitor is not entering powersave mode (DPMS), try adding `Option "HardDPMS" "true"` in your Xorg monitor section. For example:


   Section "Monitor"
   <!--T:115-->
Section "Monitor"
     # HorizSync source: edid, VertRefresh source: edid
     # HorizSync source: edid, VertRefresh source: edid
     Identifier    "Monitor0"
     Identifier    "Monitor0"
Line 297: Line 395:




<!--T:116-->
After forum [https://forum.manjaro.org/t/display-does-not-go-to-powersave/84004/5 issue]
After forum [https://forum.manjaro.org/t/display-does-not-go-to-powersave/84004/5 issue]




==nvidia-prime==
==nvidia-prime== <!--T:117-->


<!--T:118-->
Manjaro also offers an easy way to use PRIME with proprietary Nvidia drivers.<br>
Manjaro also offers an easy way to use PRIME with proprietary Nvidia drivers.<br>
Simply select and install an 'nvidia-prime' profile through MSM or mhwd (such as ''video-hybrid-intel-nvidia-440xx-prime'') and ensure the package ''nvidia-prime'' is installed.
Simply select and install an 'nvidia-prime' profile through MSM or mhwd (such as ''video-hybrid-intel-nvidia-440xx-prime'') and ensure the package ''nvidia-prime'' is installed.


<!--T:119-->
Then to use the discrete Nvidia card it works the same as [[#PRIME_GPU_offloading|PRIME offloading]] above but uses a different command. Prepend the application command with '''prime-run'''. For example:
Then to use the discrete Nvidia card it works the same as [[#PRIME_GPU_offloading|PRIME offloading]] above but uses a different command. Prepend the application command with '''prime-run'''. For example:


   prime-run glxspheres64
   <!--T:120-->
prime-run glxspheres64


<!--T:121-->
For more info see '''[https://forum.manjaro.org/t/howto-set-up-prime-with-nvidia-proprietary-driver/40225 archival post on early adoption of PRIME]'''
For more info see '''[https://forum.manjaro.org/t/howto-set-up-prime-with-nvidia-proprietary-driver/40225 archival post on early adoption of PRIME]'''




==Bumblebee==
==Bumblebee== <!--T:122-->


<!--T:123-->
Bumblebee configuration is mainly developed to help minimize laptop battery consumption, since Nvidia usually consumes significant power, while Intel cards are more power efficient. So, bumblebee detects both cards and automatically selects Intel card by default and can use the Nvidia for more demanding applications.  
Bumblebee configuration is mainly developed to help minimize laptop battery consumption, since Nvidia usually consumes significant power, while Intel cards are more power efficient. So, bumblebee detects both cards and automatically selects Intel card by default and can use the Nvidia for more demanding applications.  
For an application to use the Nvidia card, prepend the application command with optirun ir primusrun. For example:
For an application to use the Nvidia card, prepend the application command with optirun ir primusrun. For example:


   optirun glxspheres64
   <!--T:124-->
optirun glxspheres64
   primusrun inkscape
   primusrun inkscape


<!--T:125-->
If you want to specifically run some application with the nvidia driver, you may edit that application's .desktop file "Exec" property, or run it in terminal like this
If you want to specifically run some application with the nvidia driver, you may edit that application's .desktop file "Exec" property, or run it in terminal like this


   Exec=primusrun chromium
   <!--T:126-->
Exec=primusrun chromium


<!--T:127-->
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  


<!--T:128-->
For example, in Steam, 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.
For example, in Steam, 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 for the command line options followed by the default launch hook %command%.
Click the SET LAUNCH OPTIONS... button and specify for the command line options followed by the default launch hook %command%.
Line 331: Line 440:
  primusrun %command%
  primusrun %command%


<!--T:129-->
If you have problems with a bumblebee setup, refer to this [https://forum.manjaro.org/t/bumblebee-troubleshooting-20181229/40584 Forum Tutorial] for advice.
If you have problems with a bumblebee setup, refer to this [https://forum.manjaro.org/t/bumblebee-troubleshooting-20181229/40584 Forum Tutorial] for advice.






= See also =
= See also = <!--T:130-->


<!--T:131-->
* [[Manjaro Hardware Detection Overview]]
* [[Manjaro Hardware Detection Overview]]




= Easier way =
= Easier way = <!--T:132-->


<!--T:133-->
You may use a GUI version of mhwd in [[Manjaro Settings Manager#Hardware Detection]]
You may use a GUI version of mhwd in [[Manjaro Settings Manager#Hardware Detection]]
: With this tool you can:
: With this tool you can:
Line 347: Line 459:
: - switch graphic driver
: - switch graphic driver


<!--T:134-->
https://www.youtube.com/watch?v=UAFGukpEIJw
https://www.youtube.com/watch?v=UAFGukpEIJw




= How to check the driver =
= How to check the driver = <!--T:135-->


  glxinfo | grep OpenGL
  <!--T:136-->
glxinfo | grep OpenGL




<!--T:137-->
Example output command:
Example output command:




<!--T:138-->
'''Nvidia driver''' ( proprietary driver )
'''Nvidia driver''' ( proprietary driver )


  $ glxinfo | grep OpenGL
  <!--T:139-->
$ glxinfo | grep OpenGL
  OpenGL vendor string: NVIDIA Corporation
  OpenGL vendor string: NVIDIA Corporation
  OpenGL renderer string: GeForce GTX 660/PCIe/SSE2
  OpenGL renderer string: GeForce GTX 660/PCIe/SSE2
Line 375: Line 492:




<!--T:140-->
'''Nouveau''' , '''Gallium''' from '''Mesa''' ( open source driver )
'''Nouveau''' , '''Gallium''' from '''Mesa''' ( open source driver )


  $ glxinfo | grep OpenGL
  <!--T:141-->
$ glxinfo | grep OpenGL
  OpenGL vendor string: nouveau
  OpenGL vendor string: nouveau
  OpenGL renderer string: Gallium 0.4 on NVE6
  OpenGL renderer string: Gallium 0.4 on NVE6
Line 390: Line 509:




<!--T:142-->
'''Intel''' driver from '''Mesa''' ( open driver )
'''Intel''' driver from '''Mesa''' ( open driver )


  $ glxinfo | grep OpenGL
  <!--T:143-->
$ glxinfo | grep OpenGL
  OpenGL vendor string: Intel Open Source Technology Center
  OpenGL vendor string: Intel Open Source Technology Center
  OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop  
  OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop