BNieuwenhuizen / zenbook-s16

My journey with the ASUS Zenbook S 16
29 stars 2 forks source link

Keyboard backlight tracking issue #5

Open clemej opened 2 months ago

clemej commented 2 months ago

Thanks for putting these notes up. Thought it'd make sense to create an issue to track keyboard backlight control.

My keyboard backlight just pulses continuously, and has since the moment I turned on the machine the first time out of the box. It never responded to keyboard shortcuts in the bios, windows, or linux. It's just permanently pulsing. Asus has instructions on their website to reset the EC by holding down the power button for a bit, but that didn't work for me. I'm hoping the next bios update will fix it. Would love to know if anyone gets the WMI functions working. I no longer have windows installed.

My setup, that is getting more stable by the day:

Thank you so much for posting the speaker config, that one was really confounding me and it works fine now with your pipewire config.

frogmech commented 1 month ago

Here's the fix for keyboard backlight control:

# Run as root
cd /sys/kernel/debug/asus-nb-wmi
echo 0x5002f > dev_id
echo 1 > ctrl_param
cat devs

I found it from this post on the Arch forum. It seems to keep working for me even after a restart without creating a systemd service even though the people on the forum post say it is necessary. I guess ASUS laptops have an OOBE that I assume is marked as complete when you go through the Windows setup. I wonder if the only ones affected by this bug are people that skipped the Windows setup and went straight to installing Linux?

fallingcats commented 1 month ago

Here's the fix for keyboard backlight control:

# Run as root
cd /sys/kernel/debug/asus-nb-wmi
echo 0x5002f > dev_id
echo 1 > ctrl_param
cat devs

I found it from this post on the Arch forum. It seems to keep working for me even after a restart without creating a systemd service even though the people on the forum post say it is necessary. I guess ASUS laptops have an OOBE that I assume is marked as complete when you go through the Windows setup. I wonder if the only ones affected by this bug are people that skipped the Windows setup and went straight to installing Linux?

Thank you so, so much for also posting this here.

For the record, I set up windows, did firmware updates, and then swapped in the 4TB drive with my arch install. Yet I was affected.

skbolton commented 1 month ago

Thank you so, so much for also posting this here.

For the record, I set up windows, did firmware updates, and then swapped in the 4TB drive with my arch install. Yet I was affected.

Yeah absolutely @fallingcats @frogmech super stoked to have this issue resolved! Now if somehow we could get deep sleep as a suspend option I would have 0 regrets with this laptop. One step closer!

ThatOneCalculator commented 1 month ago

I wonder if the only ones affected by this bug are people that skipped the Windows setup and went straight to installing Linux?

Maybe... that's what I did. Hopefully it can get into kernel patch form soon so I can add it to my AUR kernel package lol

skbolton commented 1 month ago

I also have the issue of rebooting wiping things. But my setup is all in nixos so I think I am going to go through the windows installation and then reinstall nixos. Will report back if that is a valid solution

BNieuwenhuizen commented 1 month ago

Here's the fix for keyboard backlight control:

# Run as root
cd /sys/kernel/debug/asus-nb-wmi
echo 0x5002f > dev_id
echo 1 > ctrl_param
cat devs

I found it from this post on the Arch forum. It seems to keep working for me even after a restart without creating a systemd service even though the people on the forum post say it is necessary. I guess ASUS laptops have an OOBE that I assume is marked as complete when you go through the Windows setup. I wonder if the only ones affected by this bug are people that skipped the Windows setup and went straight to installing Linux?

FWIW it works for me by default if I reboot from Windows into Linux but not with a cold boot.

Anyway, converted this into a kernel patch: https://patchwork.kernel.org/project/platform-driver-x86/patch/20240909223503.1445779-1-bas@basnieuwenhuizen.nl/

so hopefully this works OOB (pun intended) in some future kernel version.

clemej commented 1 month ago

Thanks, works for me as well! I often work late into the night in a dark room and it was getting very distracting for both myself and those around me.

skbolton commented 1 month ago

Just wanted to report that building linux kernel 6.11 on nixos included this patch.

LC43 commented 16 hours ago

also, using brightnessctl -d 'asus::kbd_backlight' set x , where x is 0 to 3, controls the keyboard light for me