Open fukaoi opened 2 years ago
any update?
@V1K1NGbg
unfortunately not updated
Hello @fukaoi , @V1K1NGbg ,
Have you tried using the existent configurations? There seem to be many compatible configurations like the Alienware M15, Alienware M15 R2, etc...
Best regards, rsm~
@rsm-gh
Thank you for the response. Unfortunately, I'm no longer using Alienware, so I will close this issue.
Hello @fukaoi , @V1K1NGbg ,
Have you tried using the existent configurations? There seem to be many compatible configurations like the Alienware M15, Alienware M15 R2, etc...
Best regards, rsm~
I tested on my Alienware M15 R2 with different configurations, including the "Alienware M15 R2". It doesn't work. Issue can be re-opened.
@Zeecka
What do you mean by “it doesn’t work” ? Have you tried the block testing window?
It may be an USB / protocol problem.
$ lsusb -D /dev/bus/usb/003/004
Device: ID 187c:0550 Alienware Corporation LED controller
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x187c Alienware Corporation
idProduct 0x0550 LED controller
bcdDevice 2.00
iManufacturer 1 Alienware
iProduct 2 AW-ELC
iSerial 3 00.01
bNumConfigurations 1
$ sudo ./setup
[1/5] Removing previous versions..
Disabling the systemd daemon...
Removing the python links..
Removing the software files and directories..
[2/5] Installing the software files...
installing: /usr/bin
installing: /usr/share/applications
installing: /usr/share/AKBL
install: omitting directory '/opt/akbl/usr/share/AKBL/BlockTesting'
install: omitting directory '/opt/akbl/usr/share/AKBL/computers'
install: omitting directory '/opt/akbl/usr/share/AKBL/GUI'
install: omitting directory '/opt/akbl/usr/share/AKBL/Indicator'
install: omitting directory '/opt/akbl/usr/share/AKBL/ModelChooser'
install: omitting directory '/opt/akbl/usr/share/AKBL/test'
installing: /usr/share/AKBL/test
installing: /usr/share/AKBL/launch
install: cannot stat '/opt/akbl/usr/share/AKBL/launch/*': No such file or directory
installing: /usr/share/AKBL/computers
installing: /usr/share/AKBL/GUI
install: omitting directory '/opt/akbl/usr/share/AKBL/GUI/ColorChooserToolbar'
install: omitting directory '/opt/akbl/usr/share/AKBL/GUI/img'
installing: /usr/share/AKBL/GUI/ColorChooserToolbar
installing: /usr/share/AKBL/GUI/img
installing: /usr/share/AKBL/BlockTesting
installing: /usr/share/AKBL/Indicator
install: omitting directory '/opt/akbl/usr/share/AKBL/Indicator/img'
installing: /usr/share/AKBL/Indicator/img
installing: /usr/share/AKBL/ModelChooser
installing: /usr/share/doc/AKBL
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/BusData'
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/ImagesPreview'
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/Licenses'
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/Programming'
installing: /usr/share/doc/AKBL/BusData
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/BusData/Data'
installing: /usr/share/doc/AKBL/BusData/Data
installing: /usr/share/doc/AKBL/ImagesPreview
installing: /usr/share/doc/AKBL/Licenses
installing: /usr/share/doc/AKBL/Programming
install: omitting directory '/opt/akbl/usr/share/doc/AKBL/Programming/class_diagrams'
installing: /usr/share/doc/AKBL/Programming/class_diagrams
installing: /usr/lib/python3/AKBL
install: omitting directory '/opt/akbl/usr/lib/python3/AKBL/Computer'
install: omitting directory '/opt/akbl/usr/lib/python3/AKBL/Engine'
install: omitting directory '/opt/akbl/usr/lib/python3/AKBL/Theme'
installing: /usr/lib/python3/AKBL/Engine
installing: /usr/lib/python3/AKBL/Computer
installing: /usr/lib/python3/AKBL/Theme
installing: /usr/lib/systemd/system
[3/5] Creating the python links...
linked python3.10
linked python3.11
[4/5] Choosing the computer model...
There are multiple configurations that can be used for your computer. Please select the one that matches your computer:
1) Alienware15R4
2) Alienware17R5
3) AlienwareM15
4) AlienwareM15R2
5) AlienwareM15R3
6) AlienwareM15R4
7) AlienwareM15R5
8) AlienwareM17R2
9) AlienwareX17R2
10) Area51R5
11) Area51m
12) DellG15_5515
13) DellG5_5500
14) DellG5_5590
15) DellG7_7590
or press 0 to quit.
Enter the number: 4 <-- Note, I also tested with other configuration, I had to fix with #116
Installed computer set to: AlienwareM15R2
[5/5] Enabling the daemon...
Created symlink /etc/systemd/system/basic.target.wants/akbl.service → /lib/systemd/system/akbl.service.
$ sudo systemctl status akbl
● akbl.service - AKBL Daemon
Loaded: loaded (/lib/systemd/system/akbl.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2024-01-21 16:28:25 CET; 24s ago
Main PID: 768884 (akbl)
Tasks: 7 (limit: 18644)
Memory: 12.8M
CPU: 64ms
CGroup: /system.slice/akbl.service
├─768884 /bin/bash /usr/bin/akbl --start-daemon
└─768886 python3 /usr/share/AKBL/Daemon.py
janv. 21 16:28:25 alien systemd[1]: Started AKBL Daemon.
janv. 21 16:28:25 alien bash[768886]: Starting the computer configuration 'AlienwareM15R2'.
$ sudo akbl --off
# Infinite wait
$ sudo akbl --change
# Infinite wait
$ dmesg
...
[ 6665.594076] usb 3-7: usbfs: process 768891 (python3) did not claim interface 0 before use
[ 6665.594588] usb 3-7: usbfs: interface 0 claimed by usbfs while 'python3' sets config #1
[ 6665.598723] usb 3-7: usbfs: process 768888 (python3) did not claim interface 0 before use
[ 6665.598863] usb 3-7: usbfs: interface 0 claimed by usbfs while 'python3' sets config #1
[ 6665.601000] usb 3-7: usbfs: process 768891 (python3) did not claim interface 0 before use
@Zeecka ,
But what happens when you try to use the --block-testing
? This one will really tell us the truth.
Also, I have just committed the removal of an old USB patch. In my computer with Debian is causing problems, so maybe in yours too.
rsm~
Last release install fail (ad93033) :
$ sudo ./setup
...
[3/5] Creating the python links...
linked python3.10
linked python3.11
[4/5] Choosing the computer model...
Traceback (most recent call last):
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 108, in take_over
self.__usb_device.set_configuration()
File "/usr/lib/python3/dist-packages/usb/core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/lib/python3/dist-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/AKBL/ModelChooser/cmd.py", line 24, in <module>
compatible_computers = computer_factory.get_compatible_computers()
File "/usr/lib/python3.10/AKBL/Computer/factory.py", line 39, in get_compatible_computers
driver.load_device(installed_computer.vendor_id, installed_computer.product_id)
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 56, in load_device
self.take_over()
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 110, in take_over
self.__usb_device.detach_kernel_driver(0)
File "/usr/lib/python3/dist-packages/usb/core.py", line 1121, in detach_kernel_driver
self._ctx.backend.detach_kernel_driver(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 920, in detach_kernel_driver
_check(self.lib.libusb_detach_kernel_driver(dev_handle.handle, intf))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
[5/5] Enabling the daemon...
Created symlink /etc/systemd/system/basic.target.wants/akbl.service → /lib/systemd/system/akbl.service.
Otherwise with c98dbbe :
When I try to connect to my device, it returns errors:
$ sudo akbl --block-testing
...
lsusb: symbol lookup error: lsusb: undefined symbol: libusb_get_port_numbers
Traceback (most recent call last):
File "/usr/share/AKBL/BlockTesting/BlockTesting.py", line 208, in on_togglebutton_find_device_clicked
self.__testing_driver.load_device(id_vendor=vendor, id_product=product, empty_computer=True)
TypeError: Driver.load_device() got an unexpected keyword argument 'empty_computer'
$ sudo apt search libusb- | grep installed
libhidapi-libusb0/jammy,now 0.11.2-1 amd64 [installed,automatic]
libusb-1.0-0/jammy-updates,now 2:1.0.25-1ubuntu2 amd64 [installed,automatic]
libusb-1.0-0-dev/jammy-updates,now 2:1.0.25-1ubuntu2 amd64 [installed]
$ uname -a
Linux alien 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
$ file /usr/share/AKBL/libusb-1.0.so.0
/usr/share/AKBL/libusb-1.0.so.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=779f7cd37b5743cc6c78e04ac77bc07749e8baa8, stripped
$ sudo LD_PRELOAD=/usr/share/AKBL/libusb-1.0.so.0 /usr/bin/akbl
[ERROR]: "/usr/lib/python3.10/AKBL/Bindings.py" reload_address:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/Pyro4/core.py", line 511, in connect_and_handshake
sock = socketutil.createSocket(connect=connect_location,
File "/usr/lib/python3/dist-packages/Pyro4/socketutil.py", line 307, in createSocket
sock.connect(connect)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/AKBL/Bindings.py", line 206, in reload_address
pyro.ping()
File "/usr/lib/python3/dist-packages/Pyro4/core.py", line 275, in __getattr__
self._pyroGetMetadata()
File "/usr/lib/python3/dist-packages/Pyro4/core.py", line 615, in _pyroGetMetadata
self.__pyroCreateConnection()
File "/usr/lib/python3/dist-packages/Pyro4/core.py", line 596, in __pyroCreateConnection
connect_and_handshake(conn)
File "/usr/lib/python3/dist-packages/Pyro4/core.py", line 549, in connect_and_handshake
raise ce
Pyro4.errors.CommunicationError: cannot connect to ('localhost', 34467): [Errno 111] Connection refused
Same errors with LD_PRELOAD=/usr/share/AKBL/libusb-1.0.so.0 sudo /usr/bin/akbl --block-testing
@Zeecka,
It is very hard to debug without the hardware, but anyways I have pushed some fixes to the block testing window. If we make it work, we won.
I may suggest you to try to use the block testing window, and in case of USB problems, use the LD_PRELOAD
with the one that is packaged with AKBL, or with the ones of your system.
Note: It is un-useful to try to launch other commands beside the block testing window. For example, you're launching the GUI, and you're having a Pyro error. That will not help us !
rsm~
Same errors with and without LD_PRELOAD when I attempt to connect :
$ LD_PRELOAD=/usr/share/AKBL/libusb-1.0.so.0 sudo akbl --block-testing
Traceback (most recent call last):
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 108, in take_over
self.__usb_device.set_configuration()
File "/usr/lib/python3/dist-packages/usb/core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/lib/python3/dist-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno None] Other error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/AKBL/BlockTesting/BlockTesting.py", line 187, in on_togglebutton_find_device_clicked
self.__testing_driver.load_device(id_vendor=vendor, id_product=product)
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 56, in load_device
self.take_over()
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 110, in take_over
self.__usb_device.detach_kernel_driver(0)
File "/usr/lib/python3/dist-packages/usb/core.py", line 1121, in detach_kernel_driver
self._ctx.backend.detach_kernel_driver(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 920, in detach_kernel_driver
_check(self.lib.libusb_detach_kernel_driver(dev_handle.handle, intf))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
However, when I do not specify LD_PRELOAD (or specify my own libusb-1.0.so.0), Device Connection show the following content (AKBL/PyUSB tab are disabled):
[...]
Bus 003 Device 004: ID 187c:0550 Alienware Corporation LED controller
[...]
Device: ID 187c:0550 Alienware Corporation LED controller
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x187c Alienware Corporation
idProduct 0x0550 LED controller
bcdDevice 2.00
iManufacturer 1 Alienware
iProduct 2 AW-ELC
iSerial 3 00.01
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 25
Report Descriptor: (length is -9)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0021 1x 33 bytes
bInterval 100
Also, this can be usefull:
$ sudo python3 usr/share/AKBL/ModelChooser/cmd.py
Traceback (most recent call last):
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 108, in take_over
self.__usb_device.set_configuration()
File "/usr/lib/python3/dist-packages/usb/core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/lib/python3/dist-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/akbl/usr/share/AKBL/ModelChooser/cmd.py", line 24, in <module>
compatible_computers = computer_factory.get_compatible_computers()
File "/usr/lib/python3.10/AKBL/Computer/factory.py", line 39, in get_compatible_computers
driver.load_device(installed_computer.vendor_id, installed_computer.product_id)
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 56, in load_device
self.take_over()
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 110, in take_over
self.__usb_device.detach_kernel_driver(0)
File "/usr/lib/python3/dist-packages/usb/core.py", line 1121, in detach_kernel_driver
self._ctx.backend.detach_kernel_driver(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 920, in detach_kernel_driver
_check(self.lib.libusb_detach_kernel_driver(dev_handle.handle, intf))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
I also have libusb errors when I clic on Connect with sudo LIBUSB_DEBUG=4 akbl --block-testing
:
[ 0.008749] [000f0663] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008782] [000f0663] libusb: debug [libusb_get_config_descriptor] index 0
[ 0.008807] [000f0663] libusb: debug [libusb_set_configuration] configuration 1
[ 0.010068] [000f0663] libusb: error [op_set_configuration] set configuration failed, errno=71
[ 0.010087] [000f0663] libusb: debug [libusb_detach_kernel_driver] interface 0
Traceback (most recent call last):
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 108, in take_over
self.__usb_device.set_configuration()
File "/usr/lib/python3/dist-packages/usb/core.py", line 915, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/lib/python3/dist-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno None] Other error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/AKBL/BlockTesting/BlockTesting.py", line 187, in on_togglebutton_find_device_clicked
self.__testing_driver.load_device(id_vendor=vendor, id_product=product)
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 56, in load_device
self.take_over()
File "/usr/lib/python3.10/AKBL/Engine/Driver.py", line 110, in take_over
self.__usb_device.detach_kernel_driver(0)
File "/usr/lib/python3/dist-packages/usb/core.py", line 1121, in detach_kernel_driver
self._ctx.backend.detach_kernel_driver(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 920, in detach_kernel_driver
_check(self.lib.libusb_detach_kernel_driver(dev_handle.handle, intf))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found
@Zeecka ,
Ok, so for me you should not use LD_PRELOAD
the USB modules seems to work better without. I have pushed some new, code, can you please tell me what happens after:
If the connection is done, you should be able to access the AKBL tab !
I cannot enter ID Vendor / Product in hexadecimal anymore (I had to bypass with decimal int).
Once bypassed, I got the same issue... I think it's related to libusb.
sudo LIBUSB_DEBUG=4 PYUSB_DEBUG=debug akbl --block-testing
Stacktrace : https://pastebin.com/3RK1TB79
@Zeecka ,
I fixed the HEX ID error, but sadly we will get stuck with the usb.core.USBError: [Errno 2] Entity not found
. If you really want to make it work, you may check on internet what can cause this error, and try the solutions with your hardware.
Maybe using the USB lib directly from the python command line can be helpful. The USB is being blocked from the very first connection.
Best regards, rsm~
thank you.