## This driver has been integrated into the kernel mainline as of version 5.17 :smiley:
Thanks to @0lvin this driver has been merged into the kernel mainline. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hwmon/asus_wmi_sensors.c?h=v5.17
Provides a Linux kernel module "asus_wmi_sensors" that provides sensor readouts via ASUS' WMI interface present in the UEFI of some X370/X470/B450/X399 Ryzen motherboards.
Ensure you have lm_sensors, DKMS, kernel sources, GCC etc installed. Kernel version 4.12 or later is required.
If you have built your own kernel, it must have been built with CONFIG_HWMON (found under Device Drivers) and CONFIG_ACPI_WMI (found under Device Drivers -> X86 Platform Specific Device Drivers) enabled. It is not necessary to have built the "ASUS WMI Driver" (CONFIG_ASUS_WMI) module.
### I think my motherboard should be supported but it doesn't work, what can I do?
First verify that WMI hardware monitoring is working for your board under Windows. Both HWiNFO (https://www.hwinfo.com/) and SIV(http://rh-software.com/) will make use of ASUS WMI for reading sensors if available. If your board is supported by those, post the output of ```sudo dmidecode -t baseboard``` and it should be possible to add support.
### Why do some of my temperatures return 216 deg C?
This is the value returned for temperature sensor headers with no sensor connected.
### Why are some of the sensors (e.g. CPU Core Voltage) duplicated?
The driver simply returns all the sensors available in the WMI output. CPU Voltage and others are included twice, in the Embedded Controller and SIO banks.
This driver is not reading from the SuperIO/ Embedded controller directly, it uses a WMI interface put in the UEFI firmware by ASUS. Reading from this WMI interface seems inherently slow. I am investigating calling the underlying ACPI methods that the WMI interface calls which I have been told performs better.
Many of Asus' recent Ryzen motherboards have the ITE IT8665E sensor IC, which does not have any publicly available datasheets. Some support has been added to the out-of-tree IT87 driver, but this is currently unmaintained and not working on recent kernels. Also many Windows drivers are moving to use this WMI interface rather than accessing the chip directly as this avoids conflicts when multiple monitoring apps attempt to read the sensors simultaneously.
### Why have you created a new driver and not added to the existing Asus/eeepc drivers?
- The existing drivers are basic platform devices rather than using the kernels' WMI bus
- These new sensor methods are on a different WMI class - "ASUSHW" than the existing "ASUSManagment" class which the other driver uses. The existing driver largely deals with laptop functionality (hotkeys, WiFi kill switches, screen brightness). Adding to that driver support for this additional sensors functionality would make it quite large.
### Is it possible to control the speed of fans with this driver?
No, fan control is not part of the Asus sensors WMI interface. It may be possible via an undocumented method, but that would require reverse engineering effort.
If you use ukuu, or any other method to install a kernel, you should use the version of GCC used to build the kernel to build any additional out-of-tree modules otherwise you may run into issues.
Check `cat /proc/version` to see the version of GCC used to build the kernel, and upgrade your GCC install appropriately. (Usually an upgrade from GCC 7 to GCC 9 is needed)
- The WMI implementation in some of Asus' BIOSes is buggy. This can result in fans stopping, fans getting stuck at max speed, or temperature readouts getting stuck. This is not an issue with the driver, but the BIOS. The Prime X470 Pro seems particularly bad for this. The more frequently the WMI interface is polled the greater the potential for this to happen. Until you have subjected your computer to an extended soak test while polling the sensors frequently, don't leave you computer unattended. I can personally say I've seen the issue on the Crosshair VII with BIOS 2606 and a Ryzen 2700X, upgrading to 3004 rectified the issue.
- A few boards report 12v voltages to be ~10v. Once again this is a BIOS issue.