t-8ch / linux-gigabyte-wmi-driver

Linux Driver for WMI on Gigabyte Mainboards. LEGACY. New development happens in mainline Linux.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/gigabyte-wmi.c
30 stars 4 forks source link

AORUS Gaming 5 z370 experience: different sensors_detect result, but no gigabyte wmi? #5

Closed aljazzair closed 3 years ago

aljazzair commented 3 years ago

Hello Thank you for creating the Gigabyte WMI Driver to allow some Gigabyte customers/users to obtain sensor readings under linux. Tried this under Manjaro, an Arch based distribution.

uname -r
5.10.26-1-MANJARO

Here is the full output requested describing the motherboard details:

grep . /sys/class/dmi/id/* 2> /dev/null
/sys/class/dmi/id/bios_date:04/03/2018
/sys/class/dmi/id/bios_release:5.12
/sys/class/dmi/id/bios_vendor:American Megatrends Inc.
/sys/class/dmi/id/bios_version:F6
/sys/class/dmi/id/board_asset_tag:Default string
/sys/class/dmi/id/board_name:Z370 AORUS Gaming 5-CF
/sys/class/dmi/id/board_vendor:Gigabyte Technology Co., Ltd.
/sys/class/dmi/id/board_version:x.x
/sys/class/dmi/id/chassis_asset_tag:Default string
/sys/class/dmi/id/chassis_type:3
/sys/class/dmi/id/chassis_vendor:Default string
/sys/class/dmi/id/chassis_version:Default string
/sys/class/dmi/id/modalias:dmi:bvnAmericanMegatrendsInc.:bvrF6:bd04/03/2018:br5.12:svnGigabyteTechnologyCo.,Ltd.:pnZ370AORUSGaming5:
vrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnZ370AORUSGaming5-CF:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:
/sys/class/dmi/id/product_family:Default string
/sys/class/dmi/id/product_name:Z370 AORUS Gaming 5
/sys/class/dmi/id/product_sku:Default string
/sys/class/dmi/id/product_version:Default string
/sys/class/dmi/id/sys_vendor:Gigabyte Technology Co., Ltd.
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvrF6:bd04/03/2018:br5.12:svnGigabyteTechnologyCo.,Ltd.:pnZ370AORUSG
ming5:pvrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnZ370AORUSGaming5-CF:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:

I first git cloned it87 from a1wong/it87, added the relevant kernel parameter ( acpi_enforce_resources=lax) edited modprobe config (options it87 force_id=0x8686).

Sensors_detect finds the following with default options (this is without loading the linux-gigabyte-driver):

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no):
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
AMD Family 19h thermal sensors...                           No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      Yes
Found `ITE IT8686E Super IO Sensors'                        Success!
    (address 0xa40, driver `to-be-written')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      Yes
Found `ITE IT8792E Super IO Sensors'                        Success!
    (address 0xa60, driver `it87')

(...)

Driver `to-be-written':
  * ISA bus, address 0xa40
    Chip `ITE IT8686E Super IO Sensors' (confidence: 9)

Driver `it87':
  * ISA bus, address 0xa60
    Chip `ITE IT8792E Super IO Sensors' (confidence: 9)

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

The reading are imperfect, with some way off. After scouring the internet, I came up with the following config file for lm_sensors (use at your own risk, internet, it is just a best effort by some random dude, no warranty implied 😉)

cat /etc/sensors.d/it8686E.conf

chip "it8686-isa-0a40"
    label in0 "VRIN"

    label in1 "+3.3V"
    compute in1 1.65*@,@/1.65

    label in2 "+12V"
    compute  in2  @ * (72/12), @ / (72/12)

    label in3 "+5V"
    compute in3 2.5*@,@/2.5

    label in4 "DRAM C/D"

    label in5 "VCCSA"

    label in6 "DRAM A/B"

    label fan1 "CPU_FAN"
    label fan2 "SYS_FAN1"
##    label fan3 "SYS_FAN2"
##    label fan4 "SYS_FAN3"
ignore fan3
ignore fan4

    label fan5 "CPU_OPT"

    label temp1 "System 1"
    label temp2 "Chipset"
    label temp3 "CPU"
    label temp4 "PCIEX16_1"
    label temp5 "VRM"
##    label temp6 "EC_TEMP1"
ignore temp6

chip "it8686-isa-0a60"

##ignore in0
##ignore in1
ignore in2
ignore in3
ignore in4
ignore in5
ignore in7
ignore in8
ignore in9
ignore intrusion0

##ignore temp0
ignore temp1
ignore temp2
ignore temp3
ignore temp4
ignore temp5
ignore temp6
ignore fan1
ignore fan2
ignore fan3
ignore fan4
ignore fan5
ignore fan6

   label in0 "VRIN"

    label in1 "Vcore"
    compute in1 0.03+@,@-0.03  # Raw reading is 0.03v off, HWinfo64 is the same

##    label in2 "Chipset"

##    label in4 "VCCIO"

##    label in5 "MESH"

    ignore in6

##  label in6 "VRIN4" # feel free to ignore this sensor. This matches HWInfo64
##  compute in6 @-1.1,@+1.1

##    label temp3 "System 2"
##    label temp2 "EC_TEMP2"
##    label temp1 "PCIEX16_2"

##    label fan3 "SYS_FAN4"
##    label fan2 "SYS_FAN5_PUMP"
##    label fan1 "SYS_FAN6_PUMP"

Then I tried to use the linux-gigabyte-wmi driver available here. It compiled fine.

After triying to load it like so:

sudo insmod ./gigabyte-wmi.ko force_load=1

I get:

journalctl:

Apr 16 12:39:29 computer kernel: gigabyte-wmi PNP0C14:02-DEADBEEF-2001-0000-00A0-C90629100000: Forcing load on unknown platform
Apr 16 12:39:29 computer kernel: gigabyte-wmi PNP0C14:02-DEADBEEF-2001-0000-00A0-C90629100000: No temperature sensors usable

sudo lsmod | grep wmi

gigabyte_wmi           16384  0
intel_wmi_thunderbolt    20480  0
mxm_wmi                16384  0
wmi_bmof               16384  0
wmi                    36864  4 intel_wmi_thunderbolt,gigabyte_wmi,wmi_bmof,mxm_wmi

After running sensors_detect I get a different output:

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no):
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
AMD Family 19h thermal sensors...                           No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      Yes
Found `ITE IT8686E Super IO Sensors'                        Success!
    (address 0xa40, driver `to-be-written')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

(...)

Driver `to-be-written':
  * ISA bus, address 0xa40
    Chip `ITE IT8686E Super IO Sensors' (confidence: 9)

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Resulting sensors output:


it8686-isa-0a60
Adapter: ISA adapter
VRIN:          1.40 V  (min =  +0.00 V, max =  +3.06 V)
Vcore:       666.00 mV (min =  +0.03 V, max =  +3.09 V)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +54.0°C  (high = +82.0°C, crit = +100.0°C)
Core 0:        +45.0°C  (high = +82.0°C, crit = +100.0°C)
Core 1:        +42.0°C  (high = +82.0°C, crit = +100.0°C)
Core 2:        +46.0°C  (high = +82.0°C, crit = +100.0°C)
Core 3:        +43.0°C  (high = +82.0°C, crit = +100.0°C)
Core 4:        +45.0°C  (high = +82.0°C, crit = +100.0°C)
Core 5:        +58.0°C  (high = +82.0°C, crit = +100.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)
temp2:        +29.8°C  (crit = +119.0°C)

it8686-isa-0a40
Adapter: ISA adapter
VRIN:          1.28 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:         3.23 V  (min =  +0.00 V, max =  +5.05 V)
+12V:         11.66 V  (min =  +0.00 V, max = +18.36 V)
+5V:           4.98 V  (min =  +0.00 V, max =  +7.65 V)
DRAM C/D:    192.00 mV (min =  +0.00 V, max =  +3.06 V)
VCCSA:         1.03 V  (min =  +0.00 V, max =  +3.06 V)
DRAM A/B:      1.19 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:          3.36 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:          3.17 V
CPU_FAN:     1155 RPM  (min =   10 RPM)
SYS_FAN1:    1113 RPM  (min =    0 RPM)
CPU_OPT:      825 RPM  (min =   10 RPM)
System 1:     +33.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
Chipset:      +40.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
CPU:          +47.0°C  (low  =  +0.0°C, high = +90.0°C)  sensor = Intel PECI
PCIEX16_1:    +33.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
VRM:          +46.0°C  (low  =  +0.0°C, high = -122.0°C)  sensor = thermistor
intrusion0:  OK

nvme-pci-0400
Adapter: PCI adapter
Composite:    +37.9°C  (low  =  -0.1°C, high = +114.8°C)
                       (crit = +119.8°C)

**Somehow chip ITE IT8792E is no longer detected now.

Best I can tell, sensors output does not change though.

There is no mention of gigabyte-wmi in the sensors-detect default output.**

Am I missing something here?

Thanks in advance for reading this report and for any insight you may have.

t-8ch commented 3 years ago

It seems the firmware provided by Gigabyte just does not expose these sensors via WMI. Therefore this driver can't find it. Unfortunately there is not much that can be done about this from the perspective of this driver.