Bug 218188
Summary: | hp_wmi_sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -61 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Alexis Belmonte (alexbelm48) |
Component: | Platform_x86 | Assignee: | drivers_platform_x86 (drivers_platform_x86) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | W_Armin |
Priority: | P3 | ||
Hardware: | Intel | ||
OS: | Linux | ||
Kernel Version: | 6.7.0-rc2-next-20231127-00886-g24ce78c0188c | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
ACPI dump & disassembly + BMOF and MOF files from the ck2000nf (8BAD) board
dmesg logs after wmi fix |
It seems that the ACPI tables contain only stub methods for the HPBIOS_BIOSNumericSensor WMI class and also signal that only zero instances are available. It seems your device does not support any HPBIOS_BIOSNumericSensor classes, maybe the dummy WMI device is used by HP to ensure that the MOF data of the HPBIOS_BIOSNumericSensor class is loaded into the WMI repository when running Windows. I think the WMI core can prevent WMI drivers from probing such devices. Can you check if the following patch makes the WMI device with the GUID 8F1F6435-9F42-42C8-BADC-0E9424F20C9A disappear: From 19edb8bd7368c7ca93268f60d17ee60125354356 Mon Sep 17 00:00:00 2001 From: Armin Wolf <W_Armin@gmx.de> Date: Sat, 25 Nov 2023 16:46:06 +0100 Subject: [PATCH] platform/x86: wmi: Skip blocks with zero instances Some machines like the HP Omen 17 ck2000nf contain WMI blocks with zero instances, so any WMI driver which tries to handle the associated WMI device will fail. Skip such WMI blocks to avoid confusing any WMI drivers. Signed-off-by: Armin Wolf <W_Armin@gmx.de> --- drivers/platform/x86/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 5c27b4aa9690..f3d38b910e15 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1340,6 +1340,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev) if (debug_dump_wdg) wmi_dump_wdg(&gblock[i]); + if (!gblock->instance_count) { + dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid); + continue; + } + if (guid_already_parsed_for_legacy(device, &gblock[i].guid)) continue; -- 2.39.2 I still have the same error printed out when manually inserting hp_wmi_sensors -- I also noticed that wmi_bus complains about WQ00 not being there: # dmesg|grep wmi [ 2.074660] wmi_bus wmi_bus-PNP0C14:00: WQ00 data block query control method not found [ 30.175458] hp-wmi-sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -61 I can confirm that the situation did not change, I made sure that I didn't do something wrong by executing the following command to clean, build & install the kernel: $ make -j64 clean && make -j64 all modules bzImage && sudo make -j64 modules_install && sudo cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-linux-next && sudo mkinitcpio -p linux-next && sudo grub-mkconfig -o /boot/grub/grub.cfg For your information, I integrated next-20231124 in my working source tree; let me know if you want me to test this on the mainline codebase instead. It seems that installing nvidia-dkms alongside the kernel that I built helps a bit with the problem -- I think this makes sense since the GPU chip would have zero power management without the proper drivers. However, I still observe that even if my CPU temps skyrocket to 95°C, my fans still do not spin as fast as they should. Oops, i messed up the patch, one moment. Can you try this one: From ecbb0f5eeab921baf51270e554d432ec09ae9b5c Mon Sep 17 00:00:00 2001 From: Armin Wolf <W_Armin@gmx.de> Date: Sat, 25 Nov 2023 16:46:06 +0100 Subject: [PATCH] platform/x86: wmi: Skip blocks with zero instances Some machines like the HP Omen 17 ck2000nf contain WMI blocks with zero instances, so any WMI driver which tries to handle the associated WMI device will fail. Skip such WMI blocks to avoid confusing any WMI drivers. Signed-off-by: Armin Wolf <W_Armin@gmx.de> --- drivers/platform/x86/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 5c27b4aa9690..5dd22258cb3b 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1340,6 +1340,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev) if (debug_dump_wdg) wmi_dump_wdg(&gblock[i]); + if (!gblock[i].instance_count) { + dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid); + continue; + } + if (guid_already_parsed_for_legacy(device, &gblock[i].guid)) continue; -- 2.39.2 This seems to work, I get the messages as expected in the kernel logs and there's no error regarding hp_wmi_sensors: # dmesg | grep wmi [ 2.040776] wmi_bus wmi_bus-PNP0C14:00: WQ00 data block query control method not found [ 2.041019] wmi_bus wmi_bus-PNP0C14:03: [Firmware Info]: 8F1F6436-9F42-42C8-BADC-0E9424F20C9A has zero instances [ 2.041020] wmi_bus wmi_bus-PNP0C14:03: [Firmware Info]: 8F1F6435-9F42-42C8-BADC-0E9424F20C9A has zero instances [ 2.041021] wmi_bus wmi_bus-PNP0C14:03: [Firmware Info]: 7391A661-223A-47DB-A77A-7BE84C60822D has zero instances [ 2.041021] wmi_bus wmi_bus-PNP0C14:03: [Firmware Info]: DF4E63B6-3BBC-4858-9737-C74F82F821F3 has zero instances Once thing that I'm wondering is why hp_wmi_sensors isn't loaded at boot. It seems that the fans now scale up properly though, so that's good! Another thing which is really weird is that even though I set the "performance" power profile through Gnome (and through powerprofilesctl indirectly), my TDP scales back down to max 55W. Looking at /sys/firmware/acpi/platform_profile, it shows back "balanced" -- choosing "performance" again makes /sys/firmware/acpi/platform_profile output "performance" again until the CPU goes idle after a short while. Do you have any idea as to why is this happening? I have nothing really relevant in the dmesg logs, although I'm still going to attach it there if you need it. Created attachment 305472 [details]
dmesg logs after wmi fix
What modules are currently loaded (output of lsmod)? Since the WMI patch solves some of your problems, i will submit it upstream, ok? I'm okay with that -- as I've said I've also added my board to the list of supported omen power profiles, here's my patch if you are OK integrating it in your submit: From 0236139ee5d239cb90b6d1ec8bff2fe6ace4cca3 Mon Sep 17 00:00:00 2001 From: Alexis Belmonte <alexbelm48@gmail.com> Date: Wed, 22 Nov 2023 20:41:08 +0100 Subject: [PATCH] hp-wmi: Add identification support for ck2xxx/8BAD boards This modification adds identification support for ck2xxx boards, also known as 8BAD from an ACPI/WMI standpoint. This allows the CPU to go higher than the artificial 55W TDP barrier caused by the embedded controller not receiving commands to allow higher power usage. --- drivers/platform/x86/hp/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c index 8ebb7be52ee7..c781d2f8140d 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -55,7 +55,7 @@ static const char * const omen_thermal_profile_boards[] = { "874A", "8603", "8604", "8748", "886B", "886C", "878A", "878B", "878C", "88C8", "88CB", "8786", "8787", "8788", "88D1", "88D2", "88F4", "88FD", "88F5", "88F6", "88F7", "88FE", "88FF", "8900", "8901", "8902", "8912", - "8917", "8918", "8949", "894A", "89EB" + "8917", "8918", "8949", "894A", "89EB", "8BAD" }; /* DMI Board names of Omen laptops that are specifically set to be thermal -- 2.43.0 As for lsmod: Module Size Used by iwlmvm 712704 0 iwlwifi 573440 1 iwlmvm ccm 20480 6 uinput 20480 1 rfcomm 102400 7 snd_seq_dummy 12288 0 snd_hrtimer 12288 1 snd_seq 131072 7 snd_seq_dummy snd_seq_device 16384 1 snd_seq cmac 12288 3 algif_hash 12288 1 algif_skcipher 12288 1 af_alg 36864 6 algif_hash,algif_skcipher bnep 36864 2 snd_ctl_led 24576 0 snd_soc_skl_hda_dsp 24576 5 snd_soc_hdac_hdmi 45056 1 snd_soc_skl_hda_dsp snd_sof_probes 24576 0 snd_soc_intel_hda_dsp_common 16384 1 snd_soc_skl_hda_dsp snd_hda_codec_realtek 196608 1 intel_uncore_frequency 12288 0 snd_hda_codec_generic 114688 1 snd_hda_codec_realtek vfat 20480 1 intel_uncore_frequency_common 16384 1 intel_uncore_frequency fat 106496 1 vfat ledtrig_audio 12288 2 snd_ctl_led,snd_hda_codec_generic snd_soc_dmic 12288 1 snd_sof_pci_intel_tgl 12288 2 snd_sof_intel_hda_common 249856 1 snd_sof_pci_intel_tgl soundwire_intel 81920 1 snd_sof_intel_hda_common x86_pkg_temp_thermal 16384 0 snd_sof_intel_hda_mlink 36864 2 soundwire_intel,snd_sof_intel_hda_common intel_powerclamp 20480 0 soundwire_cadence 45056 1 soundwire_intel mac80211 1568768 1 iwlmvm mousedev 24576 0 joydev 24576 0 snd_sof_intel_hda 24576 1 snd_sof_intel_hda_common snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common snd_sof 434176 4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_probes,snd_sof_intel_hda coretemp 16384 0 kvm_intel 425984 0 snd_sof_utils 16384 1 snd_sof snd_soc_hdac_hda 28672 1 snd_sof_intel_hda_common btusb 86016 0 snd_hda_ext_core 36864 5 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda_mlink,snd_sof_intel_hda btrtl 32768 1 btusb snd_soc_acpi_intel_match 98304 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl btintel 57344 1 btusb btbcm 24576 1 btusb snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common btmtk 12288 1 btusb soundwire_generic_allocation 12288 1 soundwire_intel kvm 1376256 1 kvm_intel soundwire_bus 139264 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence libarc4 12288 1 mac80211 bluetooth 1114112 42 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm snd_soc_core 462848 8 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_probes,snd_soc_dmic,snd_soc_skl_hda_dsp snd_hda_codec_hdmi 94208 2 snd_compress 28672 2 snd_soc_core,snd_sof_probes ac97_bus 12288 1 snd_soc_core snd_pcm_dmaengine 16384 1 snd_soc_core irqbypass 12288 1 kvm snd_hda_intel 65536 1 crct10dif_pclmul 12288 1 usbhid 77824 0 snd_intel_dspcfg 40960 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common crc32_pclmul 12288 0 ecdh_generic 16384 2 bluetooth snd_intel_sdw_acpi 16384 2 snd_sof_intel_hda_common,snd_intel_dspcfg polyval_clmulni 12288 0 polyval_generic 12288 1 polyval_clmulni snd_hda_codec 225280 8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_soc_hdac_hda,snd_sof_intel_hda,snd_soc_skl_hda_dsp gf128mul 16384 1 polyval_generic ghash_clmulni_intel 16384 0 uvcvideo 176128 0 sha512_ssse3 53248 0 sha256_ssse3 32768 0 snd_hda_core 151552 11 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda sha1_ssse3 32768 0 processor_thermal_device_pci 16384 0 aesni_intel 360448 8 processor_thermal_device 20480 1 processor_thermal_device_pci videobuf2_vmalloc 20480 1 uvcvideo crypto_simd 16384 1 aesni_intel uvc 12288 1 uvcvideo cryptd 28672 3 crypto_simd,ghash_clmulni_intel snd_hwdep 20480 1 snd_hda_codec processor_thermal_wt_hint 16384 2 processor_thermal_device_pci,processor_thermal_device videobuf2_memops 16384 1 videobuf2_vmalloc cfg80211 1335296 3 iwlmvm,iwlwifi,mac80211 processor_thermal_rfim 28672 1 processor_thermal_device mei_hdcp 28672 0 videobuf2_v4l2 40960 1 uvcvideo mei_pxp 20480 0 rapl 20480 0 thunderbolt 532480 0 snd_pcm 204800 13 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine r8169 114688 0 intel_cstate 20480 0 videodev 393216 2 videobuf2_v4l2,uvcvideo spi_nor 163840 0 processor_thermal_rapl 16384 1 processor_thermal_device mei_me 57344 2 intel_rapl_msr 20480 0 ucsi_acpi 12288 0 hp_wmi 28672 0 snd_timer 53248 3 snd_seq,snd_hrtimer,snd_pcm intel_rapl_common 40960 2 intel_rapl_msr,processor_thermal_rapl typec_ucsi 65536 1 ucsi_acpi realtek 40960 1 iTCO_wdt 16384 0 intel_lpss_pci 24576 0 mdio_devres 12288 1 r8169 intel_pmc_bxt 16384 1 iTCO_wdt intel_uncore 258048 0 processor_thermal_wt_req 12288 1 processor_thermal_device sparse_keymap 12288 1 hp_wmi snd 155648 28 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_pcm iTCO_vendor_support 12288 1 iTCO_wdt nvidia_drm 114688 4 mei 204800 5 mei_hdcp,mei_pxp,mei_me libphy 233472 3 r8169,mdio_devres,realtek typec 114688 1 typec_ucsi intel_lpss 16384 1 intel_lpss_pci processor_thermal_power_floor 12288 2 processor_thermal_device_pci,processor_thermal_device platform_profile 12288 1 hp_wmi i2c_i801 40960 0 mtd 110592 3 spi_nor nvidia_modeset 1585152 3 nvidia_drm i2c_hid_acpi 12288 0 idma64 20480 0 wmi_bmof 12288 0 pcspkr 12288 0 rfkill 40960 10 hp_wmi,iwlmvm,bluetooth,cfg80211 processor_thermal_mbox 12288 4 processor_thermal_power_floor,processor_thermal_wt_req,processor_thermal_rfim,processor_thermal_wt_hint i2c_smbus 20480 1 i2c_i801 nvidia_wmi_ec_backlight 12288 0 soundcore 16384 2 snd_ctl_led,snd roles 16384 1 typec_ucsi videobuf2_common 94208 4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops i2c_hid 40960 1 i2c_hid_acpi int340x_thermal_zone 16384 1 processor_thermal_device acpi_tad 20480 0 acpi_pad 24576 0 soc_button_array 20480 0 mc 90112 4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common mac_hid 12288 0 vmw_vmci 135168 0 nvidia_uvm 3506176 0 nvidia 62390272 47 nvidia_uvm,nvidia_modeset dm_mod 225280 0 sg 49152 0 fuse 212992 7 crypto_user 20480 0 loop 36864 0 ip_tables 36864 0 x_tables 69632 1 ip_tables ext4 1175552 2 crc32c_generic 12288 0 crc16 12288 2 bluetooth,ext4 mbcache 16384 1 ext4 jbd2 221184 1 ext4 rtsx_pci_sdmmc 32768 0 mmc_core 270336 1 rtsx_pci_sdmmc serio_raw 16384 0 nvme 65536 5 atkbd 40960 0 nvme_core 217088 6 nvme libps2 20480 1 atkbd rtsx_pci 131072 1 rtsx_pci_sdmmc spi_intel_pci 12288 0 vivaldi_fmap 12288 1 atkbd xhci_pci 28672 0 spi_intel 36864 1 spi_intel_pci crc32c_intel 16384 4 xhci_pci_renesas 24576 1 xhci_pci i8042 53248 0 serio 28672 4 serio_raw,atkbd,i8042 i915 4202496 71 i2c_algo_bit 20480 1 i915 drm_buddy 20480 1 i915 video 77824 3 nvidia_wmi_ec_backlight,i915,nvidia_modeset wmi 45056 4 hp_wmi,video,nvidia_wmi_ec_backlight,wmi_bmof ttm 110592 1 i915 intel_gtt 28672 1 i915 drm_display_helper 237568 1 i915 cec 86016 2 drm_display_helper,i915 Thanks a lot for troubleshooting & fixing my issue, I really appreciate it :] For "supported omen power profiles", I actually meant "supported Omen boards" :-] It seems that there's some regressions that I'm observing now regarding the stability of the system with the custom built kerenl: - My Elan touchpad no longer works - The Nvidia driver randomly freezes (maybe not related, but still adding it here just in case) I'll try to do two things: - Use the default kernel config and rebuild everything - Remove the patch that you've provided me I'll send the results once that's done. I also wanted to add that the /sys/firmware/acpi/platform_profile bug is not reproducible on the mainline kernel without my hp-wmi patch, so there's definitely something that needs to be done here as well.. :§ So this is definitely a problem in my local workspace and not an issue from mainline.. I have no clue why but this isn't the focus of this issue. So the WMI patch could be the reason for the regressions? I don't think so, I've removed the WMI patch and I still observe the same issue with my touchpad. I'll try to pull to a newer linux-next version with our patches & recompile my kernel tomorrow and I'll tell you if this helps or not. As for the driver freezing, this was caused by a hardware problem -- a bit of cleaning, dusting and RAM reseating helped a lot. :] That didn't help, but I noticed that I put acpi_osi="Linuw"... and although there's no _OSI branches in my SSDT/DSDT tables, I just want to make sure that this has a correct value. I also noticed the PINCTRL_INTEL_PLATFORM .config option set to 'n' instead of 'y', I'll also try that next and tell you if this helps. I also want to point out that I still have the /sys/firmware/acpi/platform_profile bug. Your DSDT ACPI table contains calls to _OSI, can you try if removing acpi_osi="Linux" helps? Since the WMI patch seems to be fine, i will post it upstream then. Removing the acpi_osi parameter didn't help. And PINCTRL_INTEL_PLATFORM makes my system stuck on initramfs... :[ I believe linux-next OR my WMI patch messes up my EC so badly that it makes my laptop freeze after a couple of minutes, to the point that it requires me to reset my UEFI settings... I'll try to compile the stable repo with my patch and see if this both fixes my touchpad/Nvidia issues AND makes my laptop alive even if I add back my WMI patch... I'll also integrate yours as well just in case, of course. Seems to work fine with our patches on mainline, so I guess I'll stay on this for now. As there's no more errors regarding this module, I'll close this bug report; Thanks for your help and your time, I appreciate it! |
Created attachment 305470 [details] ACPI dump & disassembly + BMOF and MOF files from the ck2000nf (8BAD) board I've installed ArchLinux on my HP Omen 17 ck2000nf laptop, and I've noticed that the hp_wmi_sensors module isn't loaded automatically by the kernel. Modprobing manually, the hp-wmi-sensors module fails to load with a -61 (ENODATA) error: [ 350.834728] hp-wmi-sensors: probe of 8F1F6435-9F42-42C8-BADC-0E9424F20C9A failed with error -61 Peeking at the MOF files after dumping them with bmf2mof, the WMI HPBIOS_BIOSNumericSensor object is defined as expected: #pragma namespace("\\\\.\\root\\HP\\InstrumentedBIOS") #pragma classflags("forceupdate") [WMI, Dynamic, Provider("Provider_BIOSInterface"), Description("Class Sensor Data"), GUID("{8F1F6435-9F42-42c8-BADC-0E9424F20C9A}")] class HPBIOS_BIOSNumericSensor : HP_BIOSNumericSensor { [key, read] string InstanceName; [read] boolean Active; [WmiDataId(7), read] string PossibleStates[3]; }; The only thing that's odd is that there's a lowercase 'c' in the GUID string, but *maybe* it's just an issue with the bmf2mof tool. Could it be the source of the problem? I run linux-next kernel 6.7.0-rc2-next-20231124-00403-g4bdf9e948c23, as I have modified hp-wmi to add my board (8BAD) to the list of supported omen_thermal_profile_boards, so that my CPU isn't power limited by my embedded controller. The issue is also observable with mainline 6.6.2-arch1-1. I'm also dropping in my full set of raw/dumped MOF and ACPI files in the attachment, if that can help troubleshoot the issue.