[SOLVED] Help restoring module state during boot

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 22
Joined: Wed Jan 30, 2019 7:33 pm

[SOLVED] Help restoring module state during boot

Post by whatsforbreakfast »

Hey guys I've recently got my keyboard led's to work on Mint using the repository over at https://bitbucket.org/tuxedocomputers/clevo-xsm-wmi

The instructions for restoring the state during boot state

Code: Select all

# With the module:
$ modinfo clevo-xsm-wmi
$ sudo tee /etc/modprobe.d/clevo-xsm-wmi.conf <<< options clevo-xsm-wmi kb_color=white,white,white kb_brightness=1

# With systemd:
$ sudo systemctl enable clevo-xsm-wmi
$ sudo systemctl start clevo-xsm-wmi

# With others:
run '/usr/bin/clevo-xsm-wmi -r' at boot to restore state
run '/usr/bin/clevo-xsm-wmi -s' at shutdown/change to save state
When I attempt 'modinfo clevo-xsm-wmi' I get this error

Code: Select all

modinfo: ERROR: Module clevo-xsm-wmi not found.
If I try 'sudo systemctl enable clevo-xsm-wmi' I get

Code: Select all

Failed to enable unit: Unit file clevo-xsm-wmi.service does not exist.
The last part "with others" I don't even understand what that is suggesting to do.

I'm able to load the module just fine using

Code: Select all

sudo insmod /home/myusername/Downloads/clevo/module/clevo-xsm-wmi.ko
But that's it. I think I must be missing something really obvious, please help!
Last edited by whatsforbreakfast on Sat Feb 09, 2019 1:20 am, edited 1 time in total.
User avatar
thx-1138
Level 8
Level 8
Posts: 2114
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Help restoring module state during boot

Post by thx-1138 »

...from a very quick look at it, it looks you didn't run make install after building it?
Their instructions are slightly on the quirky side there...
Extract the zip contents, move inside the clevo/module directory, right-click & 'Open in terminal'...
make && sudo make install
Then:
sudo tee /etc/modules-load.d/clevo-xsm-wmi.conf <<< clevo-xsm-wmi
Just in case, run also sudo update-initramfs -uk all...reboot.

...the other command sets (and can adjust 'default') colors & brightness,
but looks to me like it's missing the ' quotations in the readme...should be instead:
sudo tee /etc/modprobe.d/clevo-xsm-wmi.conf <<< 'options clevo-xsm-wmi kb_color=white,white,white kb_brightness=1'
Where kb_color & kb_brightness...
#define KB_COLOR_DEFAULT KB_COLOR_blue
#define KB_BRIGHTNESS_MAX 10
And your available color options appear to be...

Code: Select all

#define COLORS { C(black,  0x000000), C(blue,    0x0000FF), \
		 C(red,    0xFF0000), C(magenta, 0xFF00FF), \
		 C(green,  0x00FF00), C(cyan,    0x00FFFF), \
	 	 C(yellow, 0xFFFF00), C(white,   0xFFFFFF), }
User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 22
Joined: Wed Jan 30, 2019 7:33 pm

Re: Help restoring module state during boot

Post by whatsforbreakfast »

You sir are an absolute legend. It works! I can't thank you enough :D

Code: Select all

make && sudo make install
Initially threw a signing error but I remembered reading something about that on the repositories page

Code: Select all

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

Code: Select all

sudo depmod
Did the trick!
User avatar
thx-1138
Level 8
Level 8
Posts: 2114
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: [SOLVED] Help restoring module state during boot

Post by thx-1138 »

...thank you for this - was quite curious myself, really glad you got it working. :)
Besides the color / brightness options' command that wouldn't work due to missing quotations,
i was also puzzled initially with their reference to systemd for starting such
(huh? they don't provide a systemd service file in the first place...)
Should have better said above that their instructions are certainly...very much on the quirky side :wink:
User avatar
whatsforbreakfast
Level 1
Level 1
Posts: 22
Joined: Wed Jan 30, 2019 7:33 pm

Re: [SOLVED] Help restoring module state during boot

Post by whatsforbreakfast »

thx-1138 wrote:
Sat Feb 09, 2019 1:37 am
...thank you for this - was quite curious myself, really glad you got it working. :)
Besides the color / brightness options' command that wouldn't work due to missing quotations,
i was also puzzled initially with their reference to systemd for starting such
(huh? they don't provide a systemd service file in the first place...)
Should have better said above that their instructions are certainly...very much on the quirky side :wink:
You're not wrong lol, those instructions have been throwing me for days. So glad to have all this up and running finally :) You were right about those quotations too, I've tried a few different configurations now and it definitely works as you said it would.

I've been updating my thread over here viewtopic.php?f=49&t=287190 with all the stuff I've figured out regarding this, and it's now freshly updated with your findings. Hopefully some future users of these laptops can benefit. Thanks again!
Post Reply

Return to “Newbie Questions”