[SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 21
Joined: Wed Jan 30, 2019 7:33 pm

[SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by whatsforbreakfast » 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

Code: Select all

 /home/yourusername/Downloads/clevo
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:

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,
	},
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:

Code: Select all

	{
		.ident = "Clevo N850EK",
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "N8xEJEK"),
		},
		.callback = clevo_xsm_dmi_matched,
		.driver_data = &kb_full_color_ops,
	},
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:

Code: Select all

sudo dmidecode
This command is going to return a large output, but the product name will be not too far from the top.

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         
Once you've done that, save your newly edited clevo-xsm-wmi.c file

In the terminal navigate to your module folder

Code: Select all

cd /home/yourusername/Downloads/clevo/module/
and type

Code: Select all

make
Now while still in the module directory try loading the module

Code: Select all

sudo insmod clevo-xsm-wmi.ko
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

Code: Select all

sudo nano /sys/devices/platform/clevo_xsm_wmi/kb_color
This opens an editor inside the terminal, and you should see something like

Code: Select all

blue blue blue
Change the names of the three colours and save using Ctrl + S, you can use any of the following

Code: Select all

white
green
red
blue
yellow
magenta
cyan
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

Code: Select all

make && sudo make install
If you get an SSL error like I did you need to enter:

Code: Select all

sudo install -m644 clevo-xsm-wmi.ko /lib/modules/$(uname -r)/extra
then

Code: Select all

sudo depmod
Now you can input the following to load the module on boot

Code: Select all

sudo tee /etc/modules-load.d/clevo-xsm-wmi.conf <<< clevo-xsm-wmi
Then lastly

Code: Select all

sudo update-initramfs -uk all
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.

Code: Select all

sudo tee /etc/modprobe.d/clevo-xsm-wmi.conf <<< 'options clevo-xsm-wmi kb_color=white,white,white kb_brightness=1'
Reboot :)

Joozey
Level 1
Level 1
Posts: 1
Joined: Wed Apr 24, 2019 7:05 pm

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by Joozey » Wed Apr 24, 2019 7:15 pm

You are nothing short of a genius! Thank you! I've bought a BTO laptop that displays nice rainbow colors at the start but after Linux boots, it was just plain blue. I had to inquire BTO from what manufacturer the keyboard came, at least they informed it was Clevo. I've gone through the same route as you have; xset, xbacklight, acpi_backlight, repositories of msi-keyboard, clevo-keyboard-backlight, nothing would work.

My product id is exactly the same: N8xEJEK, and after following your exact steps (very well written, needed every step!), it worked without any problems! Thank you so much, you've made my day :D .

User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 21
Joined: Wed Jan 30, 2019 7:33 pm

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by whatsforbreakfast » Fri May 10, 2019 11:35 pm

Amazing! So glad I could help, it's awesome to know these instructions came in handy for someone else :)

dontcarefilmer
Level 1
Level 1
Posts: 1
Joined: Wed May 15, 2019 9:54 am

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by dontcarefilmer » Wed May 15, 2019 10:05 am

Hey this totally worked for me too. I had to make an account here just to let you know, thank you so much!

I am using Ubuntu 19.04 running on a Metabox N850HK1 model so my settings were slightly different to yours, but your detailed explanation was spot on as to where I needed to deviate. I had tried to follow along on the tuxedocomputers site earlier, but the short troubleshooting guide was a missing some critical details and I had almost given up.

Cheers.

User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 21
Joined: Wed Jan 30, 2019 7:33 pm

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by whatsforbreakfast » Fri May 24, 2019 11:09 pm

That's awesome! You're welcome and I'm glad I could help :)

User avatar
keny
Level 1
Level 1
Posts: 1
Joined: Wed Jun 05, 2019 5:03 am

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by keny » Wed Jun 05, 2019 5:06 am

Thank you so much whatsforbreakfast ! Now my keyboard is fully functional :wink:

Moritz Kooistra
Level 1
Level 1
Posts: 1
Joined: Fri Jul 05, 2019 2:50 am

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by Moritz Kooistra » Fri Jul 05, 2019 3:22 am

It works..!! Thanks you.

The Bright Side
Level 2
Level 2
Posts: 53
Joined: Thu Jul 12, 2018 3:09 pm

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by The Bright Side » Sun Aug 04, 2019 7:03 am

Hey, just wanted to say thanks so much for this tutorial. Unfortunately, none of these steps work for the Clevo N970TF, but I'm glad this helped other Clevo owners!

tof973
Level 1
Level 1
Posts: 1
Joined: Tue Sep 10, 2019 11:09 pm

Re: [SOLVED] Help tackling keyboard backlight on Clevo laptop (Metabox N850EK)

Post by tof973 » Tue Sep 10, 2019 11:14 pm

Ohah , very helpfull. I was trying do solve the same probleme with a Gigabyte Sabre 17 ... and that's work on it too!
Thank you so much !
So Gigabyte Sabre 17 is in fact very similar to clevo . Change name for "Sabre 17 XXX ..." in this case.

Post Reply

Return to “Hardware Support”