I bought a NP9150 a couple months ago and was tired of not having all the features work under linux. After a few hours here and there of spare time I finally figured out how to talk to the backlit keyboard. I will be writing a driver this week to expose a simple to use interface in /sys for easy scriptability. Is anyone interested in helping me beta test it? You will need some kernel knowledge of course as it will require building a module.
All color combinations and animations work. I can even control the individual R, G, and B for all three zones.
The only thing that I notice (and maybe someone with a windows install can back me up) is once I write to it if I hit the fn-disable key it disabled but it won't reenable. The only thing I can write in that enables that functionality is the default behavior. There may be an ACPI event that can be triggered for it but I don't know how to do that at this time.
The other thing I looked into was the subwoofer. Turns out it just works. I honestly thought the schematic was wrong. If you don't think your subwoofer works just take notice that the audio balance is biased to the right on this laptop. That's due to the subwoofer being on the right. (stupid design.) What you need to really make it work (check out some of the sub tests on youtube) is an equalizer. Google some stuff for an alsa equalizer and it works very well. I actually really love how this laptop sounds now that I have it dialed in.
I even put a temporary windows install on it and tested out the sound to when that THX "speaker" thing is turned up and it's the same. I had to reformat that drive so I can't do further testing on the keyboard to compare.
Anyway, let me know. I'll try to have it ready for testing by next weekend.
-
-
Hi,
Last friday I got my new XMG P502 (Clevo P150EM) and I would like to help test your linux driver for the backlit keyboard...
What kind of dGPU do you have? If Nvidia, are you using bumblebee or even primusrun?
Pete -
I have the 675 with 4gb vram. I'm using bumblebee and it works well. I am not really a gamer but I do have a couple of games installed to test the GPU. This is primarily a work computer. Right now the state of the driver is I change a value, make, insert module, remove module, repeat. So like I said I will try and get something more concrete this week. Thanks for volunteering! One thing I can't seem to figure out is how to read the current setting. I guess writing it is more important though.
Congrats on the new laptop. They are nice machines! I removed my bezel and painted it because I hated glossy (there was a writeup on this site) and I also had to swap the keyboard since my original had a defect. They sent me a model of keyboard that was different than what it came with and I just love how it feels. -
Under Win you can always enable and disable the keyboard light with the fn-disable key, no matter what color you set it to.
What Linux do you run on your Clevo? I went with Ubuntu 12.10 for now, the problem is that the fn-brightness keys only work with Kernel 3.7.0 and up (Ubuntu 12.10 comes with 3.5.0).
Wow, you painted the bezel.I haven't thought about that, I'm not really bothered by it (yet?).
If you want to, I could check out your code even at the state it is in now. -
There is no code to check out right now. It was just me figuring out how to do it. Right now I have to set a value in the code, build the module, insert it, remove it, repeat. My suspicion is that there is a way to turn on an ACPI event for that key (enable) that provides that functionality. Or it is a flag that I'm missing. The first version of the driver is likely to not have this working. I plan on doing this work Thursday evening or possibly Saturday and then I will share it with you and Pete.
I am running Gentoo with a 3.7.2 kernel. I actually had brightness keys working on my first kernel, and then when I upgraded (a 3.6 I think) they were not working. But then they worked again on the 3.7.2. The issue I have now is that KDE's OSD (on screen display) for brightness does not work because the keys are only generating a key release event and never a key press event. -
You're awesome!! I'm running Ubuntu 12.04 on a P170EM, and I would be glad to help beta test! I can't claim to be a Linux pro, but I can find my way around compiling a module.
-
ALLurGroceries Vegan Vermin Super Moderator
Would you want to post a DSDT dump somewhere?
-
I can post a DSDT sure. I plan on working on the sysfs layer tonight. If I get that "done" I will post a tbz2 here on the forum with an entire module directory. If your kernel is in /usr/src/linux it should "just build." I will post the required kernel options as well.
I am thinking about having the patterns be somehing you can echo a 1 to to turn them on. One of them will be "stop" and that will stop all patterns. I will have 3 zones (left, mid, right) that you can echo "xxx" to where x is a 0 or 1 for r, g, b. I also plan to have a "raw" input where you can just pass in any number you want in hex.
Does anyone else have any ideas?
BTW I've been doing kernel stuff for about 10 years so I am hopeful I won't crash anyone's computer.I do a lot of device drivers as consulting work.
-
-
Interesting on the OSD. Maybe they fixed that. I am still running 3.7.2. It's nice to meet a fellow embedded linux guy. I have been doing this stuff for many, many years. I was the MIPS maintainer on RTAI for a couple of years. Most of my embedded Linux work has been in the medical device industry. ARM, MIPS, x86, and ppc. A lot of battery powered devices, too. I am planning to get a first draft posted either tonight (late) or this weekend.
Maybe I will set up a sourceforge.net project for collaboration. Or I could fork the kernel on github and we could work there. Thoughts?
The patterns are part of the embedded firmware. I was able to tell that when I had the thing running Windows because when I would shut down the keyboard would still flash even when everything had closed down just before the power shut off. -
Oh, I forgot to mention. My bluetooth is always on, too. I actually have sent the code to turn it off and the LED flickers off for about half a second then comes back on. I'm baffled by that one.
-
But maybe a sourceforge project would be nice, then we could add some files/programms to control the keyboard from userspace.
Another issue is, that when the machine wakes up from standby (under Linux) the keyboard stays unlit.
BTW, that's the bug report, where I found out about the brightness keys issue: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1041116 -
If a pattern is turned on the LEDs come back when waking from sleep. If it's just a set color they do not. I'll have to register a callback for wake from sleep in the driver and have it send the last written value.
-
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1131976 -
@klystron34, which wlan/bluetooth module do you have? I have an Intel Centrino Advanced-N 6235.
-
I have the bigfoot killer one. I'm almost done with the driver. I will create a project and also include the decoded MOF in it and the DSDT dissambler in the check in.
-
Guys I created a sourceforge repository for my work so far at https://sourceforge.net/p/clevo-wmi
This includes my notes on the kbled pattern, a simple readme, the DSDT dump, and the MOF header.
If your kernel source is in /usr/src/linux it should just build. Note that you will need to ensure CONFIG_ACPI_WMI is enabled in your kernel.
For beginners, you can interface with the device from the command line through the sysfs interface. So for example, echo 1 > /sys/devices/platform/clevo_wmi/kbled/random will turn on the random flicker pattern. Read the readme! -
Works here, module build like a charm (3.6.11 kernel)
My keyboard is green,red,white and fading...
Thanks for the Work! -
Your latest commit to restore the value after wakeup works too
-
Take a look at the header file in the docs directory. You can try using some of those values and play with things like bluetooth disable.
Gentoo just dumped me a 3.79 kernel so I'll have to cehck that out when I'm not so busy with work/homework. -
-
The one I thought I already checked in. Try it now.
-
Thanks for adding the file
So you think the bluetooth problem is wmi related?
all I know so far is, our bluetooth got broken somewhere between 3.6 and 3.7-rc1 (and is still broken in 3.8) -
I'm building 3.7.9 now as it's the latest from Gentoo. I do not know if it's WMI related or not. WMI are simply an identifier and interface to a remote method. In this case the WMI interface is to the WMBB (on our units) ACPI method. ACPI uses byte code from AML to store methods in the bios (or in files) that can be run by any OS. If you look at the dsdt dump there is a comment in there next to a line with 0x67 on it where I say it's the one we care about for the keyboard driver. You can see that it is simply doing some bitwise operations and writing values to the EC. We could write those by hand and remove WMI (and thus the GPL license which I hate) however there is no guarantee they will always work the same way so it is better to use what the manufacturer provides. Likely this interface will be the same even if what it writes to the EC is different.
-
Thanks for the input
So far I have never really done anything with ACPI.
If I'm correct, you should still have the bluetooth problem with the 3.7.9 kernel...
If you have a launchpad account by any chance, you could click "This bug affects you too"
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1131976 -
-
I will get a chance to test everything out later this afternoon, though!
-
I don't have launchpad. It seems that there is no ACPI event generated for the hotkey combo of either wlan or BT. I know that when I first got the laptop and put gentoo on it I could kill the wlan and the BT with the hotkey combo. It is likely that we just need to request those hotkeys. There is another WMI GUID to do that called the CLEVO_EVENT_GUID or whatever as well. You can see this information by obtaining fwts (firmware test set) and running its wmi command.
Thanks for the test, Penguissimo. Let us know if it works for you.
Would anyone like to take a stab at a sysv init style script to save/restore the raw value on reboot? -
Please forgive my confusion, but I am in a bit over my head. I've got the module compiled, but I'm slightly at a loss as to how it should be installed. modprobe simply throws a "Module clevo_wmi not found" error when I run the command either from within the directory where the compiled module is stored or after copying the module to /lib/modules/3.5.7-03050704-generic/kernel/drivers/acpi/ (the directory that made the most sense to my newbie mind).
I'll try it out on a 3.7 kernel as soon as I get it working on my 3.5 kernel! -
ALLurGroceries Vegan Vermin Super Moderator
You can insert it with
Code:insmod path/to/module.ko
-
Like ALLurGroceries says, use insmod. So if you type "make" to build it just insmod clevo_wmi.ko in the same dir and it will insert. The keyboard should turn on all dark blue (default) at that point.
From there, go into /sys/devices/platform/clevo_wmi/kbled and look at all the files. Try echo 1 > random -
Thanks!! I've got it successfully inserted and am happily playing around with the various colours and patterns that are available...seems to be working like a charm! How could I configure it so the kernel module loads automatically upon boot?
Is it worth testing the 3.7 kernel even though I don't have Bluetooth? Could that provide anything useful towards solving the BT issues? I'd be glad to do so if so! -
In my opinion it is not worth having you test anything until we figure out how to fix the issue.
Glad the keyboard driver is working.
You can configure the module to load upon boot but how you do that depends on your distribution. On gentoo, you edit /etc/conf.d/modules and add its name to the modules= line. You would have to install the module in the modpath. You could then until something more elegant is made put something in /etc/local.d to write the value you want upon bootup.
You could write the scripts to handle value save/load on bootup while you are at it.
Above applies to gentoo. I have very little experience with other distros. -
What up
So I recently bought a sager np9170,., and I would love to change the colors on my keyboard
i cloned your git repo and did "make",., what else do I need to do so I can change the colors? =/
im running fedora 18 kernel: 3.7.8-202
thanks! -
Read the entire thread.
From the directory:
insmod clevo_wmi.ko
The driver interface is in /sys/devices/platform/clevo_wmi/kbled
You can try echo 1 > random
Or echo XXX > left
where X is 0 or 1
Just play around that way. -
thanks! that made it
everything works well under my laptop
colors and everything cool!
thanks a lot!
now to look for a way to play blurays on linux.. -
That's easy, too.
VLC Blu-Ray
Get the database here. Put it where it says it goes. You'll need libbluray libaacs and a player like vlc. VLC crashes a lot unless you use skins2 interface on my system. I was able to install this all using Gentoo's package manager. I am not sure what distro you use but it can be done. I have been watching the Soul Eater blu-rays with my wife with the laptop hooked up to the tv via hdmi with VLC. -
Been looking for this since I got my laptop last year! Very excited one question though I have a Malibal Lotus P150 SE would there be any problems because of this? It's built using the Clevo P150EM I'm not excellent with this linux stuff so just thought I'd ask to be safe. I'm running Ubuntu 12.04 LTS I can get you my specs if needed anyway looking forward to giving it a try!
O and I ran this to check my kernel source which you said should be in /usr/src/linux
ls /usr/src
and my output was
bbswitch-0.4.2 linux-headers-3.2.0-32
linux-headers-3.2.0-23 linux-headers-3.2.0-32-generic
linux-headers-3.2.0-23-generic linux-headers-3.2.0-33
linux-headers-3.2.0-24 linux-headers-3.2.0-33-generic
linux-headers-3.2.0-24-generic linux-headers-3.2.0-34
linux-headers-3.2.0-25 linux-headers-3.2.0-34-generic
linux-headers-3.2.0-25-generic linux-headers-3.2.0-35
linux-headers-3.2.0-26 linux-headers-3.2.0-35-generic
linux-headers-3.2.0-26-generic linux-headers-3.2.0-36
linux-headers-3.2.0-27 linux-headers-3.2.0-36-generic
linux-headers-3.2.0-27-generic linux-headers-3.2.0-37
linux-headers-3.2.0-29 linux-headers-3.2.0-37-generic
linux-headers-3.2.0-29-generic linux-headers-3.2.0-38
linux-headers-3.2.0-30 linux-headers-3.2.0-38-generic
linux-headers-3.2.0-30-generic linux-headers-3.3.6-030306
linux-headers-3.2.0-31 linux-headers-3.3.6-030306-generic
linux-headers-3.2.0-31-generic nvidia-current-304.64
Is that bad?
Also how can I tell if CONFIG_ACPI_WMI is enabled on my kernel? -
ALLurGroceries Vegan Vermin Super Moderator
Code:sudo apt get update && sudo apt-get install build-essential linux-source
Code:zgrep 'CONFIG_ACPI_WMI' /proc/config.gz
Code:grep 'CONFIG_ACPI_WMI' /boot/config-`uname -r`
-
Okay I know have the following where linux-source-3.2.0.tar.bz2 and linux-source-3.2.0 are both in my /usr/src/
Code:george@george-P15xEMx:~$ ls /usr/src/ bbswitch-0.4.2 linux-headers-3.2.0-32-generic linux-headers-3.2.0-23 linux-headers-3.2.0-33 linux-headers-3.2.0-23-generic linux-headers-3.2.0-33-generic linux-headers-3.2.0-24 linux-headers-3.2.0-34 linux-headers-3.2.0-24-generic linux-headers-3.2.0-34-generic linux-headers-3.2.0-25 linux-headers-3.2.0-35 linux-headers-3.2.0-25-generic linux-headers-3.2.0-35-generic linux-headers-3.2.0-26 linux-headers-3.2.0-36 linux-headers-3.2.0-26-generic linux-headers-3.2.0-36-generic linux-headers-3.2.0-27 linux-headers-3.2.0-37 linux-headers-3.2.0-27-generic linux-headers-3.2.0-37-generic linux-headers-3.2.0-29 linux-headers-3.2.0-38 linux-headers-3.2.0-29-generic linux-headers-3.2.0-38-generic linux-headers-3.2.0-30 linux-headers-3.3.6-030306 linux-headers-3.2.0-30-generic linux-headers-3.3.6-030306-generic linux-headers-3.2.0-31 linux-source-3.2.0 linux-headers-3.2.0-31-generic linux-source-3.2.0.tar.bz2 linux-headers-3.2.0-32 nvidia-current-304.64
Code:george@george-P15xEMx:~$ zgrep 'CONFIG_ACPI_WMI' /proc/config.gz gzip: /proc/config.gz: No such file or directory george@george-P15xEMx:~$ grep 'CONFIG_ACPI_WMI' /boot/config-`uname -r` CONFIG_ACPI_WMI=m
-
Yes you should be good to go.
From what I know the Malibals should be ok. I am 99% that the System76 Bonobo Extreme had custom firmware made so the hotkey that brings up the kbled app on windows just changes the color on the keyboard. I am not sure if this will work on that one. Let me know what happens! -
Alright cool will give it a go and report back thanks a ton for the work!
-
Working perfectly on my Malibal got my keyboard going random right now and loving it now I'm not stuck to windows to show off my keyboard thanks a ton!
-
Awesome. Have fun.
-
Thanks for driver ^^ I have made a simply UI for configure the backlight without need to remember code colors etc.
You can find source at https://github.com/izifortune/clevokbledui
And there's also a ppa for ubuntu users: https://launchpad.net/~fortune-c/+archive/ppa-fortune
Hope it will help. -
I'd like to try this but it looks like you are using a lot of python conventions I am not familiar with. I don't know what package gi.repository is in but it can't be found. I am up late trying to catch up on work and homework so I can't google anymore than I have. I will try some more hopefully tomorrow.
Why is it that everything new from Python guys doens't work with python3? I don't understand that either. -
)
And i haven't used any python conventions its just the default template of https://wiki.ubuntu.com/Quickly
I can remove all the quickly stuff if you want, gonna take some time tho ( probably this weekend ) -
That may explain it. I run Gentoo.
-
Maybe converting it with alien could work. I've added the .deb to github
-
sudo dpkg -i /path/to/deb
However I can't figure out how to run it even though it says it installed any help? Thanks
Clevo P150EM/P170EM Sager NP9150/9170 backlit keyboard driver beta testers needed
Discussion in 'Linux Compatibility and Software' started by klystron34, Feb 17, 2013.