Skip to contentSkip to conversation

uniwill-laptop: MECHREVO Yilong15Pro GM5HG0A keyboard backlight

Hardware support request bifangknt 2 participants 4 messages Oct 7 – Oct 8 x86 platform drivers

lore
Share & tools
lore

bifangknt

author
#0 lore raw

Hello Armin,

I would like to request keyboard backlight support for the MECHREVO Yilong15Pro GM5HG0A in the uniwill-laptop driver.

System information:
- Distribution: Fedora 44 KDE
- Running kernel: 7.2.8-200.fc44.x86_64
- DMI system vendor: MECHREVO
- DMI product name: Yilong15Pro Series GM5HG0A
- DMI board name: GM5HG0A
- BIOS version: N.1.09MRO19

With the stock Fedora kernel, no keyboard backlight LED device is exposed under /sys/class/leds/. KDE displays a keyboard backlight slider with "nan%" and cannot control the backlight.

I checked the uniwill-laptop DMI table in v7.3-rc6 and could not find an entry matching this machine.

The machine exposes the INOU0000 ACPI device at \_SB_.INOU. A read-only probe using its ECRR method returned:

PROJECT_ID  (0x0740) = 0x19
AP_OEM      (0x0741) = 0x80
SUPPORT_2   (0x0766) = 0x94
RGB_RED     (0x0769) = 0x00
RGB_GREEN   (0x076a) = 0x32
RGB_BLUE    (0x076b) = 0x32
BIOS_OEM_2  (0x0782) = 0x18
KBD_STATUS  (0x078c) = 0x00

I then tested a small out-of-tree module limited to keyboard backlight control, using the EC register layout from the upstream driver through the ECRR/ECRW ACPI methods.

It successfully turned on the backlight and exposed a multicolor LED device with the following values:

brightness=1
max_brightness=4
multi_intensity=0 50 50

KDE subsequently displayed the brightness correctly and could control the keyboard backlight.

This confirms that the backlight can be controlled using this EC interface.
However, I have not tested the complete upstream uniwill-laptop driver with a DMI entry added, or its other features such as fan and power controls. Suspend/resume handling of the backlight has not been tested either.

Could support for this model be added?
Please let me know which additional diagnostics or tests would be useful. I can provide the probe and temporary backlight module sources if needed.

Thank you.

#1 lore raw

Am 07.10.26 um 23:31 schrieb bifangknt:

Quoted 55 lines

Hello Armin,

I would like to request keyboard backlight support for the MECHREVO Yilong15Pro GM5HG0A in the uniwill-laptop driver.

System information:
- Distribution: Fedora 44 KDE
- Running kernel: 7.2.8-200.fc44.x86_64
- DMI system vendor: MECHREVO
- DMI product name: Yilong15Pro Series GM5HG0A
- DMI board name: GM5HG0A
- BIOS version: N.1.09MRO19

With the stock Fedora kernel, no keyboard backlight LED device is exposed under /sys/class/leds/. KDE displays a keyboard backlight slider with "nan%" and cannot control the backlight.

I checked the uniwill-laptop DMI table in v7.3-rc6 and could not find an entry matching this machine.

The machine exposes the INOU0000 ACPI device at \_SB_.INOU. A read-only probe using its ECRR method returned:

PROJECT_ID  (0x0740) = 0x19
AP_OEM      (0x0741) = 0x80
SUPPORT_2   (0x0766) = 0x94
RGB_RED     (0x0769) = 0x00
RGB_GREEN   (0x076a) = 0x32
RGB_BLUE    (0x076b) = 0x32
BIOS_OEM_2  (0x0782) = 0x18
KBD_STATUS  (0x078c) = 0x00

I then tested a small out-of-tree module limited to keyboard backlight control, using the EC register layout from the upstream driver through the ECRR/ECRW ACPI methods.

It successfully turned on the backlight and exposed a multicolor LED device with the following values:

brightness=1
max_brightness=4
multi_intensity=0 50 50

KDE subsequently displayed the brightness correctly and could control the keyboard backlight.

This confirms that the backlight can be controlled using this EC interface.
However, I have not tested the complete upstream uniwill-laptop driver with a DMI entry added, or its other features such as fan and power controls. Suspend/resume handling of the backlight has not been tested either.

Quoted 6 lines

Could support for this model be added?
Please let me know which additional diagnostics or tests would be useful. I can provide the probe and temporary backlight module sources if needed.

Thank you.

Hi,

can you load the uniwill-laptop driver with the module param "force" set to 1 and check:
- which sysfs attributes documented inside Documentation/ABI/testing/sysfs-driver-uniwill-laptop work
- if the lightbar (if present) works
- if the keyboard backlight works (and its maximum brightness)
- if the battery charge mode works (battery will still charge to 100%)
- which sensors are available (CPU/GPU/Primary fan/Secondary fan)
- if the "health" attribute under the battery power supply device works

Thanks,
Armin Wolf

author
#2 lore raw

Hello Armin,

Here are the results with force=1.
I used the unmodified v7.3-rc6 driver, built against my existing Fedora kernel. The temporary keyboard-only module was unloaded before testing.

Keyboard backlight:
Works, including RGB colours and all brightness levels (0-4). max_brightness is 4.

Lightbar:
None present; rainbow_animation and breathing_in_suspend were not tested.

fn_lock:
Works: 0 and 1 exchange the F-key and Fn+F-key functions.

super_key_enable:
Works: 0 disables the key and 1 enables it.
Readback is delayed: one disabling test still read 1 after 500 ms, then became 0. Keyboard brightness also briefly reads the previous value.

touchpad_toggle_enable:
Reads back 0/1 correctly, but Fn+F5 still toggles the touchpad in either state. At 0, the AT Translated Set 2 keyboard still emits KEY_LEFTMETA + KEY_LEFTCTRL + KEY_F24. XKB maps this combination to XF86TouchpadToggle.

ac_auto_boot:
Works: reconnecting power after shutdown starts the laptop. USB powershare was disabled during this test.

usb_powershare_high:
Works on the tested port with external power connected. USB power after shutdown is off at 0 and on at 1. ac_auto_boot was disabled.

usb_c_power_priority:
Tested with only a USB-C PD charger connected.
Writing charging returns no error, but still reads performance, including after waiting. Writing performance reads back performance.
No obvious effect was observed; the battery was full, so power allocation was not verified.

ctgp_offset:
Reads 0; changing the offset was not tested.

Sensors:
CPU/GPU temperatures and both fan readings are available and vary:
- CPU: 50-53 C
- GPU: 27-47 C
- fan1: about 2080 RPM
- fan2: initially 0, later about 2140 RPM
Calibration was not verified.

Battery charge modes:
Standard, Trickle and Long_Life are accepted and displayed as selected. All reported Charging at about 94% capacity.
I could not establish a difference in actual charging behaviour. External power was disconnected/reconnected during the test.

Battery health:
Reports Good, both when not charging and during charging tests.

Settings were restored afterwards, including:
- charge mode: Standard
- USB-C priority: performance
- ac_auto_boot=0
- usb_powershare_high=0

Please let me know what further diagnostics would help with touchpad_toggle_enable and usb_c_power_priority.

Thank you.
bifang

author
#3 lore raw
In reply to Armin Wolf

Hello Armin,

Some follow-up observations from the keyboard backlight testing:

Brightness:

After manually loading the driver, KDE's system tray initially could not adjust the keyboard brightness. At that point, sysfs and UPower both reported a maximum brightness of 4, but PowerDevil reported 0. PowerDevil had started before the driver was loaded.

After restarting PowerDevil, its maximum brightness became 4.
I then confirmed that both its D-Bus brightness control and the system tray slider worked. This suggests a desktop state-refresh issue following manual driver loading.

Colour control:

KDE initially hid its keyboard colour option because Kameleon reported the device as unsupported. After reloading Kameleon and restarting Plasma Shell, the "Follow accent color" switch appeared. With the initial accent colour, the switch did not reproduce the expected colour. Kameleon reports isEnabled=true and keyboard brightness is 4.
The accent colour is RGB 233 58 154, while multi_max_intensity is 50 50 50.
The observed multi_intensity is 50 50 50.

Kameleon's 6.7.5 sysfs backend writes the 0-255 RGB components directly, without scaling to multi_max_intensity.
The observed values are consistent with all three components being clamped to 50.
I then tested an accent colour with all RGB components within 0-50.
The same numeric values appeared in multi_intensity, without rescaling, but the visual colour still did not match the desktop accent colour. This confirms that values within range are passed through unchanged; values above the channel maximum are clamped. Kameleon needs to scale the 0-255 components to the device's 0-50 range.
This appears to be a userspace colour-scaling issue.

In Plasma 6.7.5, this GUI only offers synchronization with the desktop accent colour.
It does not provide a separate colour picker for the keyboard.
Independent RGB colours work through the driver's sysfs interface, as verified by the red, green and blue tests. Providing a separate colour picker would be a KDE GUI feature request.

These checks used the same v7.3-rc6 driver with force=1.
Keyboard brightness and independent RGB control work through sysfs, and brightness control now also works through KDE's system tray.

Thank you.
bifang