There are currently two types of Manjaro Hardware detection commands, mhwd, mhwd-kernel. This article introduces the mhwd command, which automates the identification and installation of system hardware. As well as the mhwd-kernel command to enable easy installation and management of multiple kernels in Manjaro Linux.
mhwd
The mhwd command runs automatically by the GUI or CLI during the installation process. It identifies the hardware of the system and configures the most appropriate drivers. It does not require the user to manually identify/install the suitable drivers or edit the configuration files. However, it’s also usable at any time to identify/install drivers after installation.
Currently, mhwd is under development and only offers to install free or non-free graphic card (Nvidia Optimus) drivers. mhwd command features:
- the option of free/proprietary drivers
- Identify and list system hardware details
- Identify and list installed drivers’ details
- List available (free or non-free) drivers for installation
- Efficient driver’s removal and installation
Follow the below instructions to install, remove, or re-install free and non-free graphic drivers:
Automatically Detect and Install Drivers
The following command offers the best proprietary/free graphic drivers for the PCI-connected cards.
The -a option automatically identifies and installs the required driver where 0300 is a graphic card ID.
Manual Installation
The manual installation requires the user to identify the suitable drivers, followed by the installation process.
Identification:
Use the mhwd command, with the ‘-l’ option, to list the system’s drivers.
The above command without the optional flags lists the basic information of the available drivers. For instance, name, version, free/non-free, pci/usb.
Whereas the -d flag in the above command lists the detailed information. From the name and description details to dependencies, IDs, and conflicts, etc.
Lastly, the –usb flag provides the details of graphic card drivers connected externally via usb. However, currently mhwd supports internal pci-connections only.
Installation:
Use the mhwd command with a ‘-i’ flag to install the internally pci-connected driver.
Remove Drivers
The removal process of installed drivers involves two steps:
- Detection of installed drivers
- Removing identified drivers
Use the following command to list all the installed drivers.
Note that the graphic card driver’s name contains a prefix of video-. The above command with an additional –pci flag helps filter out installed drivers and lists only the internally connected via pci.
The official manjaro documentation only recommends the intermediate and advanced users utilize this command.
mhwd-kernel
The ever-increasing complexity of the hardware and software applications demands new kernel revisions and versions to be regularly released. The mhwd-kernel hardware detection command enables to identify, select, add/remove kernels from the terminal.
Kernel Identification
To begin the renewal or selection process of a new kernel, use the Manjaro kernel command mhwd-kernel to identify the current system kernel details.
The above command output details the systems kernel details with the list of all other kernels installed. Hence, the current running kernel is X-X-X-X-Manjaro, where:
- the X: version
- X: major revision
- X: minor revision
- X: Manjaro revision package
New Kernel
It’s important to note that the mhwd kernel command automatically updates all the modules used in the existing kernel. In other words, the command mhwd-kernel will automatically update from version 4.1.12 to 4.13 with any/all modules present in the previous version.
Use the following command to install a new kernel:
The above command installs the new kernel without removing the current one. Besides Manjaro supporting the use of multiple kernels, Manjaro also provides access to the latest bleeding-edge kernels.
While updating, the documentation recommends keeping the old kernel for a short time interval. This precaution helps to verify the stability and functionality of the new one. However, once satisfied, use the rmc option to replace the existing one with the new kernel.
Remove Kernels
Kernel removal sometimes requires removing three components, i.e., the kernel, its headers, and extra modules that depend if they were installed or not. In the case of multiple existing kernels, the Manjaro package manager Pacman can be utilized to remove from the terminal. However, be careful not to delete the existing in-use kernel.
- Use the following syntax to remove the kernel version 4.0.12-1:
- To remove kernel’s header:
- To remove the extra modules
manjaro@manjaro:~$ sudo mhwd-kernel -r linux40
Refer to the official documentation for more details on Manjaro kernel management and selection. This documentation recommends beginners to manage kernels and utilize the Hardware Detection tool from the Manjaro GUI tool known as Manjaro System Manager.
Manjaro System Manager
The GUI Manjaro Settings Manager offers a series of settings unique to Manjoor (kernel installation and hardware configuration), absent from famous Window Managers and Desktop Environments.
The Manjaro Settings Manager currently offers Kernels, Hardware detection, Language, Time and Date, User Accounts, and keyboards modules. However, it’s in the development process and may provide more settings later.
Conclusion
The above article introduces a Manjaro specific Hardware Detection tool that offers two types of commands to ease hardware and kernel management. Refer to the official documentation for more details.