All Projects → JafarAkhondali → acer-predator-turbo-and-rgb-keyboard-linux-module

JafarAkhondali / acer-predator-turbo-and-rgb-keyboard-linux-module

Licence: GPL-3.0 license
Linux kernel module to support Turbo mode and RGB Keyboard for Acer Predator notebook series

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to acer-predator-turbo-and-rgb-keyboard-linux-module

govee btled
A Python wrapper for controlling a cheap Bluetooth RGB light bulb.
Stars: ✭ 50 (-60%)
Mutual labels:  rgb, led
ioBroker.wled
IoBroker integration to WLED project
Stars: ✭ 22 (-82.4%)
Mutual labels:  rgb, led
esp8266-arduino-wifirgb
A RESTful API implementation to control an RGB LED Strip using an ESP8266 microcontroller.
Stars: ✭ 31 (-75.2%)
Mutual labels:  rgb, rgb-led
RGB Audio Backlight
Arduino Sketch for controlling WS2812 RGB Led Strip + Audio Visualizer
Stars: ✭ 19 (-84.8%)
Mutual labels:  rgb, led
Blink1
Official software for blink(1) USB RGB LED by ThingM
Stars: ✭ 888 (+610.4%)
Mutual labels:  rgb, led
Msirgb
Alternative to MSI Mystic Light for controlling motherboard LEDs, without the fixed 7 colour limitation.
Stars: ✭ 276 (+120.8%)
Mutual labels:  rgb, led
eruption
Realtime RGB LED Driver for Linux
Stars: ✭ 140 (+12%)
Mutual labels:  rgb, led
RGB-Fusion-Tool-PS
Powershell that use RGB Fusion CLI to associate profiles with Windows Processes
Stars: ✭ 30 (-76%)
Mutual labels:  rgb, led
Polychromatic
RGB lighting management front-end application for GNU/Linux. Powered by OpenRazer (but soon to be vendor agnostic)
Stars: ✭ 581 (+364.8%)
Mutual labels:  rgb, led
Rgb.net
The one-stop SDK for RGB-peripherals
Stars: ✭ 311 (+148.8%)
Mutual labels:  rgb, led
Arduino Rgb Tools
A arduino library with tools for controlling an RGB-LED
Stars: ✭ 37 (-70.4%)
Mutual labels:  rgb, led
mqtt-dmx-controller
A simple ArtNet / DMX Controller with MQTT Interface 💡🎬
Stars: ✭ 48 (-61.6%)
Mutual labels:  rgb, led
rgb-core
RGB Core Library: consensus validation for private & scalable client-validated smart contracts on Bitcoin & Lightning
Stars: ✭ 99 (-20.8%)
Mutual labels:  rgb
ld47-fortLoop
Fort Loop: a 48h puzzle game for Ludum Dare 47
Stars: ✭ 24 (-80.8%)
Mutual labels:  led
Sand-Table
An open-source platform for building DIY sand tables (like the Sisyphus or ZenXY)
Stars: ✭ 99 (-20.8%)
Mutual labels:  rgb
LaColorduino
I build my own clone of "LaMetric"-smartwatch but with some Colorduino for Twitch, YouTube, Twitter, CSGO, etc.. (Working)
Stars: ✭ 56 (-55.2%)
Mutual labels:  led
vdcd
vdcd - virtual device controller daemon/framework for digitalSTROM
Stars: ✭ 19 (-84.8%)
Mutual labels:  rgb
MSI-LED-Control
This is a custom controller for the MSI graphics cards.
Stars: ✭ 20 (-84%)
Mutual labels:  led
sublimetext-stringutilities
Sublime Text 2/3 plugin for string manipulations
Stars: ✭ 81 (-35.2%)
Mutual labels:  rgb
52-Weeks-of-Pi
Inspired by Shekhar Gulati's "52 technologies in 2016", I've decided to set a goal of 52 Pi ideas over the next year.
Stars: ✭ 54 (-56.8%)
Mutual labels:  rgb-led

Unofficial Acer Gaming RGB keyboard backlight and Turbo mode Linux kernel module (Acer Predator, Acer Helios, Acer Nitro)

Inspired by faustus(for asus), this project extends current acer-wmi linux kernel module to support Acer gaming functions.

Warning

Use at your own risk! Acer was not involved in developing this driver, and everything is developed by reverse engeineering official Predator Sense app. This driver interacts with low-level WMI methods which haven't been tested on all series.

Donation:

Donations are not required, but shows your ❤️ to open source and encourages me to implement more features for this project. Paypal

BNB: bnb18vseyxgydwq8xs2hmz7chekazz9jmj7uplvapg
Tether(ERC20): 0x11753b26B4d91177B779D429a6a1C1C90f722f1C
BTC: bc1qpd2v5acc8m8gjmpg78lhz5uakjxdclmawq3xdc

Note

Note to contributors:

As most of the contributions in this project are less related to the C code and as I don't own a Predator anymore, I'll soon release a video tutorial on how to reverse engineer other features of your laptop and implement it in this project.

Will this work on my laptop?

Compablity table:

Product name Turbo Mode (Implemented) Turbo Mode (Tested) RGB (Impelmented) RGB (Tested)
AN515-45 - - Yes Yes
AN515-55 - - Yes Yes
AN517-41 - - Yes Yes
PH315-52 Yes Yes Yes Yes
PH315-53 Yes Yes Yes Yes
PH317-53 Yes Yes Yes Yes
PH317-54 Yes No Yes No
PH517-51 Yes No Yes No
PH517-52 Yes No Yes No
PH517-61 Yes No Yes No
PH717-71 Yes No Yes No
PH717-72 Yes No Yes No
PT314-51 No No Yes Yes
PT315-51 Yes Yes Yes Yes
PT315-52 Yes No Yes No
PT515-51 Yes No Yes No
PT515-52 Yes No Yes No
PT917-71 Yes No Yes No

Obviously, I don't have access to all these models, so if it worked(or not) for you, kindly please mention your model on issues so we can ship this to Linux kernel.

You can find your model using this command: sudo dmidecode -s system-product-name


RGB Keyboard:

I think dynamic RGB effects should work only on 4zone RGB keyboards like 300 series but haven't tested other models.

Check the output of this command:
# file /sys/bus/wmi/devices/7A4DDFE7-5B5D-40B4-8595-4408E0CC7F56/
If the directory exists, it may work fine. Otherwise, RGB will not work at all.

Requirements

Secure boot must be disabled.
Install linux headers using your distro package manager: Ubuntu (or other Debian baseds distros):
sudo apt-get install linux-headers-$(uname -r) gcc make

Arch (I don't use arch anymore btw):
sudo pacman -S linux-headers

Install one time (Module won't work after reboot)

git clone https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module
cd "acer-predator-turbo-and-rgb-keyboard-linux-module"
chmod +x ./install.sh
sudo ./install.sh

Install as a systemd service (Will work after reboot) For Arch Linux from ExodiaOS Repo

wget https://raw.githubusercontent.com/Exodia-OS/exodia-repo/master/x86_64/Predator-Sense-systemd-git-1.0-2-any.pkg.tar.zst

sudo pacman -U Predator-Sense-systemd-git-1.0-2-any.pkg.tar.zst

Install as a systemd service (Will work after reboot)

git clone https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module
cd "acer-predator-turbo-and-rgb-keyboard-linux-module"
chmod +x ./*.sh
sudo ./install_service.sh

Install as an openrc service (Will work after reboot)

git clone https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module
cd "acer-predator-turbo-and-rgb-keyboard-linux-module"
chmod +x ./*.sh
sudo ./install_openrc.sh

Usage

Turbo mode should work fine by using the turbo button on keyboard.

For RGB, the module will mount a new character device at /dev/acer-gkbbl-0 to communicate with kernel space.
To make it easier to interact with this device, a simple python script has been attached.
./facer_rgb.py
or check help for more advanced usage:
./facer_rgb.py --help

usage: facer_rgb.py [-h] [-m MODE] [-z ZONE] [-s SPEED] [-b BRIGHTNESS] [-d DIRECTION] [-cR RED] [-cG GREEN] [-cB BLUE]

Interacts with experimental Acer-wmi kernel module.
-m [mode index]
    Effect modes:
    0 -> Static [Accepts ZoneID[1,2,3,4] + RGB Color]
    1 -> Breath [Accepts RGB color]
    2 -> Neon
    3 -> Wave
    4 -> Shifting [Accepts RGB color]
    5 -> Zoom [Accepts RGB color]

-z [ZoneID]
    Zone ID(Only in static mode):
    Possible values: 1,2,3,4

-s [speed]
    Animation Speed:
    
    0 -> No animation speed (static)
    1 -> Slowest animation speed
    9 -> Fastest animation speed
    
    You can use values between 1-9 to adjust the speed or increase speed even more than 255, but keep in mind
    that values higher than 9 were not used in the official PredatorSense application.

-b [brightness]
    Keyboard backlight Brightness:
    
    0   -> No backlight (turned off)
    100 -> Maximum backlight brightness
    
-d [direction]
    Animation direction:
    
    1   -> Right to Left
    2   -> Left to Right

-cR [red value]
    Some modes require specific [R]GB color
    
    0   -> Minimum red range
    255 -> Maximum red range

-cG [green value]
    Some modes require specific R[G]B color
    
    0   -> Minimum green range
    255 -> Maximum green range

-cB [blue value]
    Some modes require specific RG[B] color
    
    0   -> Minimum blue range
    255 -> Maximum blue range

-save [profile name]
    Add as last argument to save to a profile

-load [profile name]
    Loads the profile if it exists

-list
    Lists all the saved profiles in config directory
    config directory is "$HOME/.config/predator/saved profiles/"

optional arguments:
  -h, --help     show this help message and exit
  -m MODE
  -z ZONE
  -s SPEED
  -b BRIGHTNESS
  -d DIRECTION
  -cR RED
  -cG GREEN
  -cB BLUE
  -save NAME
  -load NAME
  -list

Sample usages:

Breath effect with Purple color(speed=4, brightness=100):
./facer_rgb.py -m 1 -s 4 -b 100 -cR 255 -cG 0 -cB 255

Neon effect(speed=3, brightness=100):
./facer_rgb.py -m 2 -s 3 -b 100

Wave effect(speed=5, brightness=100):
./facer_rgb.py -m 3 -s 5 -b 100

Shifting effect with Blue color (speed=5, brightness=100):
./facer_rgb.py -m 4 -s 5 -b 100 -cR 0 -cB 255 -cG 0

Zoom effect with Green color (speed=7, brightness=100):
./facer_rgb.py -m 5 -s 7 -b 100 -cR 0 -cB 0 -cG 255

Static waving (speed=0): ./facer_rgb.py -m 3 -s 0 -b 100

Static mode coloring (zone=1 => most left zone, color=blue):
./facer_rgb.py -m 0 -z 1 -cR 0 -cB 255 -cG 0

Static mode coloring (zone=4 => most right zone, color=purple) and save it as example:
./facer_rgb.py -m 0 -z 4 -cR 255 -cB 255 -cG 0

Load the previously saved profile: ./facer_rgb.py -load example

Known problems

If installation failed, check this issue If something didn't look right, do a reboot (or boot to windows) and play a little with some Predator Sense app to reset ACPI registers.

Uninstall:

Simply run ./uninstall.sh and (hopefully) everything should be back to normal.
If you have installed it as a service, simply run ./uninstal_service.sh

Uninstall FOR Arch Linux Only

If you install it from AUR repository RUN sudo pacman -R Predator-Sense-systemd-git

Feedback:

If this worked or didn't worked for you, kindly make a new issue, and attach the following if possible:
sudo dmidecode | grep "Product Name" -B 2 -A 4
sudo cat /sys/firmware/acpi/tables/DSDT > dsdt.aml

Contributing

Are you a developer?

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Roadmap:

  • Send patch to kernel mainline (currently only turbo mode for 315-53 is implemented)
  • Implement Turbo mode
  • Implement RGB Dynamic effects (4-zone)
  • Implement RGB Static coloring (4-zone)
  • Install as a systemd service (Thanks to Kapitoha)
  • Add support for saving\load\list profiles (Thanks to jayrfs)
  • Install as openrc service (Thanks to Axtloss)
  • Make binary package For Arch Linux (By mmsaeed509).
  • GUI (Zehra is working on this, but it's still in beta )
  • Custom Fans speed
  • Implement RGB Dynamic effects (per key RGB)
  • Implement RGB Static coloring (per key RGB)

License

GNU General Public License v3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].