mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: hp-wmi: Hide bogus fan RPM on HP ENVY x360 13-bd0xxx
@ 2026-03-29  5:20 Bani Brata
  0 siblings, 0 replies; 3+ messages in thread
From: Bani Brata @ 2026-03-29  5:20 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Hans de Goede, Ilpo Järvinen, linux-kernel, Bani Brata

On the HP ENVY x360 Convertible 13-bd0xxx (board 8824), the WMI
interfaces for reading fan speed (HPWMI_FAN_SPEED_GET_QUERY) return
zero-filled buffers regardless of the actual fan speed.

This results in the hp_wmi driver exposing `fan1_input` and `fan2_input`
nodes through hwmon that permanently report "0 RPM", which is misleading
and interferes with userspace sensor monitoring tools.

Add a DMI quirk to disable exposing the hwmon fan nodes on this specific
board.

Signed-off-by: Bani Brata <banibrata2007@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index XXXXXXX..XXXXXXX 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -192,6 +192,18 @@ static const struct dmi_system_id hp_wmi_rfkill_dmi_table[] __initconst = {
 };
 
 static bool is_victus_s_board;
+static bool is_envy_x360_8824_board;
+
+static const struct dmi_system_id hp_envy_x360_8824_boards[] __initconst = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 13-bd0xxx"),
+			DMI_MATCH(DMI_BOARD_NAME, "8824"),
+		},
+	},
+	{},
+};
 
 enum hp_wmi_radio {
 	HPWMI_WIFI	= 0x0,
@@ -2166,6 +2178,8 @@ static umode_t hp_wmi_hwmon_is_visible(const void *data,
 	case hwmon_pwm:
 		return 0644;
 	case hwmon_fan:
+		if (is_envy_x360_8824_board)
+			return 0;
 		if (is_victus_s_thermal_profile()) {
 			if (hp_wmi_get_fan_speed_victus_s(channel) >= 0)
 				return 0444;
@@ -2188,6 +2202,8 @@ static int hp_wmi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
 
 	switch (type) {
 	case hwmon_fan:
+		if (is_envy_x360_8824_board)
+			return -EOPNOTSUPP;
 		if (is_victus_s_thermal_profile())
 			ret = hp_wmi_get_fan_speed_victus_s(channel);
 		else
@@ -2281,6 +2297,8 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
 {
 	const struct dmi_system_id *id;
 
+	is_envy_x360_8824_board = dmi_first_match(hp_envy_x360_8824_boards);
+
 	/*
 	 * Currently only victus_s devices use the
 	 * active_thermal_profile_params
-- 
2.48.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: hp-wmi: Hide bogus fan RPM on HP ENVY x360 13-bd0xxx
  2026-03-29  5:40 Bani Brata
@ 2026-03-31 13:25 ` Ilpo Järvinen
  0 siblings, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2026-03-31 13:25 UTC (permalink / raw)
  To: Bani Brata, Krishna Chomal; +Cc: platform-driver-x86, Hans de Goede, LKML

On Sun, 29 Mar 2026, Bani Brata wrote:

> On the HP ENVY x360 Convertible 13-bd0xxx (board 8824), the WMI
> interfaces for reading fan speed (HPWMI_FAN_SPEED_GET_QUERY) return
> zero-filled buffers regardless of the actual fan speed.
> 
> This results in the hp_wmi driver exposing `fan1_input` and `fan2_input`
> nodes through hwmon that permanently report "0 RPM", which is misleading
> and interferes with userspace sensor monitoring tools.
> 
> Add a DMI quirk to disable exposing the hwmon fan nodes on this specific
> board.
> 
> Signed-off-by: Bani Brata <banibrata2007@gmail.com>
> ---
>  drivers/platform/x86/hp/hp-wmi.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index XXXXXXX..XXXXXXX 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -192,6 +192,18 @@ static const struct dmi_system_id hp_wmi_rfkill_dmi_table[] __initconst = {
>  };
>  
>  static bool is_victus_s_board;
> +static bool is_envy_x360_8824_board;
> +
> +static const struct dmi_system_id hp_envy_x360_8824_boards[] __initconst = {
> +	{
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 13-bd0xxx"),
> +			DMI_MATCH(DMI_BOARD_NAME, "8824"),
> +		},
> +	},
> +	{},
> +};
>  
>  enum hp_wmi_radio {
>  	HPWMI_WIFI	= 0x0,
> @@ -2166,6 +2178,8 @@ static umode_t hp_wmi_hwmon_is_visible(const void *data,
>  	case hwmon_pwm:
>  		return 0644;
>  	case hwmon_fan:
> +		if (is_envy_x360_8824_board)
> +			return 0;
>  		if (is_victus_s_thermal_profile()) {
>  			if (hp_wmi_get_fan_speed_victus_s(channel) >= 0)
>  				return 0444;
> @@ -2188,6 +2202,8 @@ static int hp_wmi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
>  
>  	switch (type) {
>  	case hwmon_fan:
> +		if (is_envy_x360_8824_board)
> +			return -EOPNOTSUPP;
>  		if (is_victus_s_thermal_profile())
>  			ret = hp_wmi_get_fan_speed_victus_s(channel);
>  		else
> @@ -2281,6 +2297,8 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
>  {
>  	const struct dmi_system_id *id;
>  
> +	is_envy_x360_8824_board = dmi_first_match(hp_envy_x360_8824_boards);
> +
>  	/*
>  	 * Currently only victus_s devices use the
>  	 * active_thermal_profile_params

So does this mean we can't get fan speeds at all with this device?

(This approach is written very specific to a model and should be 
generalized if there really isn't any way to get the speeds.)

I've Krishna Chomal who might have better ideas than me.

-- 
 i.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] platform/x86: hp-wmi: Hide bogus fan RPM on HP ENVY x360 13-bd0xxx
@ 2026-03-29  5:40 Bani Brata
  2026-03-31 13:25 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Bani Brata @ 2026-03-29  5:40 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Hans de Goede, Ilpo Järvinen, linux-kernel, Bani Brata

On the HP ENVY x360 Convertible 13-bd0xxx (board 8824), the WMI
interfaces for reading fan speed (HPWMI_FAN_SPEED_GET_QUERY) return
zero-filled buffers regardless of the actual fan speed.

This results in the hp_wmi driver exposing `fan1_input` and `fan2_input`
nodes through hwmon that permanently report "0 RPM", which is misleading
and interferes with userspace sensor monitoring tools.

Add a DMI quirk to disable exposing the hwmon fan nodes on this specific
board.

Signed-off-by: Bani Brata <banibrata2007@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index XXXXXXX..XXXXXXX 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -192,6 +192,18 @@ static const struct dmi_system_id hp_wmi_rfkill_dmi_table[] __initconst = {
 };
 
 static bool is_victus_s_board;
+static bool is_envy_x360_8824_board;
+
+static const struct dmi_system_id hp_envy_x360_8824_boards[] __initconst = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY x360 Convertible 13-bd0xxx"),
+			DMI_MATCH(DMI_BOARD_NAME, "8824"),
+		},
+	},
+	{},
+};
 
 enum hp_wmi_radio {
 	HPWMI_WIFI	= 0x0,
@@ -2166,6 +2178,8 @@ static umode_t hp_wmi_hwmon_is_visible(const void *data,
 	case hwmon_pwm:
 		return 0644;
 	case hwmon_fan:
+		if (is_envy_x360_8824_board)
+			return 0;
 		if (is_victus_s_thermal_profile()) {
 			if (hp_wmi_get_fan_speed_victus_s(channel) >= 0)
 				return 0444;
@@ -2188,6 +2202,8 @@ static int hp_wmi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
 
 	switch (type) {
 	case hwmon_fan:
+		if (is_envy_x360_8824_board)
+			return -EOPNOTSUPP;
 		if (is_victus_s_thermal_profile())
 			ret = hp_wmi_get_fan_speed_victus_s(channel);
 		else
@@ -2281,6 +2297,8 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
 {
 	const struct dmi_system_id *id;
 
+	is_envy_x360_8824_board = dmi_first_match(hp_envy_x360_8824_boards);
+
 	/*
 	 * Currently only victus_s devices use the
 	 * active_thermal_profile_params
-- 
2.48.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-31 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-29  5:20 [PATCH] platform/x86: hp-wmi: Hide bogus fan RPM on HP ENVY x360 13-bd0xxx Bani Brata
2026-03-29  5:40 Bani Brata
2026-03-31 13:25 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®