webketje / tuxedo-backlight-control

Minimal Linux (Debian) CLI & UI for TUXEDO / Clevo computers Keyboard Backlight
MIT License
43 stars 9 forks source link

Modes other than color don't work? #24

Open mbomb007 opened 1 year ago

mbomb007 commented 1 year ago

Before reporting the bug

Describe the bug

None of the modes work other than color, unless I'm doing something wrong. I tried changing the options in the UI, and nothing changed on my keyboard except the color of the whole keyboard when using the color option. Again in summary:

Works:

backlight off
backlight ui
backlight color blue

Does not work:

Using the UI to change to any mode. Or these probably pathetic attempts:

backlight color blue red blue red   # this just changes everything to blue, even though my keyboard should hypothetically have 3 regions
backlight dance
backlight color blue dance
backlight dance blue

Describe your OS environment

Additional context It'd be really helpful to see some example commands, as reading the help info didn't really give me understanding of what a valid mode-changing command would be. backlight dance says no argument was specified for dance.

webketje commented 1 year ago

Hi and thanks for having taken the time to correctly report a bug. Your setup is very similar to mine and looks 100% compatible. Please take note of the following README mention:

Development of this software is done on Clevo N150-ZU / N151-ZU. Only single color mode is known to work for these the models.

You can verify that the multi-color mode is correctly set to SysFS by doing cat color_center/right/extra (left is default). If this is the case and you can validate that assumption: my keyboard should hypothetically have 3 regions, then there is a bug in this software for multi-color mode (which i have never had the chance to test).

I tested the commands locally, and you're right in that:

backlight dance says no argument was specified for dance.

The commands in 0.8 incorrectly report an error (this is the bug), but (from my tests at least) they do toggle the keyboard mode. For you they don't?

These are all the forms of valid commands

backlight wave
backlight random
backlight dance
backlight flash
backlight color red
backlight color red blue red blue
mbomb007 commented 1 year ago

I used the UI, changed the colors to blue crimson crimson crimson, then ran this:

cd /sys/devices/platform/tuxedo_keyboard
cat color_left; cat color_center; cat color_right; cat color_extra
0000ff
dc143c
dc143c
dc143c

However, my keyboard is completely blue.

When running the "mode" commands, they all report the aforementioned error and do nothing. However, when I boot my laptop, it is doing some pulsing and changing keyboard colors (the entire keyboard the same color), so I know that some sort of flashing is supported. It also resets the color to white every time I boot, so I'll probably see if I can find a way to fix that.

After running backlight flash, I did check with cat mode, and the output is 4. Looking in the UI shows that Flash is selected. Maybe there's a bug in the driver?

I installed the driver like this, which is how I was instructed to install it:

echo "deb [arch=amd64] https://comexr.github.io/firmware/repository stable main" | sudo tee /etc/apt/sources.list.d/laptopwithlinux.list
wget -O - https://comexr.github.io/firmware/KEY.gpg | sudo tee /etc/apt/trusted.gpg.d/laptopwithlinux.asc
sudo apt update && sudo apt install tuxedo-keyboard -y
mbomb007 commented 1 year ago

Let me know if you think I should reinstall the driver from https://github.com/tuxedocomputers/tuxedo-keyboard

webketje commented 1 year ago

I used the UI, changed the colors to blue crimson crimson crimson, [...] However, my keyboard is completely blue.

Given the (expected, correct) output you have shown me for the driver files, it looks like your keyboard does not support multiple regions. I tried searching your model online but the most detailed description I got (which was the same for mine) is "multi-color keyboard". That probably means you can change the color, not that you can simultaneously have multiple colors.

When running the "mode" commands, they all report the aforementioned error and do nothing.

Ok I will look into that and provide a fix

when I boot my laptop, it is doing some pulsing and changing keyboard colors

This is preprogrammed in the firmware and has no connection to the tuxedo driver or this backlight utility (mine does it too)

Maybe there's a bug in the driver?

It's a possibility, I did test it on both the 2.x and 3.x versions and there didn't seem to be an issue

mbomb007 commented 1 year ago

I also did find a config file that specifies the configuration on boot (/etc/modprobe.d/tuxedo_keyboard.conf). So I was able to set my desired settings in there.

I may need to contact the support person who said my laptop had 3 supported regions.

mbomb007 commented 1 year ago

I may need to contact the support person who said my laptop had 3 supported regions.

I looked back at the email the support person sent. She said the keyboard theoretically supports 3 regions, but their driver doesn't yet include that functionality. Do you know if the driver at https://github.com/tuxedocomputers/tuxedo-keyboard does?

Otherwise, I could take a snapshot with Timeshift and try installing it.

webketje commented 1 year ago

The tuxedo-keyboard driver should support multiple regions and as per your second post in this issue you already installed it (not sure the support person can speak for tuxedo_computers).

While digging through their source code I did find some model-specific checks (here for example: https://github.com/tuxedocomputers/tuxedo-keyboard/blob/v3.1.3/src/clevo_keyboard.h#L749) so another possibility is that it is actually supported but some hardware component isn't recognized by the driver.

The only way to know for sure is to open an issue in their repo asking whether all regions are supported for you specific Clevo laptop model and DMI board (see source link I sent above)