Manjaro Difference between revisions of "Configure Graphics Cards/zh-cn"

Difference between revisions of "Configure Graphics Cards/zh-cn"

From Manjaro
(Created page with "=简介=")
Tags: Mobile web edit Mobile edit
 
(Updating to match new version of source page)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
=简介=
=简介=


{{note|The mhwd command is still ''under development'', and at present is only able to install drivers for graphics cards connected internally via pci.}}
{{注意|命令工具mhwd仍处于开发状态,目前仅可用于安装通过pci方式连接的显卡驱动。}}


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'''.
在安装Manjaro完整版的时候(比如包含一个预安装的桌面环境、编解码器和软件应用),系统的GUI和CLI安装程序会自动调用mhwd来检测你的显卡并安装最合适的驱动。'''至于是安装开源版本的驱动还是非开源版本,取决于你在安装程序启动时选择的是开源显卡还是非开源悬卡启动'''
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.
否则,如果安装的是极简'''NET-Edition'''版的Manjaro,就有必要在安装后手动运行mhwd命令。


'''For Beginners, it is recommended to use "Hardware Detection" in [[Manjaro Settings Manager]] to change or install new graphics drivers.'''<br />
'''对于新手,推荐使用[[Manjaro 设置管理器]]中的  "硬件检测" 来更换或安装新的显卡驱动。'''<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.
对于中等或高级用户,任何时候都可以使用mhwd命令来安装、重装或删除已安装的显卡驱动,如下文所述。


= Automated Identification and Installation =
= 自动识别与安装 =


This is the recommended method for the detection and installation of graphics drivers. The syntax for the automated installation method is:
这是推荐的方式来进行显卡驱动的检测与安装。自动安装命令的语法如下:


  {{UserCmd|command=sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300}}
</div>


A breakdown of the command used for the automated method is as follows:
上述命令中,各参数含义为:


* '''-a''': Automatically detect and install the appropriate driver
* '''-a''': 自动检测并安装合适的驱动
* '''[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 usb]''': 安装通过pci或usb方式连接的显卡驱动,通常pci连接的显卡在设备内部,而usb连接的属于外接显卡(再次提醒, mhwd目前仅支持pci连接的显卡)
* '''[free or nonfree]''': Install either free drivers (e.g. provided by the Linux community), or nonfree drivers (e.g. provided by hardware manufacturers)  
* '''[free nonfree]''': 安装开源驱动 (比如由Linux社区提供的版本), or 闭源驱动 (比如由硬件制造商提供的版本)  
* '''0300''': Identify that a driver is to be installed for a graphics card (0300 is the ID for graphics cards. As the mhwd command develops, new ids will be used for other hardware devices).
* '''0300''': 表示要安装的是显卡的驱动 (0300 是显卡的ID. 随着mhwd命令工具的发展,其他新的ID将会用于表示其他硬件设备).




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:
例如,下面的命令将会为通过pci方式连接的显卡自动检测并安装最合适的'''闭源驱动'''


  {{UserCmd|command=sudo mhwd -a pci nonfree 0300}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -a pci nonfree 0300}}
</div>




Otherwise, the following command would result in the automatic detection and installation of the best available '''free driver''' for a pci-connected graphics card:
或者,下面的命令将会为通过pci方式连接的显卡自动检测而并安装最合适的'''开源驱动'''


  {{UserCmd|command=sudo mhwd -a pci free 0300}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -a pci free 0300}}
</div>


= Manual Identification and Installation =
= 手动识别并安装 =


Taking a do-it-yourself approach is itself relatively easy and straightforward using the mhwd command. This should be undertaken in two stages:
手动安装需要相对简单、直接地操作mhwd命令。分为两个阶段:


'''1.''' Identify the appropriate driver to be installed, and then
'''1.''' 找到合适的驱动进行安装,然后


'''2.''' Install the driver
'''2.''' 安装该驱动


{{tip| Just ensure that you have identified and are indeed about to install the correct driver for your particular graphics card!}}
{{提示| 你需要确保你为你的显卡找到了正确的驱动来安装!}}




== Identifying Available Drivers ==
== 查找可用驱动 ==


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:
在手动安装显卡驱动之前,需要确认目前有哪些驱动可选。通过如下命令可列出当前可用的驱动:


  {{UserCmd|command=mhwd -l [optional: detailed view] [optional: --pci or --usb connection]}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd -l [optional: detailed view] [optional: --pci or --usb connection]}}
</div>


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:
不加额外选项运行这个命令,将会列出适用于你系统的所有驱动的基本信息。'''所有显卡驱动的名称都有共同的前缀 (video-) '''。列出的驱动基本信息格式如下:


* Name
* 名称
* Version
* 版本
* Free or proprietary, and
* 开源还是闭源
* PCI or USB connection
* 连接方式为PCI 还是 USB




A more detailed list of installed drivers can be obtained by entering:
通过如下命令可获取已安装驱动的详细信息:


  {{UserCmd|command=mhwd -l -d}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd -l -d}}
</div>


A detailed list will provide the following information:
信息格式如下:


* Name
* 名称
* Version
* 版本
* PCI or USB connection
* PCI USB 连接
* Description
* 描述
* Priority
* Priority
* Free or proprietary
* 开源或闭源
* Dependencies
* 依赖
* Conflicts
* 冲突
* Class ID (e.g. '0300' for graphics card drivers), and
* 类别ID (比如 '0300' 是显卡设备的ID)
* Vendor ID
* Vendor ID




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:
此外,添加 ''--pci'' 选项将会仅列出通过内部PCI方式连接的设备驱动(比如显卡)的详细信息:


  {{UserCmd|command=mhwd -l -d --pci}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd -l -d --pci}}
</div>


== Installing a Driver ==
== 安装驱动 ==


To install a driver for a graphics card, the syntax is:
安装显卡驱动的命令语法如下:


  {{UserCmd|command=sudo mhwd -i pci [name of driver]}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -i pci [name of driver]}}
</div>




A breakdown of the command used to manually install a driver is as follows:
命令参数:


* '''-i''': Install a driver
* '''-i''': 安装驱动
* '''[pci]''': Install a driver for a device connected internally via pci (e.g. graphics cards)
* '''[pci]''': 安装通过内部pci方式连接的设备驱动 (比如显卡)
* '''[name of driver]''': The name of the driver to be installed
* '''[name of driver]''': 要安装的驱动名称


For example, to install the proprietary nvidia graphics card driver, the following command would be used:
例如,要安装nvidia显卡的闭源驱动,可使用如下命令:


  {{UserCmd|command=sudo mhwd -i pci video-nvidia}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -i pci video-nvidia}}
</div>


== Force Reinstall a Driver ==
== 强制重新安装驱动 ==


<div lang="en" dir="ltr" class="mw-content-ltr">
{{warning|use this command with care!}}
{{warning|use this command with care!}}
</div>


To force the re-installation of an existing driver without removing it first, the syntax is:
不先删除,直接强制重新安装驱动:


  {{UserCmd|command=sudo mhwd -f -i pci [name of driver]}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -f -i pci [name of driver]}}
</div>


For example, to force the re-installation of a previously installed nvidia graphics card driver, the following command would be used:
例如,如下命令可强制重新安装nvidia显卡驱动:


  {{UserCmd|command=sudo mhwd -f -i pci video-nvidia}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -f -i pci video-nvidia}}
</div>


= Removing an Installed Driver =
= 删除已安装的驱动 =


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:
有时可能会需要删除已安装的显卡驱动。类似于手动安装驱动,删除也需要两步:


'''1.''' Identify the installed driver
'''1.''' 找到安装的驱动


'''2.''' Remove the identified driver
'''2.''' 删除它


After all, it would be somewhat difficult to remove an installed driver if you don't know what it's called!
毕竟如果你不知道要删除哪个驱动,想删除还是有点困难的!




== Identifying Installed Drivers ==
== 找到安装的驱动 ==


To identify and list Manjaro's installed drivers - including the graphics driver to be removed, the syntax is:
要查找并列出Manjaro已安装的驱动 - 包括你要删除的那个,语法如下:


  {{UserCmd|command=mhwd  -li [optional: detailed view] [optional: pci or usb devices only]}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd  -li [optional: detailed view] [optional: pci or usb devices only]}}
</div>


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:
不添加额外选项,此i命令将会列出你的系统之欧冠所有已安装驱动的基本信息。'''再次提醒,所有显卡驱动名称中都会有前缀(video-)'''。通过''-d''选项可以列出驱动的详细信息:


  {{UserCmd|command=mhwd -li -d}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd -li -d}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
</div>


  {{UserCmd|command=mhwd -li -d --pci}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=mhwd -li -d --pci}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


   {{UserCmd|command=inxi -G}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=inxi -G}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{{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.}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
== Removing Installed Drivers ==
== Removing Installed Drivers ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{{warning|use this command with care!}}
{{warning|use this command with care!}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
To remove an installed driver, the syntax is:
To remove an installed driver, the syntax is:
</div>


  {{UserCmd|command=sudo mhwd -r [pci or usb] [name of driver]}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -r [pci or usb] [name of driver]}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
</div>


  {{UserCmd|command=sudo mhwd -r pci video-nvidia}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd -r pci video-nvidia}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
= Checking configuration =
= Checking configuration =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
You can check configuration with:
You can check configuration with:
{{UserCmd|command=sudo mhwd-gpu --check}}
{{UserCmd|command=sudo mhwd-gpu --check}}
{{UserCmd|command=mhwd-gpu --status}}
{{UserCmd|command=mhwd-gpu --status}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
And if needed fix issues with:
And if needed fix issues with:
{{UserCmd|command=sudo mhwd-gpu --setmod}}
{{UserCmd|command=sudo mhwd-gpu --setmod}}
{{UserCmd|command=sudo mhwd-gpu --setxorg [PATH]}}
{{UserCmd|command=sudo mhwd-gpu --setxorg [PATH]}}
</div>


Make sure the path to xorg config file is valid.  
<div lang="en" dir="ltr" class="mw-content-ltr">
Make sure the path to xorg config file is valid.
</div>


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.]
<div lang="en" dir="ltr" class="mw-content-ltr">
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/title/ATI#Performance_and/or_artifacts_issues_when_using_EXA here.]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
=Dual GPU=
=Dual GPU=
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==PRIME GPU offloading==
==PRIME GPU offloading==
</div>


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.  
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


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.  
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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'''
</div>


   {{UserCmd|command=DRI_PRIME=1 glxspheres64}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=DRI_PRIME=1 glxspheres64}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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)
</div>


   {{UserCmd|command=DRI_PRIME=0 glxspheres64}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=DRI_PRIME=0 glxspheres64}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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
</div>


   {{UserCmd|command=Exec=DRI_PRIME=1 inkscape}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=Exec=DRI_PRIME=1 inkscape}}
</div>


Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  
<div lang="en" dir="ltr" class="mw-content-ltr">
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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%.
</div>


  DRI_PRIME=1 %command%
  <div lang="en" dir="ltr" class="mw-content-ltr">
DRI_PRIME=1 %command%
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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]'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
= NVIDIA Proprietary (non-free) drivers =
= NVIDIA Proprietary (non-free) drivers =
</div>


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.  
<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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
</div>


   {{UserCmd|command=sudo nvidia-settings}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo nvidia-settings}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
If you are using bumblebee, the nvidia utility needs a special command
If you are using bumblebee, the nvidia utility needs a special command
</div>


   {{UserCmd|command=sudo optirun -b none nvidia-settings -c :8}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo optirun -b none nvidia-settings -c :8}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Nvidia Optimus==
==Nvidia Optimus==
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''[[#nvidia-prime|PRIME]] (mhwd default)'''
'''[[#nvidia-prime|PRIME]] (mhwd default)'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''[[#Bumblebee|Bumblebee]]'''
'''[[#Bumblebee|Bumblebee]]'''
</div>


'''[[Optimus Manager]]'''
<div lang="en" dir="ltr" class="mw-content-ltr">
 
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".
</div>


 
<div lang="en" dir="ltr" class="mw-content-ltr">
==Configure The Resolution/Refresh Rate==
==Configure The Resolution/Refresh Rate==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{{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.}}
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
'''1.'''  Start nvidia-settings utility
'''1.'''  Start nvidia-settings utility
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.
'''2.'''  Change resolution and refresh rate in 'X Server Display Configuration' tab.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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:
</div>


  {{UserCmd|command=sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)==
==Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)==
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
'''1.'''  Start nvidia-settings utility
'''1.'''  Start nvidia-settings utility
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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]''')
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''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:
</div>


  {{UserCmd|command=gedit ~/.xinitrc}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=gedit ~/.xinitrc}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''6.''' Once opened, add the following line into the configuration file:
'''6.''' Once opened, add the following line into the configuration file:
</div>


  {{UserCmd|command=exec nvidia-settings --load-config-only}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=exec nvidia-settings --load-config-only}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''7.''' Save and exit.
'''7.''' Save and exit.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Nvidia settings for special cases ==
==Nvidia settings for special cases ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
</div>


   Section "Monitor"
   <div lang="en" dir="ltr" class="mw-content-ltr">
Section "Monitor"
     # HorizSync source: edid, VertRefresh source: edid
     # HorizSync source: edid, VertRefresh source: edid
     Identifier    "Monitor0"
     Identifier    "Monitor0"
Line 275: Line 421:
     Option        "HardDPMS" "true"
     Option        "HardDPMS" "true"
   EndSection
   EndSection
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
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]
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
==nvidia-prime==
==nvidia-prime==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
</div>


   {{UserCmd|command=prime-run glxspheres64}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
 
{{UserCmd|command=prime-run glxspheres64}}
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]'''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Bumblebee==
==Bumblebee==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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 or primusrun. For example:
For an application to use the Nvidia card, prepend the application command with optirun or primusrun. For example:
</div>


   {{UserCmd|command=optirun glxspheres64}}
   <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=optirun glxspheres64}}
{{UserCmd|command=primusrun inkscape}}
{{UserCmd|command=primusrun inkscape}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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
</div>


   Exec=primusrun chromium
   <div lang="en" dir="ltr" class="mw-content-ltr">
Exec=primusrun chromium
</div>


Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.  
<div lang="en" dir="ltr" class="mw-content-ltr">
Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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%.
    
    
  primusrun %command%
  primusrun %command%
</div>


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


<div lang="en" dir="ltr" class="mw-content-ltr">
= See also =
= See also =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
* [[Manjaro Hardware Detection Overview]]
* [[Manjaro Hardware Detection Overview]]
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
= Easier way =
= Easier way =
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
: - install graphic driver
: - install graphic driver
: - switch graphic driver
: - switch graphic driver
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
https://www.youtube.com/watch?v=UAFGukpEIJw
https://www.youtube.com/watch?v=UAFGukpEIJw
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
= How to check the driver =
= How to check the driver =
</div>


  {{UserCmd|command=glxinfo &#124; grep OpenGL}}
<div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmd|command=glxinfo &#124; grep OpenGL}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Example output command:
Example output command:
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Nvidia driver''' ( proprietary driver )
'''Nvidia driver''' ( proprietary driver )
</div>


  {{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: NVIDIA Corporation<br> OpenGL renderer string: GeForce GTX 660/PCIe/SSE2<br> OpenGL core profile version string: 4.3.0 NVIDIA 331.49<br> OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler<br> OpenGL core profile context flags: (none)<br> OpenGL core profile profile mask: core profile<br> OpenGL core profile extensions:<br> OpenGL version string: 4.4.0 NVIDIA 331.49<br> OpenGL shading language version string: 4.40 NVIDIA via Cg compiler<br> OpenGL context flags: (none)<br> OpenGL profile mask: (none)<br> OpenGL extensions:}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: NVIDIA Corporation<br> OpenGL renderer string: GeForce GTX 660/PCIe/SSE2<br> OpenGL core profile version string: 4.3.0 NVIDIA 331.49<br> OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler<br> OpenGL core profile context flags: (none)<br> OpenGL core profile profile mask: core profile<br> OpenGL core profile extensions:<br> OpenGL version string: 4.4.0 NVIDIA 331.49<br> OpenGL shading language version string: 4.40 NVIDIA via Cg compiler<br> OpenGL context flags: (none)<br> OpenGL profile mask: (none)<br> OpenGL extensions:}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Nouveau''' , '''Gallium''' from '''Mesa''' ( open source driver )
'''Nouveau''' , '''Gallium''' from '''Mesa''' ( open source driver )
</div>


  {{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: nouveau<br> OpenGL renderer string: Gallium 0.4 on NVE6<br> OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.5<br> OpenGL core profile shading language version string: 1.40<br> OpenGL core profile context flags: (none)<br> OpenGL core profile extensions:<br> OpenGL version string: 3.0 Mesa 9.2.5<br> OpenGL shading language version string: 1.30<br> OpenGL context flags: (none)<br> OpenGL extensions:}}
  <div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: nouveau<br> OpenGL renderer string: Gallium 0.4 on NVE6<br> OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.5<br> OpenGL core profile shading language version string: 1.40<br> OpenGL core profile context flags: (none)<br> OpenGL core profile extensions:<br> OpenGL version string: 3.0 Mesa 9.2.5<br> OpenGL shading language version string: 1.30<br> OpenGL context flags: (none)<br> OpenGL extensions:}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Intel''' driver from '''Mesa''' ( open driver )
'''Intel''' driver from '''Mesa''' ( open driver )
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: Intel Open Source Technology Center<br> OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop<br> OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.6<br> OpenGL core profile shading language version string: 3.30<br> OpenGL core profile context flags: (none)<br> OpenGL core profile profile mask: core profile<br> OpenGL core profile extensions:<br> OpenGL version string: 3.0 Mesa 11.0.6<br> OpenGL shading language version string: 1.30<br> OpenGL context flags: (none)<br> OpenGL extensions:<br> OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.0.6<br> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00<br> OpenGL ES profile extensions:}}
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Checking vulkan support ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
OpenGL is a graphics API specification and it has been superseded by the Vulkan api. To check support for Vulkan applications, you can install vulkan-tools and run
{{UserCmdOutput|command=vkcube|result=Selected GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU, type: DiscreteGpu}}
</div>


{{UserCmdOutput|command=glxinfo &#124; grep OpenGL|result= OpenGL vendor string: Intel Open Source Technology Center<br> OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop<br> OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.6<br> OpenGL core profile shading language version string: 3.30<br> OpenGL core profile context flags: (none)<br> OpenGL core profile profile mask: core profile<br> OpenGL core profile extensions:<br> OpenGL version string: 3.0 Mesa 11.0.6<br> OpenGL shading language version string: 1.30<br> OpenGL context flags: (none)<br> OpenGL extensions:<br> OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.0.6<br> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00<br> OpenGL ES profile extensions:}}
<div lang="en" dir="ltr" class="mw-content-ltr">
With integrated GPU you can select the GPU:
{{UserCmdOutput|command=vkcube --gpu_number 0|result=Selected GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU, type: DiscreteGpu}}
{{UserCmdOutput|command=vkcube --gpu_number 1|result=Selected GPU 1: AMD Radeon Graphics (RADV RENOIR), type: IntegratedGpu
}}$
</div>


[[Category:Contents Page]]
[[Category:Contents Page]]

Latest revision as of 18:38, 11 February 2024

Other languages:
English • ‎Türkçe • ‎español • ‎русский • ‎中文(中国大陆)‎

简介

Template:注意

在安装Manjaro完整版的时候(比如包含一个预安装的桌面环境、编解码器和软件应用),系统的GUI和CLI安装程序会自动调用mhwd来检测你的显卡并安装最合适的驱动。至于是安装开源版本的驱动还是非开源版本,取决于你在安装程序启动时选择的是开源显卡还是非开源悬卡启动。 否则,如果安装的是极简NET-Edition版的Manjaro,就有必要在安装后手动运行mhwd命令。

对于新手,推荐使用Manjaro 设置管理器中的 "硬件检测" 来更换或安装新的显卡驱动。
对于中等或高级用户,任何时候都可以使用mhwd命令来安装、重装或删除已安装的显卡驱动,如下文所述。

自动识别与安装

这是推荐的方式来进行显卡驱动的检测与安装。自动安装命令的语法如下:

user $ sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300 COPY TO CLIPBOARD

上述命令中,各参数含义为:

  • -a: 自动检测并安装合适的驱动
  • [pci 或 usb]: 安装通过pci或usb方式连接的显卡驱动,通常pci连接的显卡在设备内部,而usb连接的属于外接显卡(再次提醒, mhwd目前仅支持pci连接的显卡)
  • [free 或 nonfree]: 安装开源驱动 (比如由Linux社区提供的版本), or 闭源驱动 (比如由硬件制造商提供的版本)
  • 0300: 表示要安装的是显卡的驱动 (0300 是显卡的ID. 随着mhwd命令工具的发展,其他新的ID将会用于表示其他硬件设备).


例如,下面的命令将会为通过pci方式连接的显卡自动检测并安装最合适的闭源驱动

user $ sudo mhwd -a pci nonfree 0300 COPY TO CLIPBOARD


或者,下面的命令将会为通过pci方式连接的显卡自动检测而并安装最合适的开源驱动

user $ sudo mhwd -a pci free 0300 COPY TO CLIPBOARD

手动识别并安装

手动安装需要相对简单、直接地操作mhwd命令。分为两个阶段:

1. 找到合适的驱动进行安装,然后

2. 安装该驱动

Template:提示


查找可用驱动

在手动安装显卡驱动之前,需要确认目前有哪些驱动可选。通过如下命令可列出当前可用的驱动:

user $ mhwd -l [optional: detailed view] [optional: --pci or --usb connection] COPY TO CLIPBOARD

不加额外选项运行这个命令,将会列出适用于你系统的所有驱动的基本信息。所有显卡驱动的名称都有共同的前缀 (video-) 。列出的驱动基本信息格式如下:

  • 名称
  • 版本
  • 开源还是闭源
  • 连接方式为PCI 还是 USB


通过如下命令可获取已安装驱动的详细信息:

user $ mhwd -l -d COPY TO CLIPBOARD

信息格式如下:

  • 名称
  • 版本
  • PCI 或 USB 连接
  • 描述
  • Priority
  • 开源或闭源
  • 依赖
  • 冲突
  • 类别ID (比如 '0300' 是显卡设备的ID)
  • Vendor ID


此外,添加 --pci 选项将会仅列出通过内部PCI方式连接的设备驱动(比如显卡)的详细信息:

user $ mhwd -l -d --pci COPY TO CLIPBOARD

安装驱动

安装显卡驱动的命令语法如下:

user $ sudo mhwd -i pci [name of driver] COPY TO CLIPBOARD


命令参数:

  • -i: 安装驱动
  • [pci]: 安装通过内部pci方式连接的设备驱动 (比如显卡)
  • [name of driver]: 要安装的驱动名称

例如,要安装nvidia显卡的闭源驱动,可使用如下命令:

user $ sudo mhwd -i pci video-nvidia COPY TO CLIPBOARD

强制重新安装驱动

Warning
use this command with care!

不先删除,直接强制重新安装驱动:

user $ sudo mhwd -f -i pci [name of driver] COPY TO CLIPBOARD

例如,如下命令可强制重新安装nvidia显卡驱动:

user $ sudo mhwd -f -i pci video-nvidia COPY TO CLIPBOARD

删除已安装的驱动

有时可能会需要删除已安装的显卡驱动。类似于手动安装驱动,删除也需要两步:

1. 找到安装的驱动

2. 删除它

毕竟如果你不知道要删除哪个驱动,想删除还是有点困难的!


找到安装的驱动

要查找并列出Manjaro已安装的驱动 - 包括你要删除的那个,语法如下:

user $ mhwd -li [optional: detailed view] [optional: pci or usb devices only] COPY TO CLIPBOARD

不添加额外选项,此i命令将会列出你的系统之欧冠所有已安装驱动的基本信息。再次提醒,所有显卡驱动名称中都会有前缀(video-)。通过-d选项可以列出驱动的详细信息:

user $ mhwd -li -d COPY TO CLIPBOARD

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:

user $ mhwd -li -d --pci COPY TO CLIPBOARD

One other way of reporting drivers installed andin use is using the inxi tool.

user $ inxi -G COPY TO CLIPBOARD

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.

Removing Installed Drivers

Warning
use this command with care!

To remove an installed driver, the syntax is:

user $ sudo mhwd -r [pci or usb] [name of driver] COPY TO CLIPBOARD

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

user $ sudo mhwd -r pci video-nvidia COPY TO CLIPBOARD

Checking configuration

You can check configuration with:

user $ sudo mhwd-gpu --check COPY TO CLIPBOARD

user $ mhwd-gpu --status COPY TO CLIPBOARD


And if needed fix issues with:

user $ sudo mhwd-gpu --setmod COPY TO CLIPBOARD

user $ sudo mhwd-gpu --setxorg [PATH] COPY TO CLIPBOARD


Make sure the path to xorg config file is valid.

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 here.

Dual GPU

PRIME GPU offloading

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.

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.

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.

For example, to run an application using the second card prepend the application command with DRI_PRIME=1

user $ DRI_PRIME=1 glxspheres64 COPY TO CLIPBOARD

To use the 1st card (usually when the CPU has an embedded GPU, this is used)

user $ DRI_PRIME=0 glxspheres64 COPY TO CLIPBOARD

If you want to always run some application with the discrete gpu, you may copy that application's .desktop file to ~/.local/share/applications/ and edit the "Exec" property

user $ Exec=DRI_PRIME=1 inkscape COPY TO CLIPBOARD

Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.

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%.

DRI_PRIME=1 %command%

To use the dGPU by default see Reverse Prime

NVIDIA Proprietary (non-free) drivers

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.

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.

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

user $ sudo nvidia-settings COPY TO CLIPBOARD

If you are using bumblebee, the nvidia utility needs a special command

user $ sudo optirun -b none nvidia-settings -c :8 COPY TO CLIPBOARD

Nvidia Optimus

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.

PRIME (mhwd default)

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

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. Start nvidia-settings utility

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 start your terminal and enter the following command to complete the process:

user $ sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf COPY TO CLIPBOARD

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


1. Start nvidia-settings utility

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, if you use gedit, run this in your terminal:

user $ gedit ~/.xinitrc COPY TO CLIPBOARD

6. Once opened, add the following line into the configuration file:

user $ exec nvidia-settings --load-config-only COPY TO CLIPBOARD

7. Save and exit.

Nvidia settings for special cases

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

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "BenQ ZOWIE XL LCD"
    HorizSync       30.0 - 160.0
    VertRefresh     56.0 - 144.0
    Option         "DPMS"
    Option         "HardDPMS" "true"
  EndSection


After forum issue


nvidia-prime

Manjaro also offers an easy way to use PRIME with proprietary Nvidia drivers.
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.

Then to use the discrete Nvidia card it works the same as PRIME offloading above but uses a different command. Prepend the application command with prime-run. For example:

user $ prime-run glxspheres64 COPY TO CLIPBOARD

Bumblebee

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 or primusrun. For example:

user $ optirun glxspheres64 COPY TO CLIPBOARD

user $ primusrun inkscape COPY TO CLIPBOARD


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

Some applications (usually games like steam) may have an embedded option to specify the command line, where it is preferred to use this way.

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%.

primusrun %command%


See also


Easier way

You may use a GUI version of mhwd in Manjaro Settings Manager#Hardware Detection

With this tool you can:
- install graphic driver
- switch graphic driver


How to check the driver

user $ glxinfo | grep OpenGL COPY TO CLIPBOARD

Example output command:

Nvidia driver ( proprietary driver )


$ glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 660/PCIe/SSE2
OpenGL core profile version string: 4.3.0 NVIDIA 331.49
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4.0 NVIDIA 331.49
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

Nouveau , Gallium from Mesa ( open source driver )


$ glxinfo | grep OpenGL

OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NVE6
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.5
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

Intel driver from Mesa ( open driver )


$ glxinfo | grep OpenGL

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Checking vulkan support

OpenGL is a graphics API specification and it has been superseded by the Vulkan api. To check support for Vulkan applications, you can install vulkan-tools and run


$ vkcube

Selected GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU, type: DiscreteGpu

With integrated GPU you can select the GPU:


$ vkcube --gpu_number 0

Selected GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU, type: DiscreteGpu


$ vkcube --gpu_number 1

Selected GPU 1: AMD Radeon Graphics (RADV RENOIR), type: IntegratedGpu

$

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