Add Arch PKGBUILD, update for Zenith Extreme

This commit is contained in:
ed 2018-12-16 10:18:16 +00:00
parent 9a05cb393c
commit 2c649567f4
6 changed files with 122 additions and 10 deletions

38
PKGBUILD Normal file
View File

@ -0,0 +1,38 @@
_pkgbase=asus-wmi-sensors
pkgname=asus-wmi-sensors-dkms-git
pkgver=25.4dfdbdb
pkgrel=1
pkgdesc="Linux sensors driver for ASUS motherboards with WMI sensors interface"
arch=('x86_64' 'i686')
url="https://github.com/electrified/asus-wmi-sensors"
license=('GPL')
depends=('dkms')
provides=('asus-wmi-sensors')
source=("$_pkgbase::git+https://github.com/electrified/asus-wmi-sensors.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$_pkgbase"
printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/$_pkgbase"
}
package() {
cd "$srcdir/$_pkgbase"
install -d "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
cp -r ${srcdir}/${_pkgbase}/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
sed -e "s/@_PKGBASE@/${_pkgbase}/" \
-e "s/@PKGVER@/${pkgver}/" \
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
install -Dm644 ${srcdir}/${_pkgbase}/asus-wmi-sensors.conf "${pkgdir}"/usr/lib/depmod.d/asus-wmi-sensors.conf
install -Dm644 ${srcdir}/${_pkgbase}/module-load.conf "${pkgdir}"/etc/modules-load.d/asus-wmi-sensors.conf
}

View File

@ -1,16 +1,79 @@
## Asus WMI Sensors driver.
# Linux ASUS WMI Sensor driver.
## Supported hardware
- Asus ROG Crosshair Hero VII (WiFi).
## Untested but should work
- Asus ROG Crosshair Hero VII.
- Asus ROG Crosshair Hero VI (WiFi).
- Asus ROG Crosshair Hero VI.
- ASUS ROG STRIX B450/X470
- ASUS ROG Zenith Extreme X399
## Features
- Reports all values scaled identically to in the UEFI interface
- Reports all sensor names identically to in the UEFI firmware
- Scaling performed in-driver
## How to install
### Arch Linux
## FAQ
### 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 is reading from the sensors so slow?
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.
### Why does this driver exist?
Many of Asus' recent Ryzen motherboards have the ITE IT8665E sensor IC, which does not have any publically available datasheets. Some support has been added to the out-of-tree IT87 driver, but this is kind of unmaintained currently. Also many Windows drivers are moving to use this WMI interface rather than accessing the chip directly.
On some of these recent boards, Asus has added a sensors WMI interface to the firmware, which lets you get the same values as reported in the BIOS.
Many of Asus' recent Ryzen motherboards have the ITE IT8665E sensor IC, which does not have any publically 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 moniroting 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.
Currently only tested on the Asus ROG Crosshair Hero VII.
## Example sensors output
Other boards known to have this WMI implementation:
- ASUS ROG STRIX B450/X470
- ASUS ROG Zenith Extreme X399
```
asushwwmi-virtual-0
Adapter: Virtual device
CPU Core Voltage: +0.88 V
CPU SOC Voltage: +1.13 V
DRAM Voltage: +1.34 V
VDDP Voltage: +0.24 V
1.8V PLL Voltage: +1.85 V
+12V Voltage: +11.88 V
+5V Voltage: +5.01 V
3VSB Voltage: +3.33 V
VBAT Voltage: +3.18 V
AVCC3 Voltage: +3.36 V
SB 1.05V Voltage: +1.07 V
CPU Core Voltage: +0.81 V
CPU SOC Voltage: +1.14 V
DRAM Voltage: +1.35 V
CPU Fan: 749 RPM
Chassis Fan 1: 0 RPM
Chassis Fan 2: 904 RPM
Chassis Fan 3: 888 RPM
HAMP Fan: 0 RPM
Water Pump: 0 RPM
CPU OPT: 0 RPM
Water Flow: 0 RPM
AIO Pump: 0 RPM
CPU Temperature: +37.0°C
CPU Socket Temperature: +31.0°C
Motherboard Temperature: +28.0°C
Chipset Temperature: +45.0°C
Tsensor 1 Temperature: +216.0°C
CPU VRM Temperature: +31.0°C
Water In: +216.0°C
Water Out: +28.0°C
CPU VRM Output Current: +1.00 A
```

View File

@ -25,7 +25,7 @@ MODULE_VERSION("0.0.1");
#define CROSSHAIR_6_WIFI "ROG CROSSHAIR VI HERO (WI-FI)"
#define CROSSHAIR_7 "ROG CROSSHAIR VII HERO"
#define CROSSHAIR_7_WIFI "ROG CROSSHAIR VII HERO (WI-FI)"
// #define ZENITH_EXTREME "ROG CROSSHAIR VII HERO (WI-FI)"
#define ZENITH_EXTREME "ROG ZENITH EXTREME"
#define METHODID_SENSOR_GET_VALUE 0x52574543
#define METHODID_SENSOR_UPDATE_BUFFER 0x51574543
@ -449,7 +449,8 @@ static int is_board_supported(void) {
strcmp(board_name, CROSSHAIR_7_WIFI) == 0 ||
strcmp(board_name, CROSSHAIR_7) == 0 ||
strcmp(board_name, CROSSHAIR_6_WIFI) == 0 ||
strcmp(board_name, CROSSHAIR_6) == 0))) {
strcmp(board_name, CROSSHAIR_6) == 0)
strcmp(board_name, ZENITH_EXTREME) == 0))) {
pr_debug("Supported board");
return 0;

2
asus-wmi-sensors.conf Normal file
View File

@ -0,0 +1,2 @@
search updates extramodules built-in

7
dkms.conf Normal file
View File

@ -0,0 +1,7 @@
MAKE="make TARGET=${kernelver}"
CLEAN="make clean"
PACKAGE_NAME="asus-wmi-sensors"
PACKAGE_VERSION="to be filled by make dkms"
BUILT_MODULE_NAME[0]="asus-wmi-sensors"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon/asus-wmi-sensors"
AUTOINSTALL="yes"

1
module-load.conf Normal file
View File

@ -0,0 +1 @@
asus-wmi-sensors