Configure Graphics Cards
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 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. Of course, 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:
sudo mhwd -a [pci or usb connection] [free or nonfree drivers] 0300
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:
sudo mhwd -a pci nonfree 0300
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
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:
mhwd -l [optional: detailed view] [optional: --pci or --usb connection]
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:
mhwd -l -d
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:
mhwd -l -d --pci
Installing a Driver
To install a driver for a graphics card, the syntax is:
sudo mhwd -i pci [name of driver]
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:
sudo mhwd -a pci video-nvidia
Forcing Re-installation of a Driver
To force the re-installation of an existing driver without removing it first, the syntax is:
sudo mhwd -f -i pci [name of driver]
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
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:
mhwd -li [optional: detailed view] [optional: pci or usb devices only]
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
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
Removing Installed Drivers
To remove an installed driver, the syntax is:
sudo mhwd -r [pci or usb] [name of driver]
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