-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add support to Dell G5 5590 #74
Comments
Hello @marlesson, Thanks for the details, I just added a configuration for your computer and there will probably some work to do before making it functional. Please take a look to this question and don't hesitate to ask if you have problems testing the software. Regards, |
It is not working for me. Is there something else to do to make it works? regards |
It didn't work for me either. How should I test? |
Hello, did you launch the block testing window? What was the output / problem when using it? |
I had the same error when I clicked the TEST button it freezes and became unresponsive. how should I proceed? how to log the error? |
Hi, @rsm-gh. I have a Dell G5 5590 and I will try to investigate that. I searched for usb sniffers for windows and I gave busdog[1] a quick try while changing the backlight settings on the Alienware control software or using special key to toggle the backlight on and off. I need to dive deeper into the results but it seems like this device is using a different packet format. It seems the start byte is different and maybe also de position of some values. Please let me know if you have any tips of sniffers for windows or on how to reverse enginner the messages. |
hello @mhcerri, that would be really useful ! Sadly I'm not a windows user and I can not help you with the windows sniffers but I'll try to make some doc about the current format of AKBL. Also, it makes long time that I want to add into the And by the way, if you're interested I invite you to join the AKBL Chat, which may improve the community and the fluidity of the communications. rsm~ |
Thanks, @rsm-gh! I just joined the chat. I assumed you had used the windows application as a reference to implement it. How did you find the correct packet format to use? |
Same issue here, Dell R5 5590 with RGB keyboard. I'm gonna try and reverse-engineer the windows packets |
In case anyone is working on this: Make a bare metal Windows installation and then install Alienware Command Tools (a VM won't work for this part, because the installer won't recognize your pc as being an Alienware unit). Afterwards, reboot into Linux and start that same windows installations through Qemu/libvirtd. (this can be achieved by several manners. I didn't want to take the time to mess with my SSDs, so I used a tool called Windows To Go, but it's only available for Windows 10 Enterprise. a much easier approach is just to install windows on your hard drive and point qemu to book from your physical partition. just be sure to select the EFI option (it's not a default) if your installation does not support legacy MBR booting (probably not, these newer Dell units come with legacy BIOS boot disabled). After setting everything up, before starting the virtual machine, Add the proper USB device to the virtual machine. When you start it, you will be able to control the keyboard lights from the Windows machine. I did not use the "redirect USB option". There is no reason why it wouldn't work, but I just added it as a static USB device (add hardware option if you're using virt-manager) In my case it was device 001:005 Alienware Corporation AW-ELC | 187c/0550 -- Now, if you want to intercept the packages, one of the most widely used options seem to be good old Wireshark. It's pre-packages for most distributions (in my case, I use Fedora, so I got it through dnf, but apt, pacman, yum, zipper and other mainstream packages should have it in their default repositories). You should properly setup wireshark so you can run it as a a non-root user. I just went the lazy path and ran it as root. Type lsusb to figure out what's your device's bus. In my case, I have BUS 1, so I will be using usbmon1. Usbmon0 is, as far as I'm aware, a catch-all bus which will show results from all USB buses. Check that you have the usbmon module properly setup and producing results: You will notice that there are lots of packets belonging to other devices. Now, we need the device ID to filter the output to better suit our needs. In my case I have device 1, bus 0. For the proper packets I had to use the following filter (just type/paste on the Wireshark display filter bar)
If everything is working as it should, you will mostly have packets only when you send specific commands through Windows. I will try to help decoding the packages once I have spare time, but if anyone wants to give it a shot, it should feasible to decode the meanings by comparing to what's already in this package. |
Another approach which MIGHT be interesting, might be to reverse engineer the LightFX SDK or maybe even try to get it running through wine. The documentation does mention that applications can work without the presence of AlienWare command center if you like the application using explicit dynamic linking. You can find the SDK after installing Alienware Command Center in: There's nothing authorizing the redistribution of the binaries (you can just download and extract them from alienware command center installation package I guess, not worth taking any risks). The API reference seems to be public, however, so I'm attaching the unmodified DOCX and pdf files if anyone wants to check them out. |
@etinin thanks for detailing the usb sniffing instructions, it seems really interesting ! Personally I'm not sure if I'll install windows, but it makes many years that try to motivate my self to reverse engineering the packages for this software. Anyways I'll share it for the other users and if you manage to package some specific USB packages (lights on, off, reset, etc..) don't hesitate to share it ! it will really help me to improve the software ! You can easily find me into the akbl chat. rsm~ |
hello, couldn't get the block testing feature to work. I made use of a simpler tool called "hack-alienfx-experiment" which is basically a wrapper around libusb to make some tests. this packet works for turning off: this one works for turning on: haven't got around to decoding more stuff yet. haven't yet studied enough the innards of akbl to make the changes. but it seems one of the main changes is that the packets start with 03 instead of 02. i'm attaching a sniffer session if anyone wants to help. it's commented and should be openable with wireshark. this packet dump probably contains all information we need to fully decode the 5590 rgb keyboard. whenever I did something of notice, the package has a comment. (the zip should be better to read with wireshark, but attaching a TXT conversion also, if it is of use to anyone) |
@etinin I'll try to make a fix this week end :) |
@etinin can you install the software as "Debug" and paste me the terminal output? to install the software as debug modify the |
@rsm-gh Here are some logs Opening block testing and trying to test produces some kind of loop: I'll try to do some more debugging later, to figure out the proper commands. The packets I figured out only work after "bootstraping" the device by sending commands it from Windows first. Otherwise, they don't work to turn on the lights. [EDIT] I think libusb/pyusb are having trouble setting the proper configuration. When you do make use of WIndows first, the configuration is already set, so you can actually get to send some packets. [Device found]: Vendor ID: 6268 Product ID: 1360 Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): |
FWIW - this is the latest and greatest regarding the 0550 controllers (and alikes): trackmastersteve/alienfx#41 (comment) I'm writing a simpler Python abstraction as we speak, will keep both of you guys in touch. |
Abstraction done, check it out here: https://gist.github.com/Cheaterman/accd912c6886f4055f45d0594b88553c Here a (very) basic example file: https://gist.github.com/2d166b510adc5eb9d582eaa83282c410 Here a simple zone tester (for zones 4-16 - change inside file as needed): https://gist.github.com/6911515cb12bce63e5548989b513840a I hope y'all enjoy :-) |
Hello @Cheaterman, This seems very interesting I'm very curious to take a look, sadly I have not too much free time. Would you be interested in develop for akbl? It would be great to have another developer. rsm~ |
Hi @rsm-gh ! I don't have that much time either to be honest, but I'd be happy to make some contributions :-) I looked through the codebase quickly, I think it could benefit from a more "standard" layout, which would make packaging and distribution easier :-) I also saw the nice list of ini files, that's very impressive, where did you get the data from? I've been told one can extract a list of JSON files from AlienFX for information about each device, I'm sure that could come in handy to make a one-size-fits-all tool! |
Hi, so for anyone who wants to use the backlight of this keyboard and is fine with using a single script when needed: First take this git and save it to a file in whichever folder you choose as Then create your file based on this: https://gist.github.com/2d166b510adc5eb9d582eaa83282c410 The one I use to set all 4 zones to blue is:
Save it with whichever filename you want, for example If you want to simply test the zone, use the test_zone files from above: https://gist.github.com/Cheaterman/6911515cb12bce63e5548989b513840a And then just replace all places where it says I have mentioned how I managed to make the keyboard to lit up in the chat, but it should be nice to have it written here anyway. Also, as a note, I haven't managed to use the DimCommand Command, not sure if it even works here. I tried it with |
Thanks for the info @MateusRodCosta , I’ll take a look to include the code into akbl once I get back my computer. Regards, |
Hi, so I tried this, and it only applies the color for a second then reverts to what I had. |
I suspect you might want to run an Animation instead, which should
permanently force the colors to a given value - possibly you already have
an animation running by default, saved in your ELC.
You can use the gist Mateus shared above to translate the simple 4 color
commands script into a command using an Animation to light the LEDs. I'm a
bit busy right now but I might help you with that later if you still need
it.
|
yeah if you're able to help out with this, that would be great... I'm good with programming but not the greatest with Python. |
Can confirm @Cheaterman 's gist works on my G7. 0-3 are the keyboard, and 4-16 are segments of the, uh, lap beam. FWIW, the last segment of the lap beam continues to flicker after the python example exits. |
I confirm @Cheaterman 's gist is working on Dell G5 too. Full RGB support tested. Zones 0-4 are the RGB backlight of the keyboard. |
I've been working on documenting the behavior of this RGB controller for OpenRGB. It's still not done, but most of what I've written is in this document. There are a few typos and some things I'm testing and going to end up refining. On my own test code, I've been able to change colors, mode, speed, and tempo for my Dell G5 SE for each zone separately. I've also managed to erase the default animations (and figured out that re-installing the Alienware Command Center actually re-install the animations into the controller), and I'm currently trying to figure out if it's possible to program in colors without having to save them to the controller. The controller is kind of finicky, in that if too many commands are sent too it too quickly, it'll seize up and require a full power cycle to fix. Also, some combination of parameters (at least on mine), lead it to also crash (say, setting the loop variables to 0 on the zone selection for some reason). |
Hello @gemarcano , I was very happy to see that some one is finally writing a doc about the USB controller ! It makes make years that I want to start writing that document and I never do it because I spend my time coding... So I hope that you can continue and add as much details as possible, I saw your doc and it was very good. As info, in the AKBL code I did added a delay for sending commands to avoid the problem that you are speaking about, and I never debugged why, but since pyAlienFX, some commands are sent twice. I first tough it was a bug, but actually it is necessary. Also, once that you have explored all the basic points, I suggest you to take a look to the battery power modes. That's a part of the hardware that I haven't have the time to debug and make it work. Best regards, |
My particular system doesn't appear to support power related animations, so I'm not sure how I'd get around to testing that. I can try to see if Alienware Command Control has a way to set animations based on power modes, since if it does, I can always capture the USB communications and figure out what's going on. |
@gemarcano In windows, it is not possible to set different modes and themes depending on the battery power mode? Like 'on charge" or "on battery¨? |
@rsm-gh, there is no such option on Windows for my laptop, it appears my controller doesn't support that. On the ACC menu, I am unable to select settings for any theme, which I'm guessing is where those parameters are kept. |
@gemarcano oh okay! good to know :) |
Testing this as a part of looking into #96, the @Cheaterman gist works for the G7 15 7500 with behavior similar to what @idcmp reported. |
Should I have the lights on when running the script? |
Hi, |
You're not missing something, but you're certainly a hero for showing us
the backlight timeout can be affected through sysfs (I certainly didn't
know that!).
It is my understanding that the LED bar gets shut down when keyboard
backlight is off on "our" style of laptops - the ones where the keyboard
itself isn't an actual controllable zone of the LED bar.
You can do something along those lines:
$ cd /sys/class/leds/dell::kbd_backlight/
$ echo 60m | sudo tee stop_timeout
$ cat stop_timeout
1h
|
@Cheaterman i'm using your python code... It Worked for some time... |
for some bizarre reason i reboot to windows, run a c++ app to change the color(not using the command center) and i can change have no problem at all.. I think the keyboard have 2 or more layers of configurations.. so if for some reason the level 0 config is prioritized, you cant change anything without using the official software from dell. is my take for what i observed. |
it's funny because I don't use this machine anymore, but the one I use (Alienware M15R6) seems to exhibit the exact same blinky behavior... as I mentioned in #105 I'd be very happy to add support for this device, if only I knew what exactly it expects :-) - I don't have tools or knowledge for RE-ing the Alienware control center like some people did in the past, but I could really use their assistance (or a guide on how to do what they do)! |
System information
Bug description
USB Data
Device Info
The text was updated successfully, but these errors were encountered: