Difference between revisions of "Configure Graphics Cards"
Views
Actions
Namespaces
Variants
Tools
(Template inserted) |
(Marked this version for translation) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 134: | Line 134: | ||
<!--T:38--> | <!--T:38--> | ||
{{warning|use this command with care!}} | {{warning|use this command with care!}} | ||
<!--T:39--> | <!--T:39--> | ||
Line 140: | Line 139: | ||
<!--T:40--> | <!--T:40--> | ||
sudo mhwd -f -i pci [name of driver] | {{UserCmd|command=sudo mhwd -f -i pci [name of driver]}} | ||
<!--T:41--> | <!--T:41--> | ||
Line 147: | Line 145: | ||
<!--T:42--> | <!--T:42--> | ||
sudo mhwd -f -i pci video-nvidia | {{UserCmd|command=sudo mhwd -f -i pci video-nvidia}} | ||
= Removing an Installed Driver = <!--T:43--> | = Removing an Installed Driver = <!--T:43--> | ||
Line 215: | Line 213: | ||
<!--T:65--> | <!--T:65--> | ||
You can check configuration with: | You can check configuration with: | ||
{{UserCmd|command=mhwd-gpu --check}} | {{UserCmd|command=sudo mhwd-gpu --check}} | ||
{{UserCmd|command=mhwd-gpu --status}} | {{UserCmd|command=mhwd-gpu --status}} | ||
<!--T:66--> | <!--T:66--> | ||
And if needed fix issues with: | And if needed fix issues with: | ||
{{UserCmd|command=mhwd-gpu --setmod}} | {{UserCmd|command=sudo mhwd-gpu --setmod}} | ||
{{UserCmd|command=mhwd-gpu --setxorg [PATH]}} | {{UserCmd|command=sudo mhwd-gpu --setxorg [PATH]}} | ||
<!--T:67--> | <!--T:67--> | ||
Line 227: | Line 225: | ||
<!--T:68--> | <!--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/ | 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.] | ||
=Dual GPU= <!--T:69--> | =Dual GPU= <!--T:69--> | ||
Line 301: | Line 299: | ||
<!--T:93--> | <!--T:93--> | ||
'''[[#Bumblebee|Bumblebee]]''' | '''[[#Bumblebee|Bumblebee]]''' | ||
<!--T:95--> | <!--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== <!--T:96--> | ==Configure The Resolution/Refresh Rate== <!--T:96--> | ||
Line 393: | Line 387: | ||
<!--T:120--> | <!--T:120--> | ||
{{UserCmd|command=prime-run glxspheres64}} | {{UserCmd|command=prime-run glxspheres64}} | ||
==Bumblebee== <!--T:122--> | ==Bumblebee== <!--T:122--> | ||
Line 422: | Line 413: | ||
primusrun %command% | primusrun %command% | ||
= See also = <!--T:130--> | = See also = <!--T:130--> | ||
Line 468: | Line 457: | ||
<!--T:143--> | <!--T:143--> | ||
{{UserCmdOutput|command=glxinfo | 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:}} | {{UserCmdOutput|command=glxinfo | 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:}} | ||
==== Checking vulkan support ==== <!--T:144--> | |||
<!--T:145--> | |||
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}} | |||
<!--T:146--> | |||
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 | |||
}}$ | |||
</translate> | </translate> | ||
[[Category:Contents Page]] | [[Category:Contents Page]] |
Latest revision as of 18:38, 11 February 2024
Overview
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.
For Beginners, it is recommended to use "Hardware Detection" in Manjaro Settings Manager to change or install new graphics drivers.
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
This is the recommended method for the detection and installation of graphics drivers. The syntax for the automated installation method is:
A breakdown of the command used for the automated method is as follows:
- -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)
- [free or nonfree]: Install either free drivers (e.g. provided by the Linux community), or nonfree drivers (e.g. provided by hardware manufacturers)
- 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).
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:
Otherwise, the following command would result in the automatic detection and installation of the best available free driver for a pci-connected graphics card:
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:
1. Identify the appropriate driver to be installed, and then
2. Install the driver
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:
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:
- Name
- Version
- Free or proprietary, and
- PCI or USB connection
A more detailed list of installed drivers can be obtained by entering:
A detailed list will provide the following information:
- Name
- Version
- PCI or USB connection
- Description
- Priority
- Free or proprietary
- Dependencies
- Conflicts
- Class ID (e.g. '0300' for graphics card drivers), and
- 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:
Installing a Driver
To install a driver for a graphics card, the syntax is:
A breakdown of the command used to manually install a driver is as follows:
- -i: Install a driver
- [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
For example, to install the proprietary nvidia graphics card driver, the following command would be used:
Force Reinstall a Driver
To force the re-installation of an existing driver without removing it first, the syntax is:
For example, to force the re-installation of a previously installed nvidia graphics card driver, the following command would be used:
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
2. Remove the identified driver
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:
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:
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:
One other way of reporting drivers installed andin use is using the inxi
tool.
Removing Installed Drivers
To remove an installed driver, the syntax is:
For example, to remove the installed driver for a nvidia graphics card (connected internally via pci), the following command would be used:
Checking configuration
You can check configuration with:
And if needed fix issues with:
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
To use the 1st card (usually when the CPU has an embedded GPU, this is used)
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
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
If you are using bumblebee, the nvidia utility needs a special command
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
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:
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:
6. Once opened, add the following line into the configuration file:
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:
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:
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
https://www.youtube.com/watch?v=UAFGukpEIJw
How to check the driver
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
$