You are not logged in.

#1 2023-08-02 21:00:58

DAstafyev
Member
Registered: 2017-12-24
Posts: 5

[SOLVED] Keyboard backlight doesn't work on Asus Zenbook

Hello, I will be grateful for any help with resolving this issue.

Issue: keyboard backlight doesn't work.

Laptop: Asus ZenBook ux7602zm-db74t
BIOS: updated to latest (UI of BIOS doesn't show any related to keyboard backlight settings)
Hardware issue is excluded: backlight works in windows as well.

journalctl::

$> journalctl -b | grep kbd_backlight
Aug 02 20:15:53 skyland asusd[6121]: ERROR: Keyboard control: Asus Platform error: Missing functionality: asus::kbd_backlight not found
$> journalctl -b| grep keyboard
Aug 02 20:11:22 skyland systemd[1467]: Starting GNOME keyboard configuration service...
Aug 02 20:11:22 skyland systemd[1467]: Starting GNOME keyboard shortcuts service...
Aug 02 20:11:22 skyland systemd[1467]: Started GNOME keyboard configuration service.
Aug 02 20:11:22 skyland systemd[1467]: Reached target GNOME keyboard configuration target.
Aug 02 20:11:22 skyland systemd[1467]: Started GNOME keyboard shortcuts service.
Aug 02 20:11:22 skyland systemd[1467]: Reached target GNOME keyboard shortcuts target.
Aug 02 20:15:53 skyland asusd[6121]: INFO: Using generic LED control for keyboard brightness only
Aug 02 20:15:53 skyland asusd[6121]: Ok(SupportedFunctions { anime_ctrl: AnimeSupportedFunctions(false), charge_ctrl: ChargeSupportedFunctions { charge_level_set: true }, platform_profile: PlatformProfileFunctions { platform_profile: false, fans: [] }, keyboard_led: LedSupportedFunctions { dev_id: Unknown, brightness: false, basic_modes: [], basic_zones: [], advanced_type: None, power_zones: [] }, rog_bios_ctrl: RogBiosSupportedFunctions { post_sound: false, gpu_mux: false, panel_overdrive: false, dgpu_disable: false, egpu_enable: false, mini_led_mode: false } })
Aug 02 20:15:53 skyland asusd[6121]: INFO: Using generic LED control for keyboard brightness only
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0xtuf: Missing functionality: hidraw dev tuf not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x1854: Missing functionality: hidraw dev 1854 not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x1869: Missing functionality: hidraw dev 1869 not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x1866: Missing functionality: hidraw dev 1866 not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x18c6: Missing functionality: hidraw dev 18c6 not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x19b6: Missing functionality: hidraw dev 19b6 not found
Aug 02 20:15:53 skyland asusd[6121]: INFO: Looked for keyboard controller 0x1a30: Missing functionality: hidraw dev 1a30 not found

dmesg

$> sudo dmesg | grep kbd_backlight
$> sudo dmesg | grep keyboard
$> sudo dmesg | grep asus
[    5.497038] asus_wmi: ASUS WMI generic driver loaded
[    5.520666] asus_wmi: Initialization: 0x1
[    5.520737] asus_wmi: BIOS WMI version: 9.4
[    5.520776] asus_wmi: SFUN value: 0x21
[    5.520779] asus-nb-wmi asus-nb-wmi: Detected ATK, not ASUSWMI, use DSTS
[    5.520782] asus-nb-wmi asus-nb-wmi: Detected ATK, enable event queue
[    5.523318] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input23
[    5.568827] asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19
[    5.568971] asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19

mods

$> lsmod | grep asus
asus_nb_wmi            32768  0
asus_wmi               69632  1 asus_nb_wmi
ledtrig_audio          16384  2 snd_hda_codec_generic,asus_wmi
sparse_keymap          16384  1 asus_wmi
platform_profile       16384  1 asus_wmi
i8042                  49152  1 asus_nb_wmi
rfkill                 36864  9 iwlmvm,asus_wmi,bluetooth,cfg80211
video                  65536  3 asus_wmi,i915,nouveau
wmi                    45056  5 video,asus_wmi,wmi_bmof,mxm_wmi,nouveau

List of devices with brightness support

$> brightnessctl --list
Available devices:
Device 'intel_backlight' of class 'backlight':
	Current brightness: 341 (85%)
	Max brightness: 400

Device 'input42::numlock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input42::capslock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'phy0-led' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input42::kana' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input3::kana' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input40::capslock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input42::compose' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input3::numlock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input42::scrolllock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input40::scrolllock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input40::numlock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input3::capslock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input40::kana' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input3::compose' of class 'leds':
	Current brightness: 1 (100%)
	Max brightness: 1

Device 'input3::scrolllock' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

Device 'input40::compose' of class 'leds':
	Current brightness: 1 (100%)
	Max brightness: 1

Device 'platform::micmute' of class 'leds':
	Current brightness: 0 (0%)
	Max brightness: 1

platform devices

$> ls -lsa /sys/devices/platform/asus-nb-wmi/leds
total 0
0 drwxr-xr-x 3 root root 0 Aug  2 20:11 ./
0 drwxr-xr-x 7 root root 0 Aug  2 20:11 ../
0 drwxr-xr-x 3 root root 0 Aug  2 20:11 platform::micmute/

Of cause next commands don't work:

$> gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Keyboard.StepUp
(-1,)
$> xset led 13

Installing next packages didn't help:

asusctl (g14 repo)
rogauracore (AUR)

Many thanks in advance for any help.
P.S.
Rest functionality of laptop looks good, only backlight of keyboard doesn't but it's really needed

Last edited by DAstafyev (2024-01-28 19:00:45)

Offline

#2 2023-12-29 16:30:07

Novaryu
Member
Registered: 2023-12-29
Posts: 3

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

Hello!

I also got this laptop recently and have been trying my hand at reverse-engineering the USB protocol as I totally agree the keyboard backlight is absolutely crucial.

After plugging it into Wireshark, I found it's a bit different from ROG's implementation (which is why rogauracore doesn't work), but appears to be similar enough that I was able to fork it and adapt it to the UX7602ZM.

Here's the link to my fork:

https://github.com/Novaryu/zenauracore

Let me know if it works for you. Currently I just have single static colors but hopefully will add more functionality as I continue to examine the protocol.

Happy typing!

EDIT: I have since added the rest of the modes supported by this keyboard so it should now be fully functional the same as on Windows.

Last edited by Novaryu (2023-12-30 14:12:36)

Offline

#3 2024-01-28 18:59:58

DAstafyev
Member
Registered: 2017-12-24
Posts: 5

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

Hello @Novaryu. Thank you very much for your efforts! Your solution works smoothly and well. Thanks!

Offline

#4 2024-01-28 19:22:34

DAstafyev
Member
Registered: 2017-12-24
Posts: 5

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

@Novaryu btw, did you resolve speakers issue?

Offline

#5 2024-01-29 10:50:03

Novaryu
Member
Registered: 2023-12-29
Posts: 3

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

Glad to hear it worked for you! smile

As for the speakers issue, it turns out this laptop has a pair of tweeters and two pairs of woofers. The tweeters work out of the box if you install sof-firmware, but as for the woofers, it turns out that ASUS left out ACPI amplifier parameters in the BIOS which makes patching it non-trivial.

If you've updated linux to 6.7, a quirk was submitted that should enable one of the two pairs of woofers, which makes the sound decent (still not on par with windows, but pretty close). As for the second pair of woofers, the kernel folks had this to say:

"To support laptops using SPI without _DSD, an additional workaround is needed to be able to support the SPI Chip Select GPIOs whose resources are defined inside the _CRS for the Speaker ACPI Node. This workaround only works for SPI laptops which contain up to 2 amps, since the SPI controller would not allow more than 2 amps to be instantiated without the cs-gpios entry in _DSD."
(Link to the relevant email)

I'm not super familiar with the linux kernel or audio drivers, so I'm not sure exactly how to enable the second pair of woofers. Some earlier Zenbook models have had some luck copying relevant audio files from Windows and renaming them into /lib/firmware/cirrus but I haven't experimented with this yet as I don't use the speakers too often and the audio since linux 6.7 is passable enough.

One sort of annoying thing I've found is that even with the additional quirk the woofer is either "on" or "off" for me when using the audio master in alsa, meaning when I lower the volume, it lowers the volume of the tweeters only, giving a very distorted sound. As a workaround, I have to set the volume with this bash script that I've bound to the media keys. Basically what it does is change the PCM volume instead of the master volume, which allows both speakers to be adjusted simultaneously. Note that I'm using pipewire+pipewire-pulse and YMMV.

Hopefully installing sof-firmware and updating to linux 6.7 works for you. Let me know if you have any other questions as I've been on a quest to get this laptop in a productive state. I have a bunch of other bash files I've made for convenience that you'll also find in that dotfiles repo.

Offline

#6 2024-01-29 11:23:42

DAstafyev
Member
Registered: 2017-12-24
Posts: 5

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

@Novaryu thanks much for your reply. To be honest I'm also using aways headphones but can not get rid of a wish to make work all (including not used features) smile... Today I've checked state of speakers and it works still not perfect (like you highlighted) but much better than it was before. Will try to make some fine-tunning to come to the most acceptable state.
Once again thanks for sharing your tips and results of research!

Offline

#7 2024-01-30 10:14:54

Novaryu
Member
Registered: 2023-12-29
Posts: 3

Re: [SOLVED] Keyboard backlight doesn't work on Asus Zenbook

I totally get that, I've been down that same rabbit hole myself. But there's quite a bit more work to do.

Just off the top of my head, the ASUS Dial, ambient light sensor, fan profiles, privacy shutter, AI noise cancelling, and of course the speakers still need adaptation. I'm sure there's lots more.

Of these the most promising might be the ambient light sensor (older zenbook models have been adapted here), fan profiles (also needs adaptation from here), and privacy shutter (would probably need to be sniffed with wireshark as I did with the keyboard backlight but very possible).

ASUS Dial would probably require kernel-level work to make functional. Some function keys don't work and are in the same boat (I'm using windows+fn keys as a workaround). We've talked about the speakers.

So while possible, it's a lot of work to get everything functioning... I might chip away at some things wherever I have the time. Let me know if you've discovered a fix for any of the above!

Offline

Board footer

Powered by FluxBB