zllovesuki / G14Manager

An open source alternative to manage your ROG Zephyrus G14: Supports changing Fan Profile, rebind most keys (including ROG Key), and changing Windows' Power Options
GNU General Public License v3.0
98 stars 11 forks source link

Feature Request: Ability to control the AniMe Matrix #13

Open ReK42 opened 4 years ago

ReK42 commented 4 years ago

As bad as Armoury Crate is, one of the features it has that no other program does is the ability to control the AniMe Matrix. If ROG Manager is to fully replace Armoury Crate for people with versions of the laptop that have the matrix, this feature will be important.

zllovesuki commented 4 years ago

There is actually an open source implementation to control different vendors' RGB: https://gitlab.com/CalcProgrammer1/OpenRGB. Although, I'm not sure if AniMe Matrix uses the same interface as AURA.

Since I do not have an G14 with AniMe Matrix on hand, development may be an issue. At the time of writing it doesn't seem like United States (where I'm located) is selling the version with AniMe Matrix. This may change at a later date.

ReK42 commented 4 years ago

I have a model with the matrix. I don't have the spare time to invest in development but I'd be willing to test.

zllovesuki commented 4 years ago

Although, would you be interested in trying out setting the keyboard brightness? One use case would be turning the keyboard back light on when it's sunset, and turning it off when it's sunrise.

ReK42 commented 4 years ago

That's not a feature I'd be interested in. Setting brightness based on a schedule is very unreliable. You really need an ambient light sensor to make dynamic brightness useful. Without one it becomes an annoyance for the user, in my experience.

zllovesuki commented 4 years ago

That is a valid point. We can workaround the issue of G14 not having an ALS later.

However, I mainly want to test out my theory that the keyboard brightness control interface is the same on all G14s. If you are comfortable, would you mind running this binary in the Powershell and post the output here? You can run it with regular user privilege (no need for administrator).

v1b1 commented 4 years ago

Ran on Powershell 7.0.3 on a G14 with AniMe Matrix:

{Path:\\?\hid#vid_0b05&pid_1866&mi_02&col02#8&3397f86&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030} VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product:ASUSTeK Computer Inc. UsagePage:12 Usage:1 Interface:2}
{Path:\\?\hid#vid_0b05&pid_1866&mi_02&col03#8&3397f86&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030} VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product:ASUSTeK Computer Inc. UsagePage:65329 Usage:121 Interface:2}
{Path:\\?\hid#vid_0b05&pid_1866&mi_02&col04#8&3397f86&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030} VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product:ASUSTeK Computer Inc. UsagePage:65329 Usage:128 Interface:2}
{Path:\\?\hid#vid_0b05&pid_1866&mi_00#8&247a6e1&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product: UsagePage:1 Usage:6 Interface:0}
{Path:\\?\hid#vid_0b05&pid_1866&mi_01#8&261ee4a3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product:ASUSTeK Computer Inc. UsagePage:1 Usage:6 Interface:1}
{Path:\\?\hid#vid_0b05&pid_1866&mi_02&col01#8&3397f86&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} VendorID:2821 ProductID:6246 Release:2 Serial: Manufacturer:ASUSTeK Computer Inc. Product:ASUSTeK Computer Inc. UsagePage:65329 Usage:118 Interface:2}
zllovesuki commented 4 years ago

Yep, just as I suspected, they are the same on all G14s. The only difference is the serial number.

Thanks for helping 🙂

zllovesuki commented 4 years ago

Question: If you disable the "Armoury Crate Control Interface" in Device Manager under System Devices, are you able to still interface with AniMe Matrix?

erikjoya commented 4 years ago

Anime Matrix current settings still work when disabling "Armoury crate control interface". It will stop working when I stop the armory crate service. It seems there's a persistent lightingservice.exe that's running to maintain the anime matrix which is under the aura service. Uninstalling the aura service while still having the armory crate will stop the anime matrix to work.

zllovesuki commented 4 years ago

@erikjoya would you mind posting the lightingservice.exe binary (and its associated DLL/.sys drivers) so I can take a look?

erikjoya commented 4 years ago

Here's my copy.

https://www.dropbox.com/s/pw90gxn2wrgbpzv/LightingService.zip?dl=0

Just an update. I disabled armory crate service in the services and my lights still work. The only thing that stops working is it will not automatically turn off anymore when I unplug my power.

zllovesuki commented 4 years ago

Interesting. Looks like the interface is written in C#, but it is then wrapped so LighteningService.exe (c++) can call it?

zllovesuki commented 4 years ago

Could potentially adapt the control in Linux to be used on Windows: https://github.com/flukejones/rog-core/blob/master/rog-core/src/animatrix_control.rs

erikjoya commented 4 years ago

Sorry I don't know how to code. I can only be your guinea pig

zllovesuki commented 3 years ago

It looks like someone in the community has made an effort of controlling the LEDs: https://github.com/thesacredmoocow/G14MatrixControl

I will see if this is something I can integrate

erikjoya commented 3 years ago

thanks for doing this.

zllovesuki commented 3 years ago

Hello, there's a Proof of Concept implementation available in G14Manager.

Proof of Concept binary: https://rachel.objectstore.co/dist/G14Manager/matrix.exe "Image": https://rachel.objectstore.co/dist/G14Manager/buf.txt

How to use: 1) open a PowerShell 2) Run Get-Content buf.txt | .\matrix.exe

Armory Crate should not be running (the main program or the services). There might be an issue with WinUSB driver, but we can test it later. This should show a star like pattern:

image

erikjoya commented 3 years ago
 Sent from Mail for Windows 10 From: Rachel ChenSent: Wednesday, December 9, 2020 8:58 AMTo: zllovesuki/G14ManagerCc: erikjoya; MentionSubject: Re: [zllovesuki/G14Manager] Feature Request: Ability to control the AniMe Matrix (#13) Hello, there's a Proof of Concept implementation available in G14Manager.Proof of Concept binary: https://rachel.objectstore.co/dist/G14Manager/matrix.exe"Image": https://rachel.objectstore.co/dist/G14Manager/buf.txtHow to use:open a PowerShellRun Get-Content buf.txt | .\matrix.exeArmory Crate should not be running (the main program or the services). There might be an issue with WinUSB driver, but we can test it later. This should show a star like pattern:—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe. 
congyoua commented 2 years ago

in the lastest win11, uninstalling the Armory Crate Services and UWP app does not disable the anime matrix because the AURA lighting service it relies on is still working. This means that we can set everything up before we uninstall ACS.

But without ACS, the animation will always be there, no matter plugged in or not. I hope I can turn it off when on battery and turn it on when plugged in, don't really need a complicated controller, just hope there could be a simple switch or small app for that.

SinanAkkoyun commented 1 year ago

Hey! It doesn't work for me, what should I do? Do I first need to install the WinUSB driver (provided by the repo you mentioned) and if so, how?

initializing controller
MatrixController: Attempting to find AniMe Matrix Device
MatrixController: Device \\?\usb#vid_0b05&pid_193b#6&7e781f5&0&4#{a5dcbf10-6530-11d2-901f-00c04fb951ed} found
MatrixController: Attempting to create file Handle to AniMe Matrix Device
MatrixController: Unable to create file Handle to AniMe Matrix Device: 0
panic: [matrix] Cannot obtain controller

goroutine 1 [running]:
main.main()
        C:/Users/zllov/G14/G14Manager/poc/matrix/main.go:43 +0x569

Thank you a lot for this awesome repo of yours!

SinanAkkoyun commented 1 year ago

Nvm, it "works"!! It doesnt display a star pattern though.. it groups as weird star formations and when it's done, there does exist a line.

If you are still wokring on this and need a picture I will send it. This is btw tested on a G14 2022

zllovesuki commented 1 year ago

@SinanAkkoyun it is possible that the 2022 version has a different matrix pattern. Is there a spec sheet somewhere we can see how many pixels they have?

rmzNadir commented 1 year ago

Any chance you could make this work with the anime matrix of an x670e crosshair extreme mobo?