Created attachment 303122 [details] dmesg and lshw Hello, add please support to the driver dell-smm-hwmon for: Dell Inc. XPS 17 9710/0TXN0W, BIOS 1.13.1 08/23/2022. Driver return dell_smm_hwmon: unable to get SMM Dell signature. Complete dmesg and lshw in attachment. Thank You
The error message suggests that your laptop is simply not compatible with the dell-smm-hwmon driver. Unless Dell added a 3rd signature on recent models? Assigning to Pali for further investigation (or for closing if nothing can be done).
I really do not know what Dell invented in recent models. I do not own any new recent models. For new model support you would have to ask Dell. Could you try to contact Dell.Client.Kernel@dell.com address? It is mentioned in MAINTAINERS file for more Dell drivers.
Hi, I send a question to Dell email address. I will report back, when I get a response.
Since your Dell notebook seems to be quiet recent, maybe you can check if "/sys/bus/wmi/devices/8A42EA14-4F2A-FD45-6422-0087F7A7E608" exists. If this is the case, then you might be able to query fan and thermal sensors over the WMI DDV interface. A driver for this interface is coming with kernel 6.2, but the fan sensors interface is currently not supported. If your notebook has the WMI DDV interface, maybe we can find out more about the fan/thermal sensor interface and properly hook it up to the hwmon subsystem.
Hello, Yes, this interface exists in my notebook. I will happily help with testing. Could be Your driver run on 5.19, or it relies on some functions from higher versions?
Yes, the driver depends on some infrastructure changes which will land in kernel 6.2, so you cannot compile the driver as a module. However i can provide you with a "reduced" version of the driver which will compile under 5.19 and still provide access to the fan/thermal sensor interface. I can also provide you with a Makefile and instructions on how to build the kernel module on you notebook.
Okay, when will you have a time, send me a reduced version and Makefile. Instruction would also be fine, so I can prevent any build mistakes. Thank You.
Created attachment 303212 [details] Reduced version of the dell-wmi-ddv driver Archive containing a Makefile and the source code of a reduced version of the dell-wmi-ddv- driver.
I uploaded an archive containing the source code and a Makefile. You only need to install the kernel-headers and build-essential (on debian). Inside the directory, you just need to execute "make" and after that "insmod dell-wmi-ddv.ko". Can you send me the output of "sudo hexdump /sys/kernel/debug/dell-wmi-ddv-8A42EA14-4F2A-FD45-6422-0087F7A7E608/fan_sensor_information" and "sudo hexdump /sys/kernel/debug/dell-wmi-ddv-8A42EA14-4F2A-FD45-6422-0087F7A7E608/thermal_sensor_information"?
Build, signed, insmoded. lsmod: "dell_wmi_ddv 20480 0" dmesg: "dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: WMI interface version: 3" But "/sys/kernel/debug/" do not contain "dell-wmi-ddv...".
Oh well, your notebook features a more modern DDV WMI interface than mine (version 2). Can you provide me with an dump of your ACPI tables? The program "acpitool" can be used for that. This would allow me to add support for interface version 3 to the dell-wmi-ddv driver.
I correct: acpidump is the name of the program.
Created attachment 303213 [details] Acpi Table Dump Acpi Table dump from Dell Inc. XPS 17 9710/0TXN0W, BIOS 1.14.0 09/06/2022 (dell-wmi-ddv version 3)
Created attachment 303214 [details] Updated version of the dell-wmi-ddv driver Supports interface version 3.
I uploaded an updated version of the dell-wmi-ddv driver which should support your notebook. Luckily, they only seemed to have added an additional method.
fan_sensor_information: 0000000 0902 0006 060a 00ff 0000007 thermal_sensor_information: 0000000 3300 0000 7300 002f 0000 2d33 0000 3300 0000010 002f 0000 2f33 0000 4400 0028 0000 3033 0000020 0000 3300 0022 0000 3011 0000 ff00 000002e
How many fans are installed inside your notebook? How fast where they running at the time you executed those commands?
Also, can you please add the following arguments when executing hexdump: -v -e '1/1 "%02x\n"'
Two fans (had to disassemble case) fan_sensor_information: 02 ed 04 00 eb 04 ff thermal_sensor_information: 00 32 00 00 00 73 2e 00 00 00 33 2b 00 00 00 33 2e 00 00 00 33 2e 00 00 00 44 26 00 00 00 33 2e 00 00 00 33 1f 00 00 00 11 31 00 00 00 ff Both fans were stopped.
Ok, thanks. Can you provide me the output of those commands if the fans are running?
fan_sensor_information: 0000000 0002 0000 0000 00ff 0000007 thermal_sensor_information: 0000000 2d00 0000 7300 002b 0000 2933 0000 3300 0000010 002a 0000 2a33 0000 4400 0025 0000 2833 0000020 0000 3300 0020 0000 2511 0000 ff00 000002e These are when fans were stopped (verified by looking at them when disassembled) Above should be also stopped as no noise was hear.
fan_sensor_information: 02 eb 0c 00 e2 0c ff thermal_sensor_information 00 63 00 00 00 73 39 00 00 00 33 32 00 00 00 33 34 00 00 00 33 34 00 00 00 44 26 00 00 00 33 31 00 00 00 33 20 00 00 00 11 37 00 00 00 ff Both spins high. ("stress --cpu 15")
Interesting, i assume both are running at aprox. 3300 RPM? Additionally, the output of the "sensors" command could help me to better understand the thermal sensors buffer.
Can't tel how much it is, but the noise seems to me as max level they ever produced. ucsi_source_psy_USBC000:003-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) ucsi_source_psy_USBC000:001-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) coretemp-isa-0000 Adapter: ISA adapter Package id 0: +100.0°C (high = +100.0°C, crit = +100.0°C) Core 0: +89.0°C (high = +100.0°C, crit = +100.0°C) Core 1: +86.0°C (high = +100.0°C, crit = +100.0°C) Core 2: +100.0°C (high = +100.0°C, crit = +100.0°C) Core 3: +100.0°C (high = +100.0°C, crit = +100.0°C) Core 4: +98.0°C (high = +100.0°C, crit = +100.0°C) Core 5: +100.0°C (high = +100.0°C, crit = +100.0°C) Core 6: +89.0°C (high = +100.0°C, crit = +100.0°C) Core 7: +89.0°C (high = +100.0°C, crit = +100.0°C) nvme-pci-e200 Adapter: PCI adapter Composite: +38.9°C (low = -60.1°C, high = +89.8°C) (crit = +94.8°C) ucsi_source_psy_USBC000:004-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +0.00 V, max = +19.50 V) curr1: 6.50 A (max = +6.66 A) ucsi_source_psy_USBC000:002-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +37.0°C nvme-pci-e100 Adapter: PCI adapter Composite: +40.9°C (low = -0.1°C, high = +82.8°C) (crit = +84.8°C) Sensor 1: +33.9°C (low = -273.1°C, high = +65261.8°C) Sensor 2: +34.9°C (low = -273.1°C, high = +65261.8°C) BAT0-acpi-0 Adapter: ACPI interface in0: 12.70 V curr1: 871.00 mA
Can you provide an output of the commands again while executing sensors at the same time and provide me with that output too? I am currently trying to map individual temperature sensors into the thermal buffer.
Created attachment 303215 [details] Sensors logs Contain debug and sensors output. File name mean subjective fan speed.
If you need more levels, I could probably add to my bash script sensor reading in cycle and create debug log on temperature change (by X degrees).
Thank you, but i think i now know the layout of those buffers: Fan: Fan type (?) Fan rpm, low byte Fan rpm, high byte Thermal: Temp max Temp current ? ? ?
Regarding the fan type: Im not sure about that one, but you can check this if you notebook supports the "Dell UEFI Preboot Diagnostics". You can choose it as a boot option when pressing F12 during powerup. It will take you to a screen (you may need to abort the diag test), and upon choosing "Configuration" (or "Results"), it will show you the current system configuration, including any fan/thermal sensors. Maybe you can try and take a picture of it?
Created attachment 303216 [details] Dell UEFI Diagnosis photo Sure. If needed, I can send whole content.
Perfect, the first byte seems to be indeed the fan type (as found in dell-smm-hwmon). Does the UEFI provide any information regarding the temperature sensors?
Created attachment 303217 [details] Dell UEFI Diagnosis photo 2 Yes, there are in Health card.
I do not know where the system gets the temperature sensors labels, but i think the temperature sensor values make sense. Sadly, the interface seems to provide no way to set the fan speed, only read access seems possible. But maybe dell-smm-hwmon can still provide write access when supplied with the "force=true" module option?
Cannot tell as: sudo modprobe i8k force=1 sudo i8kctl 1.0 1.1 G0WZ9G3 -1 -1 -1 -1 -1 -1 -1
So the interface really is absent. Luckly "smbios-thermal-ctl" seems to work on your notebook, is the level of control it grants you enough for your needs?
"smbios-thermal-ctl" cannot find module: -- dell-smbios-wmi driver not loaded Try loading the dell-smbios-wmi driver Linux : modprobe dell-smbios-wmi "lsmod | grep dell" dell_wmi_ddv 20480 0 dell_smm_hwmon 24576 0 dell_laptop 32768 0 dell_wmi 24576 1 dell_laptop ledtrig_audio 16384 3 snd_ctl_led,dell_wmi,dell_laptop dell_smbios 28672 2 dell_wmi,dell_laptop dcdbas 20480 1 dell_smbios dell_wmi_sysman 45056 0 dell_wmi_descriptor 20480 2 dell_wmi,dell_smbios firmware_attributes_class 16384 1 dell_wmi_sysman sparse_keymap 16384 2 intel_hid,dell_wmi wmi 32768 6 dell_wmi_ddv 20480 0 dell_smm_hwmon 24576 0 dell_laptop 32768 0 dell_wmi 24576 1 dell_laptop ledtrig_audio 16384 3 snd_ctl_led,dell_wmi,dell_laptop dell_smbios 28672 2 dell_wmi,dell_laptop dcdbas 20480 1 dell_smbios dell_wmi_sysman 45056 0 dell_wmi_descriptor 20480 2 dell_wmi,dell_smbios firmware_attributes_class 16384 1 dell_wmi_sysman sparse_keymap 16384 2 intel_hid,dell_wmi wmi 32768 6 dell_wmi_sysman,dell_wmi_ddv,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor video 61440 3 dell_wmi,dell_laptop,i915 dell_wmi_sysman,dell_wmi_ddv,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor video 61440 3 dell_wmi,dell_laptop,i915 Tried to load it, but it's not found.
Can you try to manually load it? If it does not work, consider a BIOS upgrade and/or disable the WSMT table via BIOS setup menu.
On my machine (Inspiron 3505), a BIOS upgrade was necessary for dell-smbios-wmi to load.
smbios-thermal-ctl should work on your notebook, according to the arch wiki: https://wiki.archlinux.org/title/Dell_XPS_17_(9710)#Fan_control
sudo modprobe dell-smbios-wmi modprobe: FATAL: Module dell-smbios-wmi not found in directory /lib/modules/5.19.0-23-generic Bios is actual.
My bad, its integrated into dell-smbios. Have you executed the command with root permissions? If yes, then try to deactivate WSMT support inside the BIOS.
ou, sry, forget to use sudo. sudo smbios-thermal-ctl -g Helper function to Get current Thermal Mode settings Print Current Status of Thermal Information: ------------------------------------------------------------------- Current Thermal Modes: Performance Current Active Acoustic Controller (AAC) Mode: AAC mode Disabled Current Active Acoustic Controller (AAC) Mode: Global (AAC enable/disable applies to all supported USTT modes) Current Fan Failure Mode: sudo smbios-thermal-ctl -i Libsmbios version : 2.4.3 smbios-thermal-ctl version : 2.4.3 Print all the Available Thermal Information of your system: ------------------------------------------------------------------- Supported Thermal Modes: Balanced Cool Bottom Quiet Performance Supported Active Acoustic Controller (AAC) modes: Supported AAC Configuration type: Global (AAC enable/disable applies to all supported USTT modes)
At the moment, this is all the fan control we can provide. Since i suppose your also interested in being able to retrieve the fan/thermal sensor readings via sensors, i will add support for it to the dell-wmi-ddv driver, which is expected to land in kernel 6.2. Additionally, dell-smm-hwmon could be made more "silent" when it does not find matching hardware. I will try that too.
Okay, ping me, if You will need to test something. 6.1.0-rc5 is build for kinetic in mainland, so hopefully 6.2 will be too. Anyway, Thank You.
The dell-smm-hwmon driver should be more silent now when it does not find any matching hardware. The necessary change will land in 6.2. Regarding the sensor support inside dell-wmi-ddv: It will likely take a bit longer due to the driver sharing code with the dell-smm-hwmon driver.
I found out that the layout of the thermal buffer is different: Thermal: type Temp current ? Temp max ? The first byte tells us the type of the thermal sensor, the maximum Temperature is encoded in the 4th byte. Do you have Windows installed in a dualboot configuration? If yes, could you send me the contents of the directory "C:\ProgramData\Dell\DellDataVault\Archive\"? It should contain logs regarding the thermal sensors, which could be used to decode the remaining buffer.
Created attachment 303529 [details] DDV-Archive Logs Sure. I packed all files except ones with suffix *.dat. They were too big for archive so I packed only first of them.
Created attachment 303557 [details] hwmon-capable version of the dell-wmi-ddv driver
I finally created a working hwmon-capable prototype of the dell-wmi-ddv driver. Could you test it under a 6.2.0-rcX-series kernel?
Hey Armin I am using Latitude 7430 and has the /sys/bus/wmi/devices/8A42EA14-4F2A-FD45-6422-0087F7A7E608/ path on archlinux I installed the linux-mainline 6.2rc3-1 from archlinuxcn repo and build the latest dell-wmi-ddv driver you provided Seem it works $ sudo smbios-thermal-ctl -g Helper function to Get current Thermal Mode settings Print Current Status of Thermal Information: ------------------------------------------------------------------- Current Thermal Modes: Performance Current Active Acoustic Controller (AAC) Mode: AAC mode Disabled Current Active Acoustic Controller (AAC) Mode: Global (AAC enable/disable applies to all supported USTT modes) Current Fan Failure Mode: $ sudo sensors coretemp-isa-0000 Adapter: ISA adapter Package id 0: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 0: +39.0°C (high = +100.0°C, crit = +100.0°C) Core 4: +39.0°C (high = +100.0°C, crit = +100.0°C) Core 8: +38.0°C (high = +100.0°C, crit = +100.0°C) Core 12: +39.0°C (high = +100.0°C, crit = +100.0°C) Core 16: +38.0°C (high = +100.0°C, crit = +100.0°C) Core 17: +38.0°C (high = +100.0°C, crit = +100.0°C) Core 18: +38.0°C (high = +100.0°C, crit = +100.0°C) Core 19: +38.0°C (high = +100.0°C, crit = +100.0°C) Core 20: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 21: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 22: +42.0°C (high = +100.0°C, crit = +100.0°C) Core 23: +42.0°C (high = +100.0°C, crit = +100.0°C) iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +38.0°C nvme-pci-0100 Adapter: PCI adapter Composite: +35.9°C (low = -273.1°C, high = +82.8°C) (crit = +84.8°C) Sensor 1: +35.9°C (low = -273.1°C, high = +65261.8°C) dell_ddv-virtual-0 Adapter: Virtual device Processor Fan: 1083 RPM CPU: +42.0°C (low = +0.0°C, high = +0.0°C) Other: +38.0°C (low = +0.0°C, high = +0.0°C) Memory: +41.0°C (low = +0.0°C, high = +0.0°C) Other: +40.0°C (low = +0.0°C, high = +0.0°C) Ambient: +42.0°C (low = +0.0°C, high = +0.0°C) Ambient: +43.0°C (low = +0.0°C, high = +0.0°C) temp7: +28.0°C (low = +0.0°C, high = +0.0°C) ucsi_source_psy_USBC000:002-isa-0000 Adapter: ISA adapter in0: 20.00 V (min = +5.00 V, max = +20.00 V) curr1: 2.88 A (max = +2.88 A) ucsi_source_psy_USBC000:001-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) BAT0-acpi-0 Adapter: ACPI interface in0: 16.92 V curr1: 1000.00 uA is it possible we can control the fan speed directly? rather then the Thermal Modes which i think is not very good.
Sadly no, its not possible to control the fan speed directly, at least to without the legacy SMM interface :-(. I noticed that the 7th temperature channel has no associated label, likely because his thermal type is unknown. Could you provide some pictures of the hardware monitoring section inside your BIOS so i can add the missing label? Also it seems most machines do not support the min/max thermal attributes. I will change the driver to not display them if both min and max are 0.
Maybe a BIOS update can fix smbios-thermal-ctl on your Latitude 7430?
Maybe a BIOS update can fix smbios-thermal-ctl on your Latitude 7430? And the BIOS is the latest cat /proc/i8k 1.0 1.9 XXXXX -22 -22 -22 -22 -22 -1 -22 the smbios-thermal-ctl should work $ smbios-thermal-ctl --set-thermal-mode Quiet [sudo] password for jeffrey: Helper function to Set Thermal Mode Thermal Information Set successfully to: Quiet
The lates version seems to be 1.10.0, while yours seems to be 1.9.X.
Also you are better of using dmidecode when checking your BIOS version, i8k/dell-smm-hwmon only displays the first three digits.
Yes, upgrading. BTW, where i can find the `monitoring section inside your BIOS`, I can not found this section. cloud you give me more info ?
If such a section is not available inside your main BIOS menu, then it often can be found inside the builtin diagnostic software (usually available as boot option).
Created attachment 303595 [details] dell 7430 bios sensors
the bios thermals sections is uploaded and the bios is the latest one dmidecode 3.4 Getting SMBIOS data from sysfs. SMBIOS 3.4 present. Handle 0x0001, DMI type 0, 26 bytes BIOS Information Vendor: Dell Inc. Version: 1.10.0 Release Date: 11/14/2022 ROM Size: 32 MB Characteristics: PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported Smart battery is supported BIOS boot specification is supported Function key-initiated network boot is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 1.10 latest sensors is ``` dell_ddv-virtual-0 Adapter: Virtual device Processor Fan: 873 RPM CPU: +42.0°C (low = +0.0°C, high = +0.0°C) Other: +38.0°C (low = +0.0°C, high = +0.0°C) Memory: +42.0°C (low = +0.0°C, high = +0.0°C) Other: +40.0°C (low = +0.0°C, high = +0.0°C) Ambient: +42.0°C (low = +0.0°C, high = +0.0°C) Ambient: +43.0°C (low = +0.0°C, high = +0.0°C) temp7: +27.0°C (low = +0.0°C, high = +0.0°C) ``` smbios-thermal-ctl works too $ sudo smbios-thermal-ctl --set-thermal-mode Performance Helper function to Set Thermal Mode Thermal Information Set successfully to: Performance $ sudo smbios-thermal-ctl -g Helper function to Get current Thermal Mode settings Print Current Status of Thermal Information: ------------------------------------------------------------------- Current Thermal Modes: Performance Current Active Acoustic Controller (AAC) Mode: AAC mode Disabled Current Active Acoustic Controller (AAC) Mode: Global (AAC enable/disable applies to all supported USTT modes) Current Fan Failure Mode:
Created attachment 303596 [details] hwmon-capable version of the dell-wmi-ddv driver
Great, it seems temperature channel 7 is called "DIMM". I uploaded a improved version of the driver, load it and execute sensors, when check dmesg for a message containing "Unknown thermal sensor type:".
Got this dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Unknown thermal sensor type: 0xff
Created attachment 303597 [details] Updated version of the dell-wmi-ddv driver
It is fixed dell_ddv-virtual-0 Adapter: Virtual device Processor Fan: 3713 RPM CPU: +60.0°C (low = +0.0°C, high = +0.0°C) Other: +33.0°C (low = +0.0°C, high = +0.0°C) Memory: +50.0°C (low = +0.0°C, high = +0.0°C) Other: +38.0°C (low = +0.0°C, high = +0.0°C) Ambient: +50.0°C (low = +0.0°C, high = +0.0°C) Ambient: +44.0°C (low = +0.0°C, high = +0.0°C) DIMM: +28.0°C (low = +0.0°C, high = +0.0°C)
Wait, i am confused: "DIMM" is already listed as "Memory", so temperature channel 7 would be "Primary Battery Thermistor", but that is usually not reported thru this interface. Could you provide me with the content of /sys/kernel/debug/dell-wmi-ddv-<GUID>/thermal_sensor_buffer? (needs root to read and even ls!)
Also, could you provide me with the output of acpidump? I might be able to see if the last thermal sensor entry is indeed the battery temperature.
Created attachment 303598 [details] dell 7430 acpidump
like this? sudo hexdump /sys/kernel/debug/dell-wmi-ddv-8A42EA14-4F2A-FD45-6422-0087F7A7E608/thermal_sensor_information 0000000 3800 0000 3300 0021 0000 3022 0000 3300 0000010 0025 0000 2f44 0000 4400 002a 0000 1bff 0000020 0000 ff00 0000024 sudo hexdump -v -e '1/1 "%02x\n"' /sys/kernel/debug/dell-wmi-ddv-8A42EA14-4F2A-FD45-6422-0087F7A7E608/thermal_sensor_information 00 37 00 00 00 33 20 00 00 00 22 2f 00 00 00 33 25 00 00 00 44 30 00 00 00 44 2a 00 00 00 ff 1b 00 00 00 ff > need be out, will reply later.
Created attachment 303599 [details] Updated version of the dell-wmi-ddv driver
now is dell_ddv-virtual-0 Adapter: Virtual device Processor Fan: 1252 RPM CPU: +43.0°C (low = +0.0°C, high = +0.0°C) Other: +38.0°C (low = +0.0°C, high = +0.0°C) Memory: +41.0°C (low = +0.0°C, high = +0.0°C) Other: +40.0°C (low = +0.0°C, high = +0.0°C) Ambient: +42.0°C (low = +0.0°C, high = +0.0°C) Ambient: +44.0°C (low = +0.0°C, high = +0.0°C) Primary Battery: +26.0°C (low = +0.0°C, high = +0.0°C)
Nice, i will modify the driver so he filters out tempX_min/tempX_max attributes which both are zero. Can you check if "/sys/class/power_supply/<battery name>/temp" and "/sys/class/power_supply/<battery name>/eppid" exist?
grep . -R /sys/class/power_supply/BAT0/temp /sys/class/power_supply/BAT0/eppid /sys/class/power_supply/BAT0/temp:302 /sys/class/power_supply/BAT0/eppid:CN0Y86WGSLW0023M85VPA00 dell_ddv-virtual-0 Adapter: Virtual device Processor Fan: 1577 RPM CPU: +44.0°C (low = +0.0°C, high = +0.0°C) Other: +38.0°C (low = +0.0°C, high = +0.0°C) Memory: +42.0°C (low = +0.0°C, high = +0.0°C) Other: +41.0°C (low = +0.0°C, high = +0.0°C) Ambient: +43.0°C (low = +0.0°C, high = +0.0°C) Ambient: +44.0°C (low = +0.0°C, high = +0.0°C) Primary Battery: +28.0°C (low = +0.0°C, high = +0.0°C)
Strange, the battery temperature and the primary battery temperature do not match. I will soon upload a version of the driver which display more diagnostic messages during loading, maybe the battery matching algorithm is faulty.
Created attachment 303604 [details] Updated version of the dell-wmi-ddv driver with additional logging
I uploaded yet another updated version of the driver, can you send me the dmesg output after loading the module and the serial number of your battery (/sys/class/power_supply/<battery>/serial_number)?
$ dmesg [90061.872982] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: WMI interface version: 3 [90061.876521] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 1: 0 [90061.880227] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 2: 0 [90061.883349] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 3: 0 [90061.958579] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Matching battery (0) with index 1 [90061.958593] ACPI: battery: new extension: Dell DDV Battery Extension $ cat /sys/class/power_supply/BAT0/serial_number 7621
So the current battery matching algorithm is indeed faulty, the battery is matched to an index with a (likely) invalid serial number. In case you are running a dualboot configuration with Windows, could you provide me the files inside the directory "C:\ProgramData\Dell\DTP\Logs\DTP.Instrumentation.SubAgent\"? I strongly suspect that they contain information on how the preinstalled Dell software matches the batteries. As for the hwmon part: i already submitted a RFC patch on the mailinglist, it will however take some time as the reviewers/maintainers are currently quite busy.
sorry , my system is linux only, no windows. so can not provide that file.
No problem, i will upload a modified version of the driver later which simply probes all available indices, so we can figure out which index matches to your battery (serial 7621). If you have some knowledge of C, then you can even edit the driver yourself. Just increase the iteration count of the for-loop to 255.
no problem, i can handle this.
Created attachment 303611 [details] Updated version of the dell-wmi-ddv driver with additional logging Increased the iteration count to 255.
Ok, i updated the driver just in case.
Created attachment 303613 [details] Updated version of the dell-wmi-ddv driver with additional logging Forgot to actually pass the index as an argument.
It was my fault, i always passed "0" as the battery index when getting the serial number instead of passing the value from 0 to 255. I fixed it now, it should now log the correct serial numbers.
it this what you wanna? [25486.961197] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: WMI interface version: 3 [25486.966182] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 0: 0 [25486.971184] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 1: 7621 [25486.976518] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 2: 0 ... [25488.289497] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Serial for index 255: 0 [25488.385730] dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: Matching battery (0) with index 1
Yes, this is it. It seems that your battery is indeed matched to the correct index, as both serial numbers match. I dont know why the "Primary battery" sensor measures a different temperature than the method which directly asks for the battery temperature. Can you check if the difference between those two sensors occurs regularly?
Created attachment 303635 [details] Final prototype driver version
The hwmon patch is now ready for upstreaming,i changed the following things: - added additional fan and thermal types found by trial and error (thermal type 0xff is recognized as "Unknown", so i think its not the primary battery) - added support for thermal zones - general code cleanup Could you test it again? If there are no problems, then i will submit the necessary patches for kernel 6.3.
Hello, kernel 6.2.0-rc5 finally arieved into Umuntu Mainland so I can test it out. Your latest version gives me this error: $ make make -C /lib/modules/`uname -r`/build M=`pwd` modules make[1]: Vstupuje se do adresáře „/usr/src/linux-headers-6.2.0-060200rc5-generic“ warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-9ubuntu1) 12.2.0 You are using: gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0 LD [M] /home/tony/Stažené/dell-wmi-ddv/dell-wmi-ddv.ko BTF [M] /home/tony/Stažené/dell-wmi-ddv/dell-wmi-ddv.ko Skipping BTF generation for /home/tony/Stažené/dell-wmi-ddv/dell-wmi-ddv.ko due to unavailability of vmlinux make[1]: Opouští se adresář „/usr/src/linux-headers-6.2.0-060200rc5-generic“ After signing when I try load it: sudo modprobe dell-wmi-ddv modprobe: ERROR: could not insert 'dell_wmi_ddv': Unknown symbol in module, or unknown parameter (see dmesg) But dmesg is empty (no new line appended)
I think you need to also update your compiler used to build the module, and you need to install the appropriate kernel headers.
Are you sure you booted into the right kernel?
Wait, when unloading the dell-wmi-ddv driver, the battery drivee also gets unloaded,leading to such an error message. Reload the module like this: modprobe -r dell-wmi-ddv modprobe battery insmod dell-wmi-ddv
Any progress on the testing?
$ sensors ucsi_source_psy_USBC000:003-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) ucsi_source_psy_USBC000:001-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) coretemp-isa-0000 Adapter: ISA adapter Package id 0: +49.0°C (high = +100.0°C, crit = +100.0°C) Core 0: +45.0°C (high = +100.0°C, crit = +100.0°C) Core 1: +46.0°C (high = +100.0°C, crit = +100.0°C) Core 2: +46.0°C (high = +100.0°C, crit = +100.0°C) Core 3: +50.0°C (high = +100.0°C, crit = +100.0°C) Core 4: +49.0°C (high = +100.0°C, crit = +100.0°C) Core 5: +44.0°C (high = +100.0°C, crit = +100.0°C) Core 6: +48.0°C (high = +100.0°C, crit = +100.0°C) Core 7: +48.0°C (high = +100.0°C, crit = +100.0°C) nvme-pci-e200 Adapter: PCI adapter Composite: +40.9°C (low = -60.1°C, high = +89.8°C) (crit = +94.8°C) ucsi_source_psy_USBC000:004-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +0.00 V, max = +19.50 V) curr1: 6.50 A (max = +6.66 A) ucsi_source_psy_USBC000:002-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A) dell_ddv-virtual-0 Adapter: Virtual device Video Fan: 1251 RPM CPU Fan: 1245 RPM CPU: +48.0°C (low = +0.0°C, high = +0.0°C) NB: +45.0°C (low = +0.0°C, high = +0.0°C) Other: +43.0°C (low = +0.0°C, high = +0.0°C) Other: +46.0°C (low = +0.0°C, high = +0.0°C) Other: +45.0°C (low = +0.0°C, high = +0.0°C) Ambient: +39.0°C (low = +0.0°C, high = +0.0°C) Other: +47.0°C (low = +0.0°C, high = +0.0°C) Other: +31.0°C (low = +0.0°C, high = +0.0°C) Video: +47.0°C (low = +0.0°C, high = +0.0°C) iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +34.0°C nvme-pci-e100 Adapter: PCI adapter Composite: +42.9°C (low = -0.1°C, high = +82.8°C) (crit = +84.8°C) Sensor 1: +35.9°C (low = -273.1°C, high = +65261.8°C) Sensor 2: +38.9°C (low = -273.1°C, high = +65261.8°C) BAT0-acpi-0 Adapter: ACPI interface in0: 12.62 V curr1: 1000.00 uA $ dmesg dell-wmi-ddv 8A42EA14-4F2A-FD45-6422-0087F7A7E608: WMI interface version: 3 Yes, but I have problem with running self signed modules on kernel higher than 5.19. It seems like that there was some change that breaks a way I sign them.
Thanks for the feedback. Since the driver seems to work without issues, i will submit the patch to the kernel mailing list. I will add a Tested-by tag containing your name and email adress, so you get credited with testing the driver, ok?
Created attachment 303653 [details] attachment-17771-0.html Oh, yes. Thank You čt 26. 1. 2023 v 19:26 odesílatel <bugzilla-daemon@kernel.org> napsal: > https://bugzilla.kernel.org/show_bug.cgi?id=216655 > > --- Comment #95 from Armin Wolf (W_Armin@gmx.de) --- > Thanks for the feedback. > > Since the driver seems to work without issues, i will submit the patch to > the > kernel mailing list. I will add a Tested-by tag containing your name and > email > adress, so you get credited with testing the driver, ok? > > -- > You may reply to this email to add a comment. > > You are receiving this mail because: > You reported the bug.
sorry for the delay here is the latest sensors output. Last one become Unknown.. dell_ddv-virtual-0 Adapter: Virtual device CPU Fan: 0 RPM CPU: +34.0°C (low = +0.0°C, high = +0.0°C) Other: +35.0°C (low = +0.0°C, high = +0.0°C) Memory: +33.0°C (low = +0.0°C, high = +0.0°C) Other: +42.0°C (low = +0.0°C, high = +0.0°C) Ambient: +34.0°C (low = +0.0°C, high = +0.0°C) Ambient: +39.0°C (low = +0.0°C, high = +0.0°C) Unknown: +24.0°C (low = +0.0°C, high = +0.0°C)
Just note, when running $ sensors, values from ddv are printed one at time with some delay. Values from other drivers přint immediately.
How long is the delay?
Unloaded: real 0m0,034s user 0m0,005s sys 0m0,000s Loaded: real 0m2,560s user 0m0,000s sys 0m0,907s Running sensors: .... nvme-pci-e200 Adapter: PCI adapter Composite: +39.9°C (low = -60.1°C, high = +89.8°C) (crit = +94.8°C) dell_ddv-virtual-0 Adapter: Virtual device (Printed immediately) (about one second Delay) Video Fan: 975 RPM (each line with small delay) Video: +47.0°C (low = +0.0°C, high = +0.0°C) (Prints immediately) iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +33.0°C ...
Can you provide me with the value of "/sys/class/hwmon/<ddv hwmon device>/device/expensive"? Because this flag usually signals when certain WMI operations are expensive in regard to processing time. I could then implement some caching logic if the problem is too severe.
cat /sys/class/hwmon/hwmon7/device/expensive 0
The reason for this delay is that the WMI interface only allows for querying all sensor values of all sensors present inside the system, so a single slow sensor slows down every single sensor read. The reason for this is that the firmware interface was likely designed for bulk data collection, not for individual sensor access (this could also be the reason why the expensive flag is not set). Since the hwmon sysfs interface mandates individual sensor access, reading a single sensors requires reading all sensors. I will try to implement some caching logic so sequential reading of sensor values does not take 2 seconds anymore. Does reading the sensors cause some sort of stuttering (audio lag, input lag, ..)?
Nothing hearable or visible.
Nice, this means that likely no faulty SMM handler is causing this delay, otherwise the whole machine would freeze for ~1 second. I will modify the driver to cache the sensor buffers for a certain amount of time, this should lessen the impact of the slow sensor speed.
Created attachment 303684 [details] Second iteration of the dell-wmi-ddv driver with hwmon support
The patch series got only partially merged, i was asked change the hwmon part a bit. The changes are: - introduce sensor buffer caching (should speed up sensors and other tools) - fix sensor buffer handling - proper Kconfig handling - style fixes Can you guys please test the driver on your machines again? Armin Wolf
Yes, this is much better. Unloaded: real 0m0,031s user 0m0,000s sys 0m0,006s Loaded: real 0m0,109s user 0m0,000s sys 0m0,030s
Great to hear. I am going to submit the necessary patches soon.
Created attachment 303696 [details] Second iteration of the dell-wmi-ddv driver with hwmon support Now with fixed locking.
And i found an potential issue inside the new caching code.
Could you please test again?
Sure, no noticeable lag, sensors values are changing each sensors run. Seems Ok. Loaded: real 0m0,106s user 0m0,000s sys 0m0,029s Unloaded: real 0m0,031s user 0m0,000s sys 0m0,006s
Created attachment 303702 [details] Second iteration of the dell-wmi-ddv driver with hwmon support Now with fixed suspend/resume handling.
I found just another issue when suspending and resuming the driver. I also enabled async probing to speed up booting on machines with slow sensor reads. Can you guys test the suspend/resume behavior of the updated driver?
Resume/suspend seems ok. Nothing odd shown in dmesg, and laptop sleep/wakes up as always.
The necessary changes are now slated to be included in the upcoming 6.3 release. Thank you all for testing the patches.
Created attachment 303996 [details] Experimental Legacy-Diag-over-WMI driver Experimental driver for issuing legacy diagnostic SMM calls over WMI.
While doing some ACPI research on my Dell notebook, i found another previously unknown WMI interface. It seems this interface can be used to issue SMM calls to access fan and temperature sensors, just like the dell-smm-hwmon driver. Can you compile and load the dell-diag-wmi module and report if any dmesg messages appear?
Interesting... Could you upload WDG and BMF buffers of your WMI interface? There can be something more interested in it (parse them via wmidump and bmfdec).
Created attachment 303997 [details] Inspiron 3505 ACPI tables
Description of WMI interface: Warning: Instance of class is not supported yet Warning: Instance of class is not supported yet Warning: Instance of class is not supported yet Warning: Instance of class is not supported yet Warning: Instance of class is not supported yet Warning: Instance of class is not supported yet #pragma namespace("\\\\.\\root\\dcim\\sysman\\diagnostics") [WMI, Provider("Provider_DiagnosticsServices"), Dynamic, Locale("MS\\0x409"), Description("RunDellDiag"), guid("{F1DDEE52-063C-4784-A11E-8A06684B9B01}")] class LegacyDiags { [key, read] string InstanceName; [read] boolean Active; [WmiMethodId(1), Implemented, read, write, Description("Legacy Method ")] void Execute([in, out] uint32 EaxLen, [in, out, WmiSizeIs("EaxLen") : ToInstance] uint8 EaxVal[], [in, out] uint32 EbxLen, [in, out, WmiSizeIs("EbxLen") : ToInstance] uint8 EbxVal[], [in, out] uint32 EcxLen, [in, out, WmiSizeIs("EcxLen") : ToInstance] uint8 EcxVal[], [in, out] uint32 EdxLen, [in, out, WmiSizeIs("EdxLen") : ToInstance] uint8 EdxVal[]); };`
Hi, I just got hands on kernel 6.3.1. DDV works great in sensors and are quite fast. Thank You real 0m0,100s user 0m0,001s sys 0m0,026s
Great to hear. You may mark this bug report as resolved then.