You are not logged in.

#26 2024-12-01 19:34:15

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: No asus_nb_wmi in 6.12.1 kernels

There goes that theory, but apparently there's a promising patch anyway.

Offline

#27 2024-12-01 20:02:47

loqs
Member
Registered: 2014-03-06
Posts: 18,130

Re: No asus_nb_wmi in 6.12.1 kernels

seth wrote:

There goes that theory, but apparently there's a promising patch anyway.

Sadly the first hunk breaks the build when applied to 6.12.1:

drivers/platform/x86/asus-wmi.c: In function ‘fan_boost_mode_write’:
drivers/platform/x86/asus-wmi.c:3116:38: error: ‘retval’ undeclared (first use in this function)
 3116 |                                     &retval);
      |                                      ^~~~~~
drivers/platform/x86/asus-wmi.c:3116:38: note: each undeclared identifier is reported only once for each function it appears in
  CC [M]  fs/vboxsf/dir.o
drivers/platform/x86/asus-wmi.c: In function ‘throttle_thermal_policy_write’:
drivers/platform/x86/asus-wmi.c:3699:13: warning: unused variable ‘retval’ [-Wunused-variable]
 3699 |         u32 retval;

Hopefully this will build:

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index abdca3f05c5c..f66c25e3da18 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -3697,11 +3697,10 @@ static int asus_wmi_custom_fan_curve_init(struct asus_wmi *asus)
 static int throttle_thermal_policy_write(struct asus_wmi *asus)
 {
 	u8 value = asus->throttle_thermal_policy_mode;
-	u32 retval;
 	int err;
 
-	err = asus_wmi_set_devstate(asus->throttle_thermal_policy_dev,
-				    value, &retval);
+	/* Some machines do not return an error code as a result, so we ignore it */
+	err = asus_wmi_set_devstate(asus->throttle_thermal_policy_dev, value, NULL);
 
 	sysfs_notify(&asus->platform_device->dev.kobj, NULL,
 			"throttle_thermal_policy");
@@ -3711,12 +3710,6 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
 		return err;
 	}
 
-	if (retval != 1) {
-		pr_warn("Failed to set throttle thermal policy (retval): 0x%x\n",
-			retval);
-		return -EIO;
-	}
-
 	/* Must set to disabled if mode is toggled */
 	if (asus->cpu_fan_curve_available)
 		asus->custom_fan_curves[FAN_CURVE_DEV_CPU].enabled = false;

Edit:
6.12.1-arch1 with adjusted patch applied:
linux-6.12.1.arch1-1.4-x86_64.pkg.tar.zst/linux-headers-6.12.1.arch1-1.4-x86_64.pkg.tar.zst

Last edited by loqs (2024-12-01 20:23:06)

Offline

#28 2024-12-02 02:31:10

poten17750
Member
Registered: 2024-12-02
Posts: 2

Re: No asus_nb_wmi in 6.12.1 kernels

I just downloaded and compiled Linux Kernel 6.13-rc1. And this is the dmesg log

KERNEL 6.13-rc1

$ sudo dmesg | grep asus
[    1.885087] asus_wmi: ASUS WMI generic driver loaded
[    1.894470] asus_wmi: Initialization: 0x1
[    1.894760] asus_wmi: SFUN value: 0x21
[    1.894766] asus-nb-wmi asus-nb-wmi: Detected ATK, not ASUSWMI, use DSTS
[    1.928548] asus_wmi: Failed to set throttle thermal policy (retval): 0x0
[    1.928554] asus_wmi: Failed to set default thermal profile
[    1.928561] asus-nb-wmi asus-nb-wmi: probe with driver asus-nb-wmi failed with error -5

$ sudo tlp-stat -b
--- TLP 1.7.0 --------------------------------------------

+++ Battery Care
Plugin: asus
Supported features: none available
Driver usage:
* natacpi (asus_wmi) = inactive (laptop not supported)

+++ Battery Status: BATT
/sys/class/power_supply/BATT/manufacturer                   = ASUSTeK
/sys/class/power_supply/BATT/model_name                     = UM5302
/sys/class/power_supply/BATT/cycle_count                    =    193
/sys/class/power_supply/BATT/charge_full_design             =   4220 [mAh]
/sys/class/power_supply/BATT/charge_full                    =   3901 [mAh]
/sys/class/power_supply/BATT/charge_now                     =   3120 [mAh]
/sys/class/power_supply/BATT/current_now                    =      0 [mA]
/sys/class/power_supply/BATT/status                         = Not charging

Also not all keyboard hotkey is working

  • F1 Volume toggle ✅

  • F2 Volume down ✅

  • F3 Volume up ✅

  • F4  Decreases brightness ✅

  • F5  Increase brightness ✅

  • F6 Touchpad toggle ❌

  • F7 Backlit keyboard brightness control ❌

  • F9 Microphone toggle ❌

KERNEL 6.11.10 (For reference)

$ sudo dmesg | grep asus
[    3.444053] asus_wmi: ASUS WMI generic driver loaded
[    3.468576] asus_wmi: Initialization: 0x1
[    3.468892] asus_wmi: SFUN value: 0x21
[    3.468898] asus-nb-wmi asus-nb-wmi: Detected ATK, not ASUSWMI, use DSTS
[    3.497565] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input10

$ sudo tlp-stat -b
--- TLP 1.7.0 --------------------------------------------

+++ Battery Care
Plugin: asus
Supported features: charge threshold
Driver usage:
* natacpi (asus_wmi) = active (charge threshold)
Parameter value range:
* STOP_CHARGE_THRESH_BAT0/1: 1..100(default)

+++ Battery Status: BATT
/sys/class/power_supply/BATT/manufacturer                   = ASUSTeK
/sys/class/power_supply/BATT/model_name                     = UM5302
/sys/class/power_supply/BATT/cycle_count                    =    193
/sys/class/power_supply/BATT/charge_full_design             =   4220 [mAh]
/sys/class/power_supply/BATT/charge_full                    =   3901 [mAh]
/sys/class/power_supply/BATT/charge_now                     =   3120 [mAh]
/sys/class/power_supply/BATT/current_now                    =      0 [mA]
/sys/class/power_supply/BATT/status                         = Not charging

/sys/class/power_supply/BATT/charge_control_end_threshold   =     80 [%]

I think I will go back to 6.11.10 until the fix arrives

Last edited by poten17750 (2024-12-02 14:18:14)

Offline

#29 2024-12-02 07:59:45

seth
Member
Registered: 2012-09-03
Posts: 59,882

Re: No asus_nb_wmi in 6.12.1 kernels

Please rather try the kernel loqs posted in #27 (two posts above this one)

Offline

#30 2024-12-02 10:48:35

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 782
Website

Re: No asus_nb_wmi in 6.12.1 kernels

Yeah and also we can only expect fixes for known/reported problems, I think it would be good to determine the root cause of the mentioned issues.

Offline

#31 2024-12-02 12:57:06

loqs
Member
Registered: 2014-03-06
Posts: 18,130

Re: No asus_nb_wmi in 6.12.1 kernels

@poten17750 do all the issues you encountered with your 6.13-rc1 build also occur when using gromit's build?

sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-6.13rc1-1-x86_64.pkg.tar.zst

Offline

#32 2024-12-02 14:20:27

poten17750
Member
Registered: 2024-12-02
Posts: 2

Re: No asus_nb_wmi in 6.12.1 kernels

loqs wrote:

@poten17750 do all the issues you encountered with your 6.13-rc1 build also occur when using gromit's build?

sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-6.13rc1-1-x86_64.pkg.tar.zst

Frankly I am using Ubuntu not Arch. I just google search about Asus Keyboard shortcut on 6.12.1 and got to this. I am not sure how to test this.

EDIT: I am not sure if I apply the patch wrongly. After applying this patch my system don't see asus_wmi in dmesg.

Also I have one question: Does the patch fix the thermal or the keyboard hotkey?

Last edited by poten17750 (2024-12-03 01:47:03)

Offline

#33 2024-12-10 05:15:12

shastry
Member
Registered: 2004-08-24
Posts: 45

Re: No asus_nb_wmi in 6.12.1 kernels

Good news everyone!

Linux mainline (6.13-rc2) has been patched.

Stable will get it soon.

https://bugzilla.kernel.org/show_bug.cgi?id=219517#c21

Offline

Board footer

Powered by FluxBB