Giter Club home page Giter Club logo

faustus's Introduction

Faustus Project

Experimental unofficial Linux platform driver module for ASUS TUF Gaming series laptops.

It is a backport of the asus-wmi / asus-nb-wmi drivers from the mainline + RGB backlight crudely cut-down to be useful for these laptops and packed as a DKMS module for 4.x / 5.x kernels.

How to decide if I should use it?

  • If your machine does expose keyboard backlight as USB device (you see any devices with the ASUS vendor in output of lsusb) then this driver is not for you, check out CalcProgrammer1/OpenRGB, flukejones/rog-core, MidhunSureshR/openauranb or wroberts/rogauracore.
  • If your laptop does not have RGB keyboard backlight and your kernel version is >= 5.3 - everything should work out of the box and there is no reason for you to be using this driver.
  • If you either have RGB keyboard backlight that is managed via WMI, LTS kernel or you want to use features from mainline, you might want to consider trying this out.

Fair warning

This is highly experimental and controls the ACPI / WMI responsible for dangerous low-level hardware features (for instance thermal management). So the possibility exists that you could erase data, lock up the system, disable thermal management and set your laptop on fire or worse. So use at your own risk if you know what you are doing.

Systems

Model BIOS OS Kernel version Notes
FX505GM FX505GM.301 Ubuntu 18.04.2 LTS 4.18.0-25-generic
FX505DD (not tested) ? ?
FX505DY FX505DY.308 Arch Linux 5.1.15-arch1-1-ARCH
FX705GE ? ? ?
FX705DY FX705DY.304 openSUSE Tumbleweed 5.1.16-1-default
FX505GD FX505GD.304 ? ?
FX505DT FX505DT.310 Arch Linux Linux 5.7.5-arch1-1
FX505DT.304 Ubuntu 18.04.4/20.04.1 5.4.0-42-generic
FX505DT.310 openSUSE Leap 15.2 5.3.18-lp152.57-default
FX505DT.310 Manjaro 5.6.16-1-MANJARO
FX505DT.310 EndeavourOS 5.10.7-arch1-1
FX705DT FX705DT.308 Arch Linux 5.6.13-arch1-1
FX505DU FX505DU.308 Manjaro 18.1.5 5.4.13-3-MANJARO
FX705DU FX705DU.308 Arch Linux 5.4.13-zen1-1-zen
FX705GM FX705GM.305 Manjaro 5.3.18-1-MANJARO
FX505DV FX505DV.303 Ubuntu 19.10 5.3.0-29-generic
FX505GE FX505GE.302 Manjaro Linux 4.19.107-1-MANJARO
FX505GT FX505GT.305 Ubuntu 20.04 5.4.0-42-generic
FX505GT.304 Manjaro 20.0.3 5.4.52-1-MANJARO
FX505GT.305 Manjaro 5.4.64-1-MANJARO
FX505GT.303 Mint Tricia 19.3 5.4.0-58-generic
FA706II FA706II.304 ? ? 1 (#62)
FA706IU FA706IU.315 ? 5.11.8-051108-generic 1, 2 (#62)
FX506LI FX506LI.304 Ubuntu 20.04 5.4.0-70-generic 1, 2 (#63)

Notes:

  1. Fan mode control is not supported.
  2. RGB hot keys (Fn-Left, Fn-Right) are not functional.

See "Contributing" section for other versions.

To check your exact model run

sudo dmidecode | less

and scroll down to check BIOS Information / Version (2nd column) and Base Board Information / Product name (1st column).

Features

  • Additional Fn-X Hotkeys
  • Keyboard backlight intensity
  • Color and mode control for RGB keyboard backlight
  • Fan boost mode switching

UI

icodelifee/TUF-Control
A Keyboard Lighting And Fan Mode Controller GUI App - awesome Electron-based frontend for this driver (WIP).

CalcProgrammer1/OpenRGB
Open source RGB lighting control that doesn't depend on manufacturer software - supports multiple RGB controllers, including this driver.

cromer/tuf-manager
The software includes 2 different user interfaces, CLI and GUI. It is written in Vala and uses GTK3 for the GUI.

Installation

How to: first disable old drivers, then proceed using make to test that it works at all, then install via DKMS permanently and enable on boot.

Disable original modules

Create file /etc/modprobe.d/faustus.conf with the following contents and reboot the system.

blacklist asus_wmi
blacklist asus_nb_wmi

You could also try unloading the modules instead of reboot before proceeding by issuing:

sudo rmmod asus_nb_wmi
sudo rmmod asus_wmi

Some reports may suggest that you need to reboot after blacklisting, as the modules fail cleaning up on errors (do if you see AE_ALREADY_ACQUIRED in dmesg).

Install build dependencies and DKMS

$ sudo apt-get install dkms

Using make

Compile and load the driver temporarily

$ make
$ sudo modprobe sparse-keymap
$ sudo modprobe wmi
$ sudo modprobe video
$ sudo insmod src/faustus.ko

and check dmesg | tail to verify the driver is loaded and no errors are present.

[ 8295.475755] faustus: DMI checK: FX505GM
[ 8295.476475] faustus: Initialization: 0x1
[ 8295.477057] faustus: BIOS WMI version: 8.1
[ 8295.477680] faustus: SFUN value: 0x4a0061
[ 8295.477687] faustus faustus: Use DSTS
[ 8295.477691] faustus faustus: Enable event queue
[ 8295.490603] input: Asus WMI hotkeys as /devices/platform/faustus/input/input34
[ 8295.492695] faustus: Number of fans: 1

If you see:

ERROR: could not insert module src/faustus.ko: No such device

it most likely means that your system is not in the "Systems" list above and not in the DMI table. This is not a bug and does not necessarily mean that the module does not work, but as there is no evidence that it does work on your system, it will fail fast with the above error message (see "Contributing" section below for bypassing the check if you feel adventurous).

Check that everything works, the system is stable. Also try unloading the driver with

$ sudo rmmod faustus

and inserting it back.

Using DKMS

$ make dkms

The source code will probably be installed in /usr/src/faustus-<version>/ and the module itself will be compiled and installed in the current kernel module directory /lib/modules/.... It should also be automatically rebuilt when the kernel is upgraded.

Next, try to load the module

$ sudo modprobe faustus

To uninstall the DKMS module execute

$ sudo make dkmsclean

or

$ sudo dkms remove faustus/<version> --all

NOTE: The DKMS install does work with secure boot on Ubuntu 18.04.

Load on boot

On Ubuntu execute

$ sudo make onboot

or add it to your config files in the other way. Revert with

$ sudo make noboot

This is OS dependent, check the internet on how to do it right.

Usage

Keyboard backlight intensity

Is exposed via ledclass device /sys/class/leds/asus::kbd_backlight takes values 0 to 3. The driver changes brightness by itself when hotkeys are pressed.

RGB backlight

TLDR: Run the ./set_rgb.sh script as root.

NOTE: The interface will most definitely switch to LED subsystem when submitted to mainline. This here is sort of hack.

Driver exposes sysfs attributes in /sys/devices/platform/faustus/kbbl/. You have to write all the parameters and then write 1 to kbbl_set to write them permanently or 2 to write them temporarily (the settings will reset on restart or hibernation).

The list of settings is:

  • kbbl_red - red component in hex [00 - ff]
  • kbbl_green - green component in hex [00 - ff]
  • kbbl_blue - blue component in hex [00 - ff]
  • kbbl_mode - mode:
    • 0 - static color
    • 1 - breathing
    • 2 - color cycle (the color component parameters have no effect)
    • 3 - strobe (epileptic mode, speed parameter has no effect)
  • kbbl_speed - speed for modes 1 and 2:
    • 0 - slow
    • 1 - medium
    • 2 - fast
  • kbbl_flags - enable flags (must be ORed to get the value), use 2a or ff to set all
    • 02 - on boot (before module load)
    • 08 - awake
    • 20 - sleep
    • 80? - should be logically shutdown, but I have genuinely no idea what it does

Fan mode

Is controlled by default by the driver itself when Fn-F5 is pressed switching three modes:

  • 0 - normal
  • 1 - overboost
  • 2 - silent

There are two mode files available depending on the laptop model:

  • /sys/devices/platform/faustus/fan_boost_mode
  • /sys/devices/platform/faustus/throttle_thermal_policy.

In case if the throttle_thermal_policy is present, it has always all 3 modes available, whereas individual modes of fan_boost_mode may or may not be available. The mode will not be preserved on reboot or hibernation.

Contributing

If you own a machine of this series from the table above it would be much appreciated if you test the driver and write your feedback (successful and otherwise) in an issue on GitHub.

If you machine of this series is not in the list, likely it is supported too. You can check the DSDT yourself and try loading the driver without DMI verification by passing let_it_burn=1:

sudo insmod ./src/faustus.ko let_it_burn=1

and send feedback if it works.

Information to include in feedback

Always OS / kernel version and

$ sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3 
BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX505GM.301
	Release Date: 09/21/2018
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX505GM
	Version: 1.0

and additionally for a new model

$ sudo cat /sys/firmware/acpi/tables/DSDT > dsdt.aml

Roadmap

The patches are in fornext branch except for RGB backlight. This repository will provide usable DKMS version and will be maintained at least until it reaches stable Ubuntu version.

Disclaimers

Trademarks

ASUS Trademark is either a US registered trademark or trademark of ASUSTeK Computer Inc. in the United States and/or other countries. Reference to any ASUS products, services, processes, or other information and/or use of ASUS Trademarks does not constitute or imply endorsement, sponsorship, or recommendation thereof by ASUS.

All other trademarks are the property of their respective owners.

Affiliation

Moreover, ASUS does not participate, authorize, approve, sponsor, support or is affiliated with this project in any way, neither this project with ASUS.

Epilepsy warning

The driver can turn on blinking lights on the laptop that might cause seizures.

faustus's People

Contributors

hackbnw avatar icodelifee avatar redfraction avatar s-trace avatar stwagner avatar yaliv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faustus's Issues

Not working on Asus FX505DT

I am using POP OS 20.04 which is based on Ubuntu 20.04 and it s not working, I am not able to control the fan speed using it so please help me control it. The laptop contains 120hz display and GTX 1650 and is on the official latest bios version.
The information is attached below, if you need anything additional I can provide:

BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX505DT.310
	Release Date: 12/24/2019
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX505DT
	Version: 1.0

GUI App For Faustus Module

Since this module works flawlessly for me i thought why not make a GUI app for controlling features such as fan speed and keyboard lighting, well i made one now.
I present you TUF Control, GUI App made for this module for hassle free control of device features
its a WIP and opensource, so PRs are welcome and its written in electron.
My repo : link
image

can't run ./set_rgb.sh in fx505dy

I'm trying to install it in my Asus TUF FX505DY as suggested in the installation instructions. the keyboard led light intensity works fine, also the fan speed when pressing fn F5. It is a bit annoying that the keyboard led is on breathing mode, and I want to change it to static color. I assume that running set_rgb.sh as root will give me control on the pattern and color. However, when I try to run the script, it gives me this error:

./set_rgb.sh: line 4: /sys/devices/platform/faustus/kbbl/kbbl_red: No such file or directory
./set_rgb.sh: line 6: /sys/devices/platform/faustus/kbbl/kbbl_green: No such file or directory
./set_rgb.sh: line 8: /sys/devices/platform/faustus/kbbl/kbbl_blue: No such file or directory
./set_rgb.sh: line 10: /sys/devices/platform/faustus/kbbl/kbbl_mode: No such file or directory
./set_rgb.sh: line 12: /sys/devices/platform/faustus/kbbl/kbbl_speed: No such file or directory
./set_rgb.sh: line 14: /sys/devices/platform/faustus/kbbl/kbbl_flags: No such file or directory
./set_rgb.sh: line 16: /sys/devices/platform/faustus/kbbl/kbbl_set: No such file or directory

I have also tried to change the ownership of the folder and manually create the directories and the files which gives me this prompt "operation not permitted".

sudo dmidecode | grep "BIOS Inf|Board Inf" -A 3
BIOS Information
Vendor: American Megatrends Inc.
Version: FX505DY.314
Release Date: 11/01/2019

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505DY
Version: 1.0

thank you very much for your effort!

Dim static mode & workaround suggestion

At least on FX505DU I noticed that the static mode only has half the maximum brightness of Breathing mode or Strobe mode. I tested the official Windows app just to see if it makes any difference and it turned out to do the same. After experimenting a bit, I found out that (again, at least on my keyboard) sending an invalid mode command immediately stops the effects loop in the keyboard, i.e. if the keyboard is set to Breathing mode and then immediately to any invalid mode, it stays as bright as it can. The only downside to this is that the keyboard brightness keys don't work. It can be worked around if the standard brightness value was constantly set to a fixed value and the color was manipulated instead. It would even give more flexibility, as there can be more than 3 steps this way.
But, as it turns out, for some reason Faustus can not send WMI commands fast enough (see #51). The execution blocks for roughly 0.3 seconds per ACPI call, making a half a second delay per each color change, and it is either a kernel bug or it's API is used incorrectly. This fake mode can be used on Windows, but not through Faustus, even with and additional mode exposed or or with the invalid mode protection removed.
Please report if you have the same brightness issue on static mode on your model.
UPD: my tests on Windows did NOT use the second RGB device, meaning that they never stored the invalid mode to the flash. I don't know what's gonna happen if it's used, but I know that if this mode is added, the invalid mode value should not be stored in flash. What can be done instead is first set to a static mode, save to flash if necessary, then set to breathing without saving, then set to invalid mode. This way it will assume the right values after a reboot.

Question about hardware compatibility

Hi!

Your project looks very interesting.
I would like to know if I can use it with my laptop without burning it :)

Thank you!

Model: FX505G TUF565GE-AL365

dmidecode informations:

BIOS Information
Vendor: American Megatrends Inc.
Version: FX505GE.303
Release Date: 11/16/2018
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16 MB
---

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505GE
Version: 1.0
---

System Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: TUF Gaming FX505GE_FX505GE
Version: 1.0

SKU Number:  
Family: TUF Gaming
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505GE
Version: 1.0

lsb-release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.04
DISTRIB_CODENAME=disco
DISTRIB_DESCRIPTION="Ubuntu 19.04"

/proc/version:

Linux version 5.0.0-36-generic (buildd@lgw01-amd64-029) (gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)) #39-Ubuntu SMP Tue Nov 12 09:46:06 UTC 2019

`make` fails on linux-5.6.1 kernel

I have ASUS FX505DT. My current linux kernel is 5.6.1-050601-generic.
When I run the make command, this is what I get:

$ make
make -C /lib/modules/5.6.1-050601-generic/build M=/home/utkarsh/GitHub/Others/faustus modules
make[1]: Entering directory '/usr/src/linux-headers-5.6.1-050601-generic'
  CC [M]  /home/utkarsh/GitHub/Others/faustus/src/faustus.o
/home/utkarsh/GitHub/Others/faustus/src/faustus.c: In function ‘asus_hwmon_temp1’:
/home/utkarsh/GitHub/Others/faustus/src/faustus.c:1698:10: error: implicit declaration of function ‘DECI_KELVIN_TO_CELSIUS’ [-Werror=implicit-function-declaration]
 1698 |  value = DECI_KELVIN_TO_CELSIUS((value & 0xFFFF)) * 1000;
      |          ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:268: /home/utkarsh/GitHub/Others/faustus/src/faustus.o] Error 1
make[1]: *** [Makefile:1683: /home/utkarsh/GitHub/Others/faustus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.6.1-050601-generic'
make: *** [Makefile:9: default] Error 2

New UI

I wrote a new UI for this driver module: https://git.cromer.cl/cromer/tuf-manager

It would be nice to have it linked from the readme file here.

The software includes 2 different user interfaces, CLI and GUI. It is written in Vala and uses GTK3 for the GUI. I am still working on it but it is usable now.

Works on FX505DD (but lost fan speed indicator)

Running on Debian Bullseye (testing branch)

# dmidecode | grep "BIOS Inf\|Board Inf" -A 3 
BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX505DD.305
        Release Date: 05/06/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX505DD
        Version: 1.0

# uname -a
Linux cadmium 5.4.19 #1 SMP Fri Mar 20 22:15:54 CET 2020 x86_64 GNU/Linux

# cat /etc/debian_version 
bullseye/sid

Keyboard backlight control works perfectly.

Fan speed control logged (seen in logs - dmesg) but no way to check. I was using the package psensor (GUI over lm-sensors ) to monitor CPU temperature and fan speed, and after disabling both asus_wmi and asus_nb_wmi the fan speed entry is gone.

Works on FX505DV

BIOS Information
Vendor: American Megatrends Inc.
Version: FX505DV.303
Release Date: 09/19/2019
Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505DV
Version: 1.0

NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

Linux kernel: 5.3.0-29-generic

Works on FX505DT

BIOS Information
Vendor: American Megatrends Inc.
Version: FX505DT.310
Release Date: 12/24/2019

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505DT
Version: 1.0
:~> cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.2"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.2"
PRETTY_NAME="openSUSE Leap 15.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
:~> uname -a
Linux voyager 5.3.18-lp152.57-default #1 SMP Fri Dec 4 07:27:58 UTC 2020 (7be5551) x86_64 x86_64 x86_64 GNU/Linux

FR: Make `showcodes` or `xev` register `Fn` + `F5` keypress.

The driver is working really well for me, however, there's one small thing that I really miss. Currently, Fn+F5 doesn't trigger any scancode or keycode. I want to bind this key combination using i3 to display OSD on Kubuntu, therefore please consider implementing this as I think it would be very handy to conveniently see the CPU mode on screen rather than running dmesg every time.

This is the way I'm planning to show OSD:
qdbus org.kde.kscreen.osdService /org/kde/kscreen/osdService showOsd "sensors-fan-symbolic" "Performance"

write() call on kbbl_set blocks for half a second

I was working on an effects software for the keyboard and realized that calling a write() syscall on the opened kbbl_set file (which is how the update is made in the driver) changes the color immediately, however, the call does not return for about half a second after that. Using O_NONBLOCK option does not change a thing. I can't see why does this happen in the source code. Is there a way to prevent such blocking?

I am testing this on a TUF FX505DU, just in case this does not happen on other machines.

Hook for fan control mode change

I want to be able to run a script on fan control mode change. I do not know entirely how linux programming works yet, but I suppose you could let us do something like

export AFTER_FAN_MODE_CHANGE="./some-script.sh"

and actually have that script be run by the function that changes the fan control mode.

Reason: I want to make a script that reads the current preset mode of the fan control and use notify-send to show myself a notification with the new changed mode. Feel free to come with any improvements, changes, totally new ideeas to achieve the same result. I just want a way to know the mode when i use Fn + F5.

Collaboration

Hi! I spotted this in one of your comments on the GOL thread for the tool I'm working on.

I'd love to shift some of the functionality I've got working into the kernel module and hopefully in to mainline kernel some day. I've done a fair bit of research, much of what I try to post to a bug tracked here. Maybe some of this could be useful to you?

Infinite Loop Setting Fan Boost Mode

When I set fan boost mode directly with
echo "2" > /sys/devices/platform/faustus/fan_mode
the driver goes into an infinite loop, calling fan_mode_store repeatedly. Is the return value from fan_mode_store correct? If I return (ssize_t)2, the problem seems to go away.

I'm having a hard time following the code, not being much of a C programmer.

Works on FX705GM.305

Thank you, it works great.
Running on 5.3.18-1-MANJARO

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX705GM.305
        Release Date: 05/31/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX705GM
        Version: 1.0

dsdt.aml.tar.gz

Unknown key ae pressed when pressing fan button on FX505DY

Installed sucessfully, backlight works, non-rgb keyboard variant, on 19.04 Ubuntu, fresh install.
Getting "Unknown key ae pressed when pressing fan button on FX505DY" on pressing FN+F5, any other info i can provide just let me know.

Question related to fan control

Not related to the project, but I love it's ideea.
I own a FX505DT and I want to know how can I know the fan preset I am on?
I know there are those 3 Silent/Normal/Overboost, but I never know on which one I am, any ideea how I can check that?

Can't control rgb on fx505dt

I can't control for some reason my keyboard. Every file in /sys/devices/platform/faustus/kbbl has 00 value. When i try to change any file in that directory, the value switches back to 00. After installation of the driver I was able to properly control leds.
OS: Manjaro 20.04
kernel: 5.6.8-1-MANJARO
FX505DT, bios 308

FX505DV, Ubuntu 19.10 (kernel 5.3.0), RGB control works, fan control doesn't

The driver does not load with default settings because my model is not supported (as of now). When loaded with let_it_burn=1, it loads.

Keyboard backlight control works without an issue (I might test it more, for now I have tested cycle and solid color modes).

However, when I'm trying to change the fan mode by writing to /sys/devices/platform/faustus/fan_mode, the program (bash, if I try this with #echo 1 > /sys/devices/platform/faustus/fan_mode).

Another issue is that the laptop has 2 independent fans in it (I opened and looked ;) but the driver reports that only 1 fan was detected, so something is clearly off)

I would love if this was resolved and I'm ready to provide any help with this I can.

Thanks in advance.

Distro information:

$lsb_release -a                                                                                                       
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:        19.10
Codename:       eoan
$uname -a
Linux gregory-laptop 5.3.0-29-generic #31-Ubuntu SMP Fri Jan 17 17:27:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Laptop information:

$sudo dmidecode
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.
Table at 0x000EACC0.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX505DV.303
        Release Date: 09/19/2019
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16 MB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 5.14
        Firmware Revision: 11.0

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: TUF Gaming FX505DV_FX505DV
        Version: 1.0
        Serial Number: XXXXXXXXXXXXXXXXX
        UUID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        Wake-up Type: Power Switch
        SKU Number:  
        Family: TUF Gaming

Driver log (with let_it_burn=1, does not load otherwise):

$dmesg | grep faustus
[ 1355.167400] faustus: Omitting DMI verification
[ 1355.167719] faustus: Initialization: 0x1
[ 1355.167868] faustus: BIOS WMI version: 8.1
[ 1355.167990] faustus: SFUN value: 0x4a0061
[ 1355.167994] faustus faustus: Use DSTS
[ 1355.167996] faustus faustus: Enable event queue
[ 1355.175013] input: Asus WMI hotkeys as /devices/platform/faustus/input/input29
[ 1355.175761] faustus: Number of fans: 1

Module won't load on 2020 17" TUF Laptop FA706IU - newly released unit, Ryzen 7 4800H

Builds fine on kernel 5.7.0, but fails to find its desired device, even in "burn it down" mode.

Keyboard LEDs are in some sort of Wurlitzer Jukebox color-cycling mode, and nothing changes them (they do turn off after some inactivity in battery-only mode.) I've tried OpenRGB, it can't find any devices to control. This kernel has the patch to enable the second I2C bus, but that doesn't seem to have any Aura controllers on it.

I see "LED" mentioned a few times in a WMI section of the decompiled AML file, don't know if that's hope, or false hope.

I'm happy to do any experiments to help reverse-engineer this - at the moment, I've only got the Linux install, so I can't do any tracing of the Asus Windows tools, but I'll probably get to making a Windows 10 SSD soon. Contact: [email protected]

Here's some info:

BIOS Information
Vendor: American Megatrends Inc.
Version: FA706IU.309
Release Date: 07/02/2020

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FA706IU
Version: 1.0

AML file: http://asylumhouse.net/asus/dsdt.aml

This is from the MX19 Linux info-grabber, may be helpful:

[code]

System:
Host: tuftux Kernel: 5.7.0-2-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.7.0-2-amd64
root=UUID=5a870cb6-5152-49e9-84ab-f2cc8cbc6cae ro quiet splash
nvme_core.default_ps_max_latency_us=5500
Desktop: Xfce 4.14.2 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4
dm: LightDM 1.26.0 Distro: MX-19.2_ahs_x64 patito feo May 31 2020
base: Debian GNU/Linux 10 (buster)
Machine:
Type: Laptop System: ASUSTeK product: TUF Gaming FA706IU_TUF706IU v: 1.0
serial:
Mobo: ASUSTeK model: FA706IU v: 1.0 serial:
UEFI: American Megatrends v: FA706IU.309 date: 07/02/2020
Battery:
ID-1: BAT1 charge: 65.0 Wh condition: 91.9/90.2 Wh (102%) volts: 5.0/15.9
model: ASUS A32-K55 type: Li-ion serial: status: Discharging
CPU:
Topology: 8-Core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64
type: MT MCP arch: Zen family: 17 (23) model-id: 60 (96) stepping: 1
microcode: 8600104 L2 cache: 4096 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
bogomips: 92626
Speed: 1692 MHz min/max: 1400/2900 MHz boost: enabled Core speeds (MHz):
1: 1692 2: 1700 3: 1574 4: 1398 5: 1397 6: 1329 7: 1397 8: 1406 9: 1336
10: 1430 11: 1603 12: 1224 13: 1414 14: 1532 15: 1251 16: 1247
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU116M vendor: ASUSTeK driver: N/A bus ID: 01:00.0
chip ID: 10de:2191
Device-2: AMD Renoir vendor: ASUSTeK driver: amdgpu v: kernel
bus ID: 05:00.0 chip ID: 1002:1636
Display: x11 server: X.Org 1.20.4 driver: amdgpu,ati
unloaded: fbdev,modesetting,vesa resolution: 1920x1080~120Hz
OpenGL: renderer: AMD RENOIR (DRM 3.37.0 5.7.0-2-amd64 LLVM 10.0.0)
v: 4.6 Mesa 20.0.7 direct render: Yes
Audio:
Device-1: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus ID: 01:00.1 chip ID: 10de:1aeb
Device-2: AMD vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus ID: 05:00.1 chip ID: 1002:1637
Device-3: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
vendor: DekTec Digital Video B.V. driver: N/A bus ID: 05:00.5
chip ID: 1022:15e2
Device-4: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel bus ID: 05:00.6 chip ID: 1022:15e3
Sound Server: ALSA v: k5.7.0-2-amd64
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK driver: r8169 v: kernel port: e000 bus ID: 02:00.0
chip ID: 10ec:8168
IF: eth0 state: down mac:
Device-2: Realtek vendor: AzureWave driver: rtw_pci v: N/A port: d000
bus ID: 03:00.0 chip ID: 10ec:c822
IF: wlan0 state: up mac:
Drives:
Local Storage: total: 1.86 TiB used: 760.99 GiB (39.9%)
ID-1: /dev/nvme0n1 model: PCIe SSD size: 1.86 TiB block size:
physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 serial:
rev: ECFM22.6 scheme: GPT
Partition:
ID-1: / raw size: 1.83 TiB size: 1.80 TiB (98.38%)
used: 760.97 GiB (41.3%) fs: ext4 dev: /dev/nvme0n1p2
ID-2: swap-1 size: 34.03 GiB used: 24.4 MiB (0.1%) fs: swap
swappiness: 15 (default 60) cache pressure: 100 (default)
dev: /dev/nvme0n1p3
Sensors:
System Temperatures: cpu: 33.8 C mobo: N/A gpu: amdgpu temp: 33 C
Fan Speeds (RPM): N/A
Repos:
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian buster-updates main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian buster main contrib non-free
2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
3: deb http://deb.debian.org/debian buster-backports main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/insync.list
1: deb http://apt.insync.io/debian buster non-free contrib
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ buster main non-free
2: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ buster ahs
Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
1: deb [arch=amd64] https://repo.skype.com/deb stable main
Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
1: deb http://linux.teamviewer.com/deb stable main
No active apt repos in: /etc/apt/sources.list.d/various.list
Info:
Processes: 412 Uptime: 2h 45m Memory: 30.86 GiB used: 2.22 GiB (7.2%)
Init: SysVinit v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8
Shell: bash v: 5.0.3 running in: quick-system-in inxi: 3.0.36
[/code]

Can't run make dkms

I am running Arch Linux (Kernel 5.4.12) on Tuf FX705DT

On running sudo make dkms , I get

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...(bad exit status: 2)
make -j8 KERNELRELEASE=5.4.12-arch1-1 -C /usr/lib/modules/5.4.12-arch1-1/build SUBDIRS=/var/lib/dkms/faustus/0.2/build modules...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.12-arch1-1 (x86_64)
Consult /var/lib/dkms/faustus/0.2/build/make.log for more information.

Log file /var/lib/dkms/faustus/0.2/build/make.log :

DKMS make.log for faustus-0.2 for kernel 5.4.12-arch1-1 (x86_64)
Sun Jan 19 12:54:57 IST 2020
make: Entering directory '/usr/lib/modules/5.4.12-arch1-1/build'
make[1]: Nothing to be done for 'objtool'.
scripts/Makefile.build:42: arch/x86/entry/syscalls/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make: *** [arch/x86/Makefile:238: archheaders] Error 2
make: *** Waiting for unfinished jobs....
scripts/Makefile.modbuiltin:26: usr/Makefile: No such file or directory
make[1]: *** No rule to make target 'usr/Makefile'.  Stop.
make: *** [Makefile:1300: _modbuiltin_usr] Error 2
scripts/Makefile.modbuiltin:26: init/Makefile: No such file or directory
make[1]: *** No rule to make target 'init/Makefile'.  Stop.
make: *** [Makefile:1300: _modbuiltin_init] Error 2
scripts/Makefile.modbuiltin:26: certs/Makefile: No such file or directory
make[1]: *** No rule to make target 'certs/Makefile'.  Stop.
make: *** [Makefile:1300: _modbuiltin_certs] Error 2
scripts/Makefile.modbuiltin:26: kernel/dma/Makefile: No such file or directory
scripts/Makefile.modbuiltin:26: kernel/cgroup/Makefile: No such file or directory
make[2]: *** No rule to make target 'kernel/dma/Makefile'.  Stop.
make[2]: *** No rule to make target 'kernel/cgroup/Makefile'.  Stop.
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/cgroup] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/dma] Error 2
scripts/Makefile.modbuiltin:26: kernel/events/Makefile: No such file or directory
make[2]: *** No rule to make target 'kernel/events/Makefile'.  Stop.
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/events] Error 2
scripts/Makefile.modbuiltin:26: kernel/bpf/Makefile: No such file or directory
make[2]: *** No rule to make target 'kernel/bpf/Makefile'.  Stop.
scripts/Makefile.modbuiltin:26: kernel/livepatch/Makefile: No such file or directory
make[2]: *** No rule to make target 'kernel/livepatch/Makefile'.  Stop.
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/bpf] Error 2
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/livepatch] Error 2
scripts/Makefile.modbuiltin:26: kernel/irq/Makefile: No such file or directory
make[2]: *** No rule to make target 'kernel/irq/Makefile'.  Stop.
make[1]: *** [scripts/Makefile.modbuiltin:55: kernel/irq] Error 2
make: *** [Makefile:1300: _modbuiltin_kernel] Error 2
scripts/Kbuild.include:120: *** Recursive variable 'CC_OPTION_CFLAGS' references itself (eventually).  Stop.
make: *** [Makefile:1300: _modbuiltin_arch/x86] Error 2
make: Leaving directory '/usr/lib/modules/5.4.12-arch1-1/build'

Getting "No Such Device" Error on FX506LH

Need help,

BIOS Information
Vendor: American Megatrends Inc.
Version: FX506LH.304
System Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: TUF Gaming FX506LH_FX566LH

Following are the commands that I run:
git clone {faustus}
cd {dir}
make
sudo rmmod asus_wmi
sudo rmmod asus_nb_wmi
sudo insmod src/faustus.ko

Errors:

  1. I get "
    [ 1122.173987] sparse_keymap: unknown parameter 'wmi' ignored
    [ 1122.173991] sparse_keymap: unknown parameter 'video' ignored
    " in dmesg
    after running "sudo modprobe sparse-keymap wmi video"
  2. rmmod: ERROR: Module asus_wmi is not currently loaded
  3. rmmod: ERROR: Module asus_nb_wmi is not currently loaded
  4. insmod: ERROR: could not insert module src/faustus.ko: No such device

Works with FX505DT

Output for sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX505DT.310
        Release Date: 12/24/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX505DT
        Version: 1.0

image

Most of faustus functionality is now in mainline kernel

These version include all the new patches except LEDs. Multicolor LED kernel API is still in development.

5.7.11
5.8
5.4.54

Path to driver sysfs:

/sys/devices/platform/asus-nb-wmi

Someday I will port rgb API from faustus driver

Tested on FA706II (Failed)

uname -a
Linux ASUS-TUF-A17 5.8.6-1-MANJARO #1 SMP PREEMPT Thu Sep 3 14:19:36 UTC 2020 x86_64 GNU/Linux

sudo dmidecode | grep "BIOS Inf|Board Inf" -A 3

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FA706II.309
        Release Date: 07/02/2020

Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FA706II
        Version: 1.0

dsdt.aml.zip

after installing via make dkms, blaklisting asus_wmi, asus_nb_wmi, and sudo insmod ./src/faustus.ko let_it_burn=1 got this message:

insmod: ERROR: could not insert module ./src/faustus.ko: No such device

dmesg say:

[ 1566.301464] faustus: Omitting DMI verification
[ 1566.301660] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200528/dsopcode-198)
[ 1566.301670] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200528/psparse-529)
[ 1566.301727] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200528/dsopcode-198)
[ 1566.301733] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200528/psparse-529)
[ 1566.301786] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200528/dsopcode-198)
[ 1566.301791] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200528/psparse-529)
[ 1566.301803] faustus faustus: Use DSTS
[ 1566.301805] faustus faustus: Enable event queue
[ 1566.301901] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200528/dsopcode-198)
[ 1566.301906] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200528/psparse-529)
[ 1566.301957] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200528/dsopcode-198)
[ 1566.301962] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200528/psparse-529)
[ 1566.301976] faustus: probe of faustus failed with error -5
[ 1566.301998] faustus: Can't probe platform driver: -19

Works on FX705DU

Arch Linux, kernel version 5.4.13-zen1-1-zen

Filtered dmidecode output:

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX705DU.308
        Release Date: 09/19/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX705DU
        Version: 1.0

DSDT file: dsdt.aml.gz

Support for FA* series, specifically FA506II

I have just installed linux on a new TUF laptop and I think the faustus module might be possible to be extended for the FA* series.

When trying to insmod, I get the following:

[ 1454.866709] faustus: Omitting DMI verification
[ 1454.866803] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200110/dsopcode-198)
[ 1454.866807] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-529)
[ 1454.866825] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200110/dsopcode-198)
[ 1454.866827] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-529)
[ 1454.866844] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200110/dsopcode-198)
[ 1454.866846] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-529)
[ 1454.866850] faustus faustus: Use DSTS
[ 1454.866851] faustus faustus: Enable event queue
[ 1454.866883] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200110/dsopcode-198)
[ 1454.866885] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-529)
[ 1454.866902] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200110/dsopcode-198)
[ 1454.866903] ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200110/psparse-529)
[ 1454.866908] faustus: probe of faustus failed with error -5
[ 1454.866917] faustus: Can't probe platform driver: -19

The DMI bios/board versions are:

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FA506II.304
        Release Date: 03/24/2020
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FA506II
        Version: 1.0

I also attach the dsdt.aml
dsdt.aml.zip

Can you give more pointers how to help in identifying the issue and possibly adding support for my hardware? I can also try changing the code, but having no experience in linux kernel I am not sure where to start.

Arch Linux, ASUS TUF FX505DU: RGB confirmed working, but causes serious kernel malfunction

I have a laptop of the same series that is not listed in the table present in README.md (ASUS TUF FX505DU). I was looking for a way to manage the keyboard backlight on it. It is not listed as a USB device and it cannot be found by OpenRGB, so it is not i2c/SMBus either, so I attempted to use this particular driver.
There is an AUR package (faustus-dkms-git) that installs this driver, taking the sources directly from this repo.
When trying to install it as-is, I found out that it cannot be build as a DKMS, failing somewhere deep in the Linux code (https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include, line 120, CC_OPTION_CFLAGS refers to itself recursively). Removing the MAKE lines from dkms.conf made it build normally, but it fails to be inserted with insmod: ERROR: could not insert module src/faustus.ko: No such device. let_it_burn made it work, set_rgb.sh seems to work.
Please add a full checklist of all actions that need to be performed to confirm the driver 100% functional on a device, and possibly add the device to the supported list.
BIOS version: FX505DU.304, distro Arch Linux, kernel version 5.4.13-arch1-1.

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX505DU.304
        Release Date: 05/02/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX505DU
        Version: 1.0

dsdt.aml.zip.

I also noticed that in STATIC mode the keyboard light is pretty dim, even with the highest brightness setting - in other modes (pulse/strobe) it can go to much higher brightness values. It can also be brighter when the static color is somehow set prior to the driver being loaded - e.g., when in BIOS, it is always bright red. The difference can clearly be seen when waking up from suspension: it starts bright when the lid is open, but a second later, when the system is back on, it gets half as bright as it was a second ago.

Please Fix Display Flicker Issue On FX505DT

Hey, Thanks For This Awesome Module Works Flawlessly On My FX505DT.
Config :

  • DIstro : Arch [linux-5.4.12]
  • Model : FX505DT with Ryzen 5 3550H and GTX1650
  • Display : 120Hz
    Also I Would Like To Report A Issue That Is Not Related This Module But Common With All Linux Distros Tried On This Laptop.
    Issue : Display Starts Flickering/Blinking On Screen Sleep Or Logout, Also When Turning Down Refersh Rate From 120 to 48Hz [Tested On Multiple FX505DT's]
    Note : My Display Only Supports 120hz And 48Hz By Default.
    So If You Can Help Us Fix It Please It Would Be Awesome!
    Will Provide Logs On Request

Failed to set throttle thermal policy on FX505DT

I'm using https://github.com/rublag/faustus this fork, it worked first time, when I used unigine-heaven but now it doesn't change anything.

This is what it shows when i hit dmesg -wH on Manjaro, it doesn't matter which mode it is, I have the same issue with throttle thermal policy

faustus: Set throttle thermal policy mode: 1
faustus: Failed to set throttle thermal policy (retval): 0x1

Support for FA506IV

ASUS TUF A15 FA506IV running on Arch Linux, kernel 5.6.14

Believe this is related to #35

sudo dmidecode | grep "BIOS Inf|Board Inf" -A 3

BIOS Information
Vendor: American Megatrends Inc.
Version: FA506IV.304
Release Date: 03/24/2020

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FA506IV
Version: 1.0

dsdt.zip

Willing to test further and provide feedback. Thank You.

DKMS build fails on Kubuntu 20.04 LTS AMD64 with 5.4.0-21-generic kernel

Hello.

Current master branch (d068a2b) fails to build in DKMS, but builds fine using make in the source directory directly:

Пт апр 17 12:23:11-s-trace@tuf:/usr/src/faustus-0.2
^_^ git describe --always
d068a2b

Пт апр 17 12:23:11-s-trace@tuf:/usr/src/faustus-0.2
^_^ LANG=C sudo dkms build faustus/0.2

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...(bad exit status: 2)
make -j12 KERNELRELEASE=5.4.0-21-generic -C /lib/modules/5.4.0-21-generic/build SUBDIRS=/var/lib/dkms/faustus/0.2/build modules...(bad exit status: 2)
ERROR (dkms apport): binary package for faustus: 0.2 not found
Error! Bad return status for module build on kernel: 5.4.0-21-generic (x86_64)
Consult /var/lib/dkms/faustus/0.2/build/make.log for more information.

Пт апр 17 12:23:21-s-trace@tuf:/usr/src/faustus-0.2
O_O cat /var/lib/dkms/faustus/0.2/build/make.log
DKMS make.log for faustus-0.2 for kernel 5.4.0-21-generic (x86_64)
Fri Apr 17 12:23:19 MSK 2020
make: Entering directory '/usr/src/linux-headers-5.4.0-21-generic'
  DESCEND  objtool
/usr/src/linux-headers-5.4.0-21-generic/tools/build/Makefile.build:37: /usr/src/linux-headers-5.4.0-21-generic/tools/build/Build.include: No such file or directory
make[4]: *** No rule to make target '/usr/src/linux-headers-5.4.0-21-generic/tools/build/Build.include'.  Stop.
make[3]: *** [Makefile:43: /usr/src/linux-headers-5.4.0-21-generic/tools/objtool/fixdep-in.o] Error 2
make[2]: *** [/usr/src/linux-headers-5.4.0-21-generic/tools/build/Makefile.include:5: fixdep] Error 2
make[1]: *** [Makefile:67: objtool] Error 2
make: *** [Makefile:1823: tools/objtool] Error 2
make: *** Waiting for unfinished jobs....
make: Leaving directory '/usr/src/linux-headers-5.4.0-21-generic'

Пт апр 17 12:24:12-s-trace@tuf:/usr/src/faustus-0.2
^_^ LANG=C sudo make
make -C /lib/modules/5.4.0-21-generic/build M=/usr/src/faustus-0.2 modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-21-generic'
  CC [M]  /usr/src/faustus-0.2/src/faustus.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /usr/src/faustus-0.2/src/faustus.mod.o
  LD [M]  /usr/src/faustus-0.2/src/faustus.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-21-generic'

Could you please help me fix this issue?

Thank you.

Brightness controls no longer work

xbacklight changes the the value in /sys/class/backlight/faustus/brightness but my screen is only affected by changes in /sys/class/backlight/amdgpu_bl0/brightness
If I remove faustus, xbacklight works as intended.

I use an Asus FX505DT

$ uname -a
Linux Maximegalon 5.6.6-arch1-1 #1 SMP PREEMPT Tue, 21 Apr 2020 10:35:16 +0000 x86_64 GNU/Linux
$ modinfo faustus
filename:       /lib/modules/5.6.6-arch1-1/extra/faustus.ko.xz
license:        GPL
description:    Backport of Asus Generic WMI Driver
author:         Corentin Chary <[email protected]>, Yong Wang <[email protected]>
srcversion:     BD28779796F3429299C4D1F
depends:        wmi,sparse-keymap,rfkill
retpoline:      Y
name:           faustus
vermagic:       5.6.6-arch1-1 SMP preempt mod_unload
parm:           let_it_burn:Disable DMI check, force load (bool)

I also made the changes that make compilation possible on my kernel version.

Fan mode file changed

The fan mode file has changed from /sys/devices/platform/faustus/fan_mode to /sys/devices/platform/faustus/fan_boost_mode

Works on FX504GM (but sensors shows fan speeds as 0 rpm)

OS: Pop!_OS 20.04 LTS x86_64 Kernel: 5.4.0-7626-generic

BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX504GM.308
	Release Date: 06/10/2019
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX504GM
	Version: 1.0

No difference from stock asus wmi driver. The reason I tried is I was hoping it would make lm_sensors read my fan speeds as I tried everything else on the internet already with no luck. Also fn+f5 OSD would be lovely as the only way to see what mode I am in now is to see logs. Also driver doesnt load on boot. Other than that everything else works fine.

edit: It seems that no one has written a driver for ITE IT8987 chip. Shame

can't install in fx505dy

I'm trying to install it in my Asus TUF FX505DY
While doing modprobe faustus it gives me modprobe: ERROR: could not insert 'faustus': No such device
Is the driver only for the FX505GM model ?

DMI info:

    BIOS Information
        Vendor: American Megatrends Inc
        Version: FX505DY.308
        Release Date: 03/19/2019
    Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX505DY
        Version: 1.0 

Success with FX505GT

Installed with let_it_burn=1

Updating RGB settings works.
Doesn't appear to detect the fan (no "Number of fans" line in dmesg output when loading the module), but fan does throttle up when I put load on the CPU.

dsdt.aml.gz

OS: Linux Mint Tricia 19.3
Kernel: 5.4.0-58-generic

$ sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3
BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX505GT.303
	Release Date: 08/29/2019
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX505GT
	Version: 1.0

Works on FX705DT

I've tested the latest version on FX705DT, bios version FX705DT.308 running Arch Linux with kernel 5.6.13-arch1-1. RGB, brightness and fan control work well.

➜  TUF-Control git:(master) sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3
BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX705DT.308
	Release Date: 09/19/2019
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX705DT
	Version: 1.0

Works on FX505GE

Works on FX505GE but there is an issue of model not being in faustus.c so i had to manually include it and build.

OS: Manjaro Linux
Kernel: 4.19.107-1-MANJARO

Relevant model match code in faustus.c i had to include:

	{
		.callback = dmi_check_callback,
		.ident = "FX505GE",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "FX505GE"),
		},
	},

System info:

$ sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3                                                                                                                      20.3s
BIOS Information
	Vendor: American Megatrends Inc.
	Version: FX505GE.302
	Release Date: 09/21/2018
--
Base Board Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: FX505GE
	Version: 1.0

Works on model FX505GD

Board information:

dmidecode | grep "BIOS Inf|Board Inf" -A 3
BIOS Information
Vendor: American Megatrends Inc.
Version: FX505GD.304
Release Date: 01/30/2019

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505GD
Version: 1.0

Thanks for the effort!

Tried on Model FX505GT, BIOS FX505GT.308 [Failed]

Tried on Model FX505GT, BIOS FX505GT.308 [Failed]

--
BIOS Information
Vendor: American Megatrends Inc.
Version: FX505GT.308
Release Date: 09/22/2020
Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505GT
Version: 1.0

OS : Manjaro Linux x86_64 (Nibia 20.2)
Kernel: 5.8.18-1-MANJARO

Followed all the steps in readme and tried let_it_burn cause the "No such device" message appear.

sudo insmod ./src/faustus.ko let_it_burn=1

dmesg says:
[ 727.877550] faustus: SFUN value: 0x4a0061
[ 727.877552] faustus faustus: Use DSTS
[ 727.877554] faustus faustus: Enable event queue
[ 727.944665] input: Asus WMI hotkeys as /devices/platform/faustus/input/input28
[ 728.011172] battery: new extension: ASUS Battery Extension
[ 728.011743] audit: type=1106 audit(1605134471.479:169): pid=79810 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[ 728.011853] audit: type=1104 audit(1605134471.479:170): pid=79810 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[ 731.352816] audit: type=1101 audit(1605134474.819:171): pid=80362 uid=1000 auid=1000 ses=3 subj==unconfined msg='op=PAM:accounting grantors=pam_permit,pam_time acct="muhdlaziem" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[ 731.353009] audit: type=1110 audit(1605134474.819:172): pid=80362 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'
[ 731.355083] audit: type=1105 audit(1605134474.823:173): pid=80362 uid=0 auid=1000 ses=3 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/2 res=success'

Error during compilation on FX504GE

make[1]: Entering directory '/usr/src/linux-headers-5.8.0-41-generic'
  CC [M]  /home/shriraj/Desktop/temp/faustus/src/faustus.o
/home/shriraj/Desktop/temp/faustus/src/faustus.c: In function ‘asus_hwmon_temp1’:
/home/shriraj/Desktop/temp/faustus/src/faustus.c:1698:10: error: implicit declaration of function ‘DECI_KELVIN_TO_CELSIUS’ [-Werror=implicit-function-declaration]
 1698 |  value = DECI_KELVIN_TO_CELSIUS((value & 0xFFFF)) * 1000;
      |          ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:290: /home/shriraj/Desktop/temp/faustus/src/faustus.o] Error 1
make[1]: *** [Makefile:1780: /home/shriraj/Desktop/temp/faustus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-41-generic'
make: *** [Makefile:9: default] Error 2

image

Tried on ASUS FX505DV

The fan speed policy seems to work, but the keyboard backlight doesn't seem to work.
Tried on Manjaro 20.0.3 on kernel 5.4.52 LTS. I have attached the requested files.
bios-info.zip

Works with FX505GT

Works with FX505GT, BIOS version FX505GT.305, Ubuntu 20.04, kernel version 5.4.0-42-generic.
Tested and everything works as intended.

Works on the ASUS FX505DT laptop (AMD version)

I'm happy to report that faustus works flawlessly on the ASUS TUF FX505DT: all options from set_rgb.sh work, as does the fan control. Thank you!


CPU information:

[]# lscpu | grep Ryzen
Model name: AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx
[]#


Board information:

[]# dmidecode | grep "BIOS Inf|Board Inf" -A 3
BIOS Information
Vendor: American Megatrends Inc.
Version: FX505DT.304
Release Date: 05/02/2019

Base Board Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: FX505DT
Version: 1.0
[]#

Attached: DSDT

FX505DT-AMD-dsdt.aml.txt

debian buster make dkms drops an arror

Hallo,
get the fancontrol and backlight control running on buster but the permanent installation fails.
Insallationprocess described at:
debianuser

Here the some information I get from my system:
sudo make dkms

Error! There are no instances of module: faustus
0.1 located in the DKMS tree.

------------------------------
Deleting module version: 0.2
completely from the DKMS tree.
------------------------------
Done.
dkms add .

Creating symlink /var/lib/dkms/faustus/0.2/source ->
                 /usr/src/faustus-0.2


/var/lib/dkms/faustus/0.2/build/make.log

DKMS make.log for faustus-0.2 for kernel 5.4.0-0.bpo.4-amd64 (x86_64)
Thu Apr 30 11:47:46 CEST 2020
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-0.bpo.4-amd64'
sh: 0: Can't open /usr/src/linux-headers-5.4.0-0.bpo.4-common/scripts/mkmakefile
make[3]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:513: outputmakefile] Error 127
make[3]: *** Waiting for unfinished jobs....
/usr/src/linux-headers-5.4.0-0.bpo.4-common/scripts/Makefile.build:42: /usr/src/linux-headers-5.4.0-0.$
make[4]: *** No rule to make target '/usr/src/linux-headers-5.4.0-0.bpo.4-common/scripts/basic/Makefil$
make[3]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:499: scripts_basic] Error 2
make[2]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:677: include/config/auto.conf.cmd] $
make[1]: *** [/usr/src/linux-headers-5.4.0-0.bpo.4-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-0.bpo.4-amd64'

sudo dmidecode | grep "BIOS Inf\|Board Inf" -A 3 BIOS Information
        Vendor: American Megatrends Inc.
        Version: FX705DY.314
        Release Date: 11/01/2019
--
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: FX705DY
        Version: 1.0       

System:    Host: reddeck Kernel: 5.4.0-0.bpo.4-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
           Desktop: KDE Plasma 5.14.5 tk: Qt 5.11.3 wm: kwin_x11 dm: SDDM
           Distro: Debian GNU/Linux 10 (buster)
Machine:   Type: Laptop System: ASUSTeK product: TUF Gaming FX705DY_FX705DY v: 1.0 serial: <filter>
           Mobo: ASUSTeK model: FX705DY v: 1.0 serial: <filter> UEFI: American Megatrends
           v: FX705DY.314 date: 11/01/2019 
    [ 3618.190836] [drm] VCE initialized successfully.
    [ 3624.893041] amdgpu 0000:01:00.0: GPU pci config reset
    [ 5572.146656] faustus: DMI checK: FX705DY
    [ 5572.146888] faustus: Initialization: 0x1
    [ 5572.146991] faustus: BIOS WMI version: 9.0
    [ 5572.147053] faustus: SFUN value: 0x21
    [ 5572.147057] faustus faustus: Use DSTS
    [ 5572.147059] faustus faustus: Enable event queue
    [ 5572.149451] input: Asus WMI hotkeys as /devices/platform/faustus/input/input17
    [ 5572.149722] faustus: Number of fans: 0

so fn + arror up lights up the keyboard
and
fn+F5
adjust the fanmode

But I do not unterstand what is with make dkms wrong.
Thank you for your work.

Kernel API information?

Hi, I'm the developer of rog-core, and more recently the asus-nb-ctrl daemon. I'd recently split out the actual keyboard parts of rog-core in to a kernel patch for hid_asus. Just the required stuff to bring everything up to expected working level, except for LED modes and per-key control.

I haven't quite had time to read through your source here, but I noticed:

NOTE: The interface will most definitely switch to LED subsystem when submitted to mainline. This here is sort of hack.
in the readme. Is there a kernel API in development for these sorts of keyboards?

How do you handle keyboards with different levels of enablement? For the daemon I use a config file that controls what can/can't be written, and combined with a coming prev/next aura mode function this will be the main source of control for LED modes.. Do you have anything similar in mind for kernel level control of this? I'd much rather put a lot of the "factory" functionality in to the kernel.

Personally I was thinking of a a header for matching laptops and providing an array of modes supported, then utilising this in the relevant drivers (hid for the G* laptops, wmi for the FX* laptops).

Either way I'd love to collaborate here so both types of interface have the same outcome, particularly since it seems the same keyboard EC is used across both interface types.

We have a fairly busy discord if you'd like to join. Most folk here are running the Zephyrus (G*) type laptops.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.