rsm-gh / akbl

Control the lights of Alienware computers under GNU/Linux systems.
GNU General Public License v3.0
128 stars 24 forks source link

Add support to Alienware Area-51m #69

Open hedmo opened 5 years ago

hedmo commented 5 years ago

System information

Bug description

Hi.The daemon starts and give me 15R4 as a device.i can not apply any configuration

regards hedmo

Device: ID 187c:0550 Alienware Corporation 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x187c Alienware Corporation
  idProduct          0x0550 
  bcdDevice            2.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  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 Descriptors: 
           ** UNAVAILABLE **
      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
rsm-gh commented 5 years ago

Hi @hedmo ,

Thanks for reporting this, sadly it will demand some effort from your side to make it work. There is no current Area XXX computer in the configurations so I can not give you something to try and start working with. For the moment the GUI, Indicator, commands & bindings are not going to work for you.

What I need you to do for supporting your computer is to use the block testing window and check if you are able of changing the zone colors.

If you have some crash problem, or any question don't hesitate to ask, Regards

hedmo commented 5 years ago

rsm-gh

i updated my box to day and facing :

[4/5] Choosing the computer model...                                                       
Choose the configuration file from the GTK window that will appear..
Traceback (most recent call last):
  File "/usr/share/AKBL/launch/model_chooser.py", line 19, in <module>
    from AKBL.Addons.ModelChooser.ModelChooser import main
ModuleNotFoundError: No module named 'AKBL'

at the moment but i will try to solve it and use the block testing window.

regards hedmo

rsm-gh commented 5 years ago

@hedmo I'll make a fix for all that because it is a case that I haven't coded but anyways all those features are not important for the moment. The block testing window is a stand alone software.

rsm-gh commented 5 years ago

@hedmo , can you post me your full installation log? I'm not able of reproducing your bug

hedmo commented 5 years ago

rsm-gh I need to fix it:

hedmo@mya51 ~/Downloads/akbl-stable $ sudo akbl --block-testing
Traceback (most recent call last):
  File "/usr/share/AKBL/launch/block_testing.py", line 19, in <module>
    from AKBL.Addons.BlockTesting.BlockTesting import main
ModuleNotFoundError: No module named 'AKBL'
hedmo@mya51 ~/Downloads/akbl-stable $ 

regards

rsm-gh commented 5 years ago

@hedmo you're having a problem with the installation, I'm gonna need the full log of the setup

hedmo commented 5 years ago
hedmo@mya51 ~/Downloads/akbl-stable $ sudo ./setup 

 *********************************** 
 *** Installing AKBL v2019.05.26 *** 
 *********************************** 

[1/5] Removing previous versions..
Removing the software links..
python3.6 AKBL removed
python3.7 AKBL removed

Removing the software files and directories..
removed.f: /usr/bin/akbl
removed.f: /usr/share/applications/AKBL.desktop
removed.d: /usr/share/AKBL
removed.d: /usr/share/doc/AKBL
removed.d: /usr/lib/python3/AKBL

[2/5] Installing the software files...                                                     
 Copying the software files...
installing: /usr/bin
installing: /usr/share/applications
installing: /usr/share/AKBL
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/AKBL/computers'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/AKBL/launch'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/AKBL/test'
installing: /usr/share/AKBL/computers
installing: /usr/share/AKBL/launch
installing: /usr/share/AKBL/test
installing: /usr/share/doc/AKBL
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/doc/AKBL/BusData'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/doc/AKBL/ImagesPreview'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/doc/AKBL/Licenses'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/share/doc/AKBL/Programming'
installing: /usr/share/doc/AKBL/BusData
install: omitting directory '/home/hedmo/Downloads/akbl-stable/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 '/home/hedmo/Downloads/akbl-stable/usr/share/doc/AKBL/Programming/class_diagrams'
installing: /usr/share/doc/AKBL/Programming/class_diagrams
installing: /usr/lib/systemd/system
installing: /usr/lib/python3/AKBL
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Data'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Engine'
installing: /usr/lib/python3/AKBL/Data
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Data/Computer'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Data/Theme'
installing: /usr/lib/python3/AKBL/Data/Computer
installing: /usr/lib/python3/AKBL/Data/Theme
installing: /usr/lib/python3/AKBL/Engine
installing: /usr/lib/python3/AKBL/Addons
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/BlockTesting'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/GUI'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/Indicator'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/ModelChooser'
installing: /usr/lib/python3/AKBL/Addons/GUI
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/GUI/ColorChooserToolbar'
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/GUI/images'
installing: /usr/lib/python3/AKBL/Addons/GUI/ColorChooserToolbar
installing: /usr/lib/python3/AKBL/Addons/GUI/images
installing: /usr/lib/python3/AKBL/Addons/BlockTesting
installing: /usr/lib/python3/AKBL/Addons/Indicator
install: omitting directory '/home/hedmo/Downloads/akbl-stable/usr/lib/python3/AKBL/Addons/Indicator/images'
installing: /usr/lib/python3/AKBL/Addons/Indicator/images
installing: /usr/lib/python3/AKBL/Addons/ModelChooser
 Replacing variables...

[3/5] Creating the python links...
python3   linked (default location)
python3.6 linked
python3.7 linked

[4/5] Choosing the computer model...
Choose the configuration file from the GTK window that will appear..
Traceback (most recent call last):
  File "/usr/share/AKBL/launch/model_chooser.py", line 19, in <module>
    from AKBL.Addons.ModelChooser.ModelChooser import main
ModuleNotFoundError: No module named 'AKBL'

[5/5] Enabling the daemon...
 Warning: systemd seems to be missing. AKBL will not work.

 ************************************* 
 *** AKBL v2019.05.26 is installed *** 
 ************************************* 

hedmo@mya51 ~/Downloads/akbl-stable $ 
rsm-gh commented 5 years ago

@hedmo It seems really strange because all the files are correctly installed. What is the full log if you type (as normal user) python and then import AKBL?

hedmo commented 5 years ago
hedmo@mya51 ~/Downloads/akbl $ python 
Python 3.6.9 (default, Aug 10 2019, 22:56:53) 
[GCC 9.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import AKBL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'AKBL'
>>> 
rsm-gh commented 5 years ago

@tuxkernel I appreciate your help but please do not post if you don’t understand the problem, you are spamming the thread and giving wrong indications.

@hedmo I was busy, tonight I’ll write you how to debug the python problem (it has nothing to do with systemd).

rsm

hedmo commented 5 years ago

@rsm-gh thanks for helping me out and adding the area51m to you program.the problem is that your program installs it self in /usr/lib and not in /usr/lib64. i have created i link ln -s /usr/lib/python3/AKBL /usr/lib64/python3.6/AKBL and now it is working again:) .

But sudo akbl --block-testing does not work.it freeze and give me high udevd usage with the dmesg message :

[ 1565.300584] usb 1-4: usbfs: process 15412 (python3) did not claim interface 0 before use
[ 1565.301367] usb 1-4: usbfs: interface 0 claimed by usbfs while 'python3' sets config #1
hedmo@mya51 ~ $ 

regards hedmo

rsm-gh commented 5 years ago

@hedmo,

I'd be curious that you launch the block testing window, modify the parameter DATA_LENGTH=12 and try to do some light change (it may, may help).

If that doesn't work I may search and try to fix it, but it will take time since I can not reproduce the problem and I'm not actively developing the software.

Please keep me updated and thanks for your contributions, rsm

hedmo commented 5 years ago

@rsm-gh dont make a patch for me.i have fixed it with a ebuild for gentoo. i am keeping you updated ;)

regards hedmo

hedmo commented 5 years ago

@rsm-gh .hi again .i am still on it an getting more to the problem.this problem has been around with dell laptops for quite some time but with the bluetooth and i have it on my m17xr2:

https://bugzilla.kernel.org/show_bug.cgi?id=199035

and i have the same problem with the light controller in this (area 51m):

KERNEL[801.635967] bind /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb) UDEV [801.636255] bind /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb) KERNEL[801.636864] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb) UDEV [801.637099] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0 (usb)

I think this is the main problem for me to get this work an if i can find a way fix it with a udev.rules maybe it can be port it to akbl for future users.

regards hedmo

hedmo commented 4 years ago

note: as i am using kvm and using my preinstalled win10 ssd in it i did notice that : idVendor 0x187c Alienware Corporation idProduct 0x0550

is only for the power led,lid led,Tron led and the touch led. i know that the touch led has a entry in bios for on/off . i am going to check that one..

as for the keyboard the id is : idVendor 0x0d62 Darfon Electronics Corp. Keyboard idProduct 0x2a1c

tuxkernel commented 4 years ago

@hedmo

Are you using a second usb wired keyboard attached to Alienware Area-51m running into a kvm? If not, then try this:

This instructions are for Debian/Ubuntu. As you are Gentoo user, then change them for equals. Copy and paste the following outputs (lsusb and lspci) again.

@rsm-gh

Reading lsusb output of @TugaPowerRom USB Data (https://github.com/rsm-gh/akbl/issues/76#issue-530790264) he has reported another Darfon Electronics Corp Keyboard. The differences are:

@hedmo idProduct 0x2a1c @TugaPowerRom idProduct 0x1a1c

I think are the same issues. Saludos...

hedmo commented 4 years ago

@tuxkernel

this is more of a note but one thing that comes to my mind is if we can get the keyboard to work with akbl? what do you say @rsm-gh ?. i am running kvm with the host keyboard (alienwares) and dont going to attach an other.here is the outputs : hedmo@mya51 ~ $ sudo lsusb Bus 006 Device 003: ID 05e3:0749 Genesys Logic, Inc. Bus 006 Device 002: ID 05e3:0620 Genesys Logic, Inc. USB3.1 Hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 2104:0306 Tobii AB EyeChip Bus 001 Device 003: ID 0bda:565a Realtek Semiconductor Corp. Integrated_Webcam_HD Bus 001 Device 002: ID 187c:0550 Alienware Corporation AW-ELC Bus 001 Device 007: ID 8087:0025 Intel Corp. Bus 001 Device 009: ID 1532:0207 Razer USA, Ltd Bus 001 Device 008: ID 1532:0068 Razer USA, Ltd Bus 001 Device 006: ID 05e3:0610 Genesys Logic, Inc. 4-port hub Bus 001 Device 005: ID 0d62:2a1c Darfon Electronics Corp. Keyboard Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub hedmo@mya51 ~ $ sudo lspci 00:00.0 Host bridge: Intel Corporation 8th Gen Core 8-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S] (rev 0d) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 0d) 00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) (rev 0d) 00:02.0 Display controller: Intel Corporation UHD Graphics 630 (Desktop 9 Series) (rev 02) 00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0d) 00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model 00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10) 00:13.0 Serial controller: Intel Corporation Device a37c (rev 10) 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10) 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10) 00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 (rev 10) 00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #1 (rev 10) 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10) 00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10) 00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 (rev f0) 00:1b.4 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0) 00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0) 00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #15 (rev f0) 00:1d.7 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #16 (rev f0) 00:1e.0 Communication controller: Intel Corporation Cannon Lake PCH Serial IO UART Host Controller (rev 10) 00:1f.0 ISA bridge: Intel Corporation Z390 Chipset LPC/eSPI Controller (rev 10) 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10) 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10) 00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10) 01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] (rev a1) 01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1) 01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1) 01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C UCSI Controller (rev a1) 0a:00.0 Non-Volatile memory controller: Micron Technology Inc Device 5410 (rev 01) 0b:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 0c:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 0c:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 0c:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02) 0d:00.0 System peripheral: Intel Corporation JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] (rev 02) 43:00.0 USB controller: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] (rev 02) 44:00.0 Non-Volatile memory controller: Toshiba Corporation XG4 NVMe SSD Controller (rev 01) 45:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 3000 (rev 03) 46:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29) hedmo@mya51 ~ $

rsm-gh commented 4 years ago

Hello @tuxkernel , @hedmo ,

For the moment akbl do not supports having multiple USB devices but your remarks are quite interesting.

For testing if a device works or if it is compatible with the current code of AKBL, the easiest thing to do is to use akbl --block-testing and load the vendor and product id.

image

If you make it work trough that window, then it is pretty simple to create a new configuration file.

It makes some years that I need to do some reverse engineering and explain the USB-communication. If you are interested by doing this work for your computers modify the setup file DEBUG='True' and re-install the software. It will give you some extra messages. Ex: when turning off the keyboard:

image

I'll probably make much more debugging improvements in the future, but for the moment I'm busy doing other project to finish a chat. I hope that it will make grow the community of the software ;}

hedmo commented 2 months ago

@rsm-gh hi again . long time :) . may i ask what the state is for akbl ? . if i remember correct AW had change the usb protocol and some devices did not work like my Area-51m . i am glad akbl is still moving forward ;) .

regards hedmo

rsm-gh commented 2 months ago

Hello @hedmo ,

I still improving the software and making some commits, but not at the USB protocols since I can not test ( I do not possess an alienware computer any more).

Saddly I’m the only developper, so I don’t think that the status will change some day,

Best ragards, rsm