[SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)
Posted: Sun Feb 03, 2019 4:07 am
So I've pretty much given up on trying to get the backlight on this Metabox N850EK (Clevo) laptop working like it does in Windows with all the pretty colours and behaviours. I found some Python stuff on Github and a couple of Youtube videos showing off that it is doable, but next to nothing in the way of useful directions for a newbie like myself to follow to make any of it work.
At this point I just want to be able to turn the keyboard backlight on and off. It's currently always on (colour is blue), and while that's useful most of the time it's kind of annoying when I'm watching films and stuff in a dark room and I find myself putting a black shirt over the keyboard to block it out.
Here's what I've tried:
xset led off - doesn't do anything
adding acpi_backlight=vendor to grub on boot - function keys still do nothing
xbacklight - doesn't do anything either
If anyone can help me get it working like it does in Windows I'd be over the moon, but honestly just being able to turn it on and off would be stellar. Maybe changing to any other colour than blue would be cool too, but I won't get my hopes up.
-- Edit --
I figured it out! Here's what you need to do if you have the same or similar laptop but are struggling to get it working. Hopefully this works for you too.
Note: I haven't got the GUI working or figured out how to get the module to load on boot, but this will at least get your function keys working so you can turn the LED's on/off, adjust brightness, and change colour.
Download the latest repository https://bitbucket.org/tuxedocomputers/c ... downloads/
Extract the contents
Rename the folder to make things easier (I renamed mine to clevo)
You should now have a file path something like
From the module folder, open the clevo-xsm-wmi.c file in a text editor
Tip: In the text editor go to Edit > Preferences and enable line numbers
Then Search > Go to Line 1414
This takes you to a table with all the compatible models. You're going to have to edit an existing entry to contain your models information. Each entry on the table will look like this:
You need to change the identity and product name fields, which for me was Clevo N850EK and N8xEJEK, so my edited entry now looks like this:
The identity in this case is the model number the manufacturer uses for this particular laptop, and was on the sticker on the bottom as well as the order form in my inbox. The product name you can find with the following command:
This command is going to return a large output, but the product name will be not too far from the top.
Once you've done that, save your newly edited clevo-xsm-wmi.c file
In the terminal navigate to your module folder
and type
Now while still in the module directory try loading the module
If it worked you should now be able to use your function keys!
Fn / will cycle through basic colours
Fn * will turn the LED's on and off
Fn + & - will adjust the brightness
Hope that helps someone else struggling to get this working. It's not complete functionality, as I said before I don't know how to make it start on boot or how to get the GUI working for more control over the colours and other features but it's at least a start.
--edit--
I found a temporary way to change the colours across the 3 sections of the keyboard. Enter the terminal and type in
This opens an editor inside the terminal, and you should see something like
Change the names of the three colours and save using Ctrl + S, you can use any of the following
I'll come back here with updates if I figure anything else out.
--edit--
Okay - got the module to load on boot! Big thanks to thx-1138 over on this thread here viewtopic.php?f=90&t=287632
In the terminal navigate to your module folder and type
If you get an SSL error like I did you need to enter:
then
Now you can input the following to load the module on boot
Then lastly
Or to specify default colours and brightness on boot use this command. Just replace white,white,white with whatever you like and brightness can be set between 1 and 10.
Reboot 
At this point I just want to be able to turn the keyboard backlight on and off. It's currently always on (colour is blue), and while that's useful most of the time it's kind of annoying when I'm watching films and stuff in a dark room and I find myself putting a black shirt over the keyboard to block it out.
Here's what I've tried:
xset led off - doesn't do anything
adding acpi_backlight=vendor to grub on boot - function keys still do nothing
xbacklight - doesn't do anything either
If anyone can help me get it working like it does in Windows I'd be over the moon, but honestly just being able to turn it on and off would be stellar. Maybe changing to any other colour than blue would be cool too, but I won't get my hopes up.
-- Edit --
I figured it out! Here's what you need to do if you have the same or similar laptop but are struggling to get it working. Hopefully this works for you too.
Note: I haven't got the GUI working or figured out how to get the module to load on boot, but this will at least get your function keys working so you can turn the LED's on/off, adjust brightness, and change colour.
Download the latest repository https://bitbucket.org/tuxedocomputers/c ... downloads/
Extract the contents
Rename the folder to make things easier (I renamed mine to clevo)
You should now have a file path something like
Code: Select all
/home/yourusername/Downloads/clevo
Tip: In the text editor go to Edit > Preferences and enable line numbers
Then Search > Go to Line 1414
This takes you to a table with all the compatible models. You're going to have to edit an existing entry to contain your models information. Each entry on the table will look like this:
Code: Select all
{
.ident = "Clevo P870DM",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "P870DM"),
},
.callback = clevo_xsm_dmi_matched,
.driver_data = &kb_full_color_with_extra_ops,
},
Code: Select all
{
.ident = "Clevo N850EK",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "N8xEJEK"),
},
.callback = clevo_xsm_dmi_matched,
.driver_data = &kb_full_color_ops,
},
Code: Select all
sudo dmidecode
Code: Select all
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: IT Channel Pty Ltd
Product Name: N8xEJEK <--------------------------------------
Version: Not Applicable
Serial Number: Not Applicable
UUID: CE6C4FCA-3850-4825-B48F-9AAF3F7D8B74
Wake-up Type: Power Switch
SKU Number: Not Applicable
Family: Not Applicable
In the terminal navigate to your module folder
Code: Select all
cd /home/yourusername/Downloads/clevo/module/
Code: Select all
make
Code: Select all
sudo insmod clevo-xsm-wmi.ko
Fn / will cycle through basic colours
Fn * will turn the LED's on and off
Fn + & - will adjust the brightness
Hope that helps someone else struggling to get this working. It's not complete functionality, as I said before I don't know how to make it start on boot or how to get the GUI working for more control over the colours and other features but it's at least a start.
--edit--
I found a temporary way to change the colours across the 3 sections of the keyboard. Enter the terminal and type in
Code: Select all
sudo nano /sys/devices/platform/clevo_xsm_wmi/kb_color
Code: Select all
blue blue blue
Code: Select all
white
green
red
blue
yellow
magenta
cyan
--edit--
Okay - got the module to load on boot! Big thanks to thx-1138 over on this thread here viewtopic.php?f=90&t=287632
In the terminal navigate to your module folder and type
Code: Select all
make && sudo make install
Code: Select all
sudo install -m644 clevo-xsm-wmi.ko /lib/modules/$(uname -r)/extra
Code: Select all
sudo depmod
Code: Select all
sudo tee /etc/modules-load.d/clevo-xsm-wmi.conf <<< clevo-xsm-wmi
Code: Select all
sudo update-initramfs -uk all
Code: Select all
sudo tee /etc/modprobe.d/clevo-xsm-wmi.conf <<< 'options clevo-xsm-wmi kb_color=white,white,white kb_brightness=1'
