Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'backlight_control' #23

Open
pescepalla opened this issue Nov 9, 2022 · 5 comments
Open

No module named 'backlight_control' #23

pescepalla opened this issue Nov 9, 2022 · 5 comments

Comments

@pescepalla
Copy link

Fresh install, getting this error on launch:

Traceback (most recent call last):
  File "/usr/local/bin/backlight", line 6, in <module>
    from backlight_control import BacklightControl, backlight
ModuleNotFoundError: No module named 'backlight_control'
@webketje
Copy link
Owner

webketje commented Nov 9, 2022

Hmm, this looks like a Python issue. I created a bug report template following your issue. Could you edit it using this markdown template? I need a bit more info to get this fixed

@pescepalla
Copy link
Author

pescepalla commented Nov 11, 2022

Before reporting the bug

  • I have looked at existing issues and none solved my problem
  • I have installed the tuxedo_keyboard driver and rebooted

I have installed tuxedo-keyboard-dkms tuxedo-keyboard-ite-dkms from AUR

  • I have made sure my laptop model is a TUXEDO / Clevo computer or derivative - it is a Stellaris 17

Describe the bug
I have run backlight as superuser. I prefer not to run GUI apps as superuser. After running the command, the following returns:

Traceback (most recent call last):
  File "/usr/local/bin/backlight", line 6, in <module>
    from backlight_control import BacklightControl, backlight
ModuleNotFoundError: No module named 'backlight_control'

Describe your OS environment

  • tuxedo-backlight-control version: (run backlight --version and paste the result here):

Running backlight with any options results in the error message. The AUR package builds the git version.

  • which tuxedo_keyboard version is installed? (run cat /sys/module/tuxedo_keyboard/version and paste the result here):
    I get No such file or directory though I have installed the following packages from the AUR:
tuxedo-keyboard-dkms
tuxedo-keyboard-ite-dkms

However, as I installed them, I get the following message:

==> ERROR: Missing 6.0.8-arch1-1 kernel modules tree for module tuxedo-keyboard/3.1.1.
==> ERROR: Missing 6.0.7-arch1-1 kernel headers for module tuxedo-keyboard/3.1.1.

Could it be that the packages are built against an older kernel?

  • Python version: (run python --version and paste the result here):
Python 3.10.8
  • OS details:
Static hostname: stellaris
Icon name: computer-laptop
Chassis: laptop 💻
Machine ID: f5c3b22a5a7b4676922177f724300bf4
Boot ID: 0fa38a8af4a24af2a85aa135db867c85
Operating System: Arch Linux                      
Kernel: Linux 6.0.7-arch1-1
Architecture: x86-64
Hardware Vendor: TUXEDO
Hardware Model: TUXEDO Stellaris AMD Gen3 _CZN_
Firmware Version: N.1.24A10
  • tuxedo_keyboard SysFS folder is correctly installed:
ls: cannot access '/sys/devices/platform/tuxedo_keyboard': No such file or directory

Additional context
Sway WM

@webketje
Copy link
Owner

webketje commented Nov 12, 2022

Thank you, the issue you reported can be easily fixed.
However, you will immediately hit another issue because the SysFS seems to be missing in your case.
There are multiple issues at play here and this time I want to get to the bottom of it:

So my best guess for you to try would be:

  1. Uninstall tuxedo-keyboard-dkms and tuxedo-keyboard-ite (I need to test it out and see whether any compatibility issues arise)
  2. Install tuxedo-keyboard instead
  3. Download the Arch release tuxedo-backlight-control-0.8.0-1-any.pkg.tar.xz from https://github.com/webketje/tuxedo-backlight-control/releases/tag/v0.8.0, extract it and cd into it
  4. Run makepkg --install and see if it works

@pescepalla
Copy link
Author

pescepalla commented Nov 12, 2022

Thanks for taking the time to look into this.

I've installed the package as per your instructions. It still complains that The tuxedo_keyboard module is not installed at /sys/devices/platform/tuxedo_keyboard/. I suppose this is due to the fact that I'm running kernel 6.0.7.

Apart from this, tuxedo-control-center-bin requires tuxedo-keyboard-dkms which conflicts with tuxedo-keyboard (because the latter is out-of-date). Not having tuxedo-control-center is sort of a bummer.

@webketje
Copy link
Owner

I understand, my model is a Clevo (not Tuxedo) so I'm not affected by this issue.
Thanks for taking the time to test it. FWIW while looking through the code over at tuxedo_keyboard, I noticed the SysFS integration is done in clevo_keyboard.h while the Stellaris model is mentioned in uniwill_keyboard.h. When I created tuxedo-backlight-control this interface didn't even exist, and given I have no such model I can impossibly support it. The only thing I can do is update the README to mention this pkg will only work with the Clevo interface.

Btw for future readers, step 4 of my last message should have been pacman -U tuxedo-backlight-control-0.8.0-1-any.pkg.tar.xz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants