-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support for FA* series, specifically FA506II #35
Comments
I have a FA506II.302 myself. Did you manage to make it work ? |
Unfortunately no, I didn't. I got to the point of installing windows just to disable the blinking RGB, and spent over a day trying to make it work under windows. So far I only have red backlight, but the asus software fails to start. I tried OpenRGB under windows to sniff the i2c bus but no luck. My plan is to try another kernel in linux and see if faustus cooperates, but I am not very optimistic about it. I have one more lead, there is a user at arstechnica, nick lpt0 that seems to have made this model work reliably under linux, I assume he/she might have been able to figure out RGB keyboard as well. I cannot send PMs at arstechnica, but if you (or anyone else reading this) can - maybe you could ping that user and ask how he/she did it. |
I can't PM him either, but I believe I can try a few things given his messages. To be continued... ;-) |
I made some progress on stabilizing the beast... I have the Nvidia driver working through prime-run. @lknop did you try to edit the code that checks the device descriptors ? I am not sure it's safe to run it... @hackbnw, any remark ? (to add at line 3250 in commit #35 )
|
@xurei no, I didn't edit the code but I used the flag that skips the DMI verification
The log I pasted in the issue report is from that command as faustus nicely logged
So I cannot say it's safe but it didn't break anything in my setup, just didn't work. |
I managed to make it work. My laptop is TUF Gaming FX706II. dmidecode info:
Module asus-nb-wmi (or faustus) cannot load and prints error:
It occurs because of the difference between acpi code.
ASL code for my model:
It is similar to this issue https://patchwork.kernel.org/patch/10909549/ So I edited faustus.c like in the patch above diff --git a/src/faustus.c b/src/faustus.c
index 39c1f19..814d242 100644
--- a/src/faustus.c
+++ b/src/faustus.c
@@ -150,6 +150,8 @@ struct bios_args {
u32 arg0;
u32 arg1;
u32 arg2; /* At least TUF Gaming series uses 3 dword input buffer. */
+ u32 arg3;
+ u32 arg4;
} __packed;
/*
@@ -315,13 +317,15 @@ static void asus_wmi_input_exit(struct asus_wmi *asus)
/* WMI ************************************************************************/
-static int asus_wmi_evaluate_method3(u32 method_id,
- u32 arg0, u32 arg1, u32 arg2, u32 *retval)
+static int asus_wmi_evaluate_method5(u32 method_id,
+ u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 *retval)
{
struct bios_args args = {
.arg0 = arg0,
.arg1 = arg1,
.arg2 = arg2,
+ .arg3 = arg3,
+ .arg4 = arg4,
};
struct acpi_buffer input = { (acpi_size) sizeof(args), &args };
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -350,6 +354,12 @@ static int asus_wmi_evaluate_method3(u32 method_id,
return 0;
}
+static int asus_wmi_evaluate_method3(u32 method_id,
+ u32 arg0, u32 arg1, u32 arg2, u32 *retval)
+{
+ return asus_wmi_evaluate_method5(method_id, arg0, arg1, arg2, 0, 0, retval);
+}
+
static int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval)
{
return asus_wmi_evaluate_method3(method_id, arg0, arg1, 0, retval); Now keyboard backlight management works. But there are problems during loading:
When calling set_rgb.sh following error occurs (but color changes):
When pressing Aura next/previous key (Fn-Left/Fn-Right) it says about unknown keys:
P. S. If display brightness control doesn't work, you can use this patch (https://patchwork.freedesktop.org/patch/367486/) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ddc979e3eebe..acd4874e0743 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1377,13 +1377,10 @@ static int dm_late_init(void *handle)
*/
params.min_abm_backlight = 0x28F;
- /* todo will enable for navi10 */
- if (adev->asic_type <= CHIP_RAVEN) {
- ret = dmcu_load_iram(dmcu, params);
+ ret = dmcu_load_iram(dmcu, params);
- if (!ret)
- return -EINVAL;
- }
+ if (!ret)
+ return -EINVAL;
return detect_mst_link_for_all_connectors(adev->ddev);
} |
@rublag Do you have a fork so I can try it on my machine ? |
@xurei Not yet. You can just apply patch yourself. Or I can make a fork with the patch in a few days. |
I wish I knew how to debug this so I could try changing the address values to the correct ones in faustus.c. the address |
@Hyper-KVM In faustus there are two methods for fan control: throttle thermal policy and fan boost mode. Maybe just try to swap values for |
@Hyper-KVM On my laptop Also I don't know why, but check for thermal throttle policy passes. Probably bug in faustus driver. |
@xurei I made a fork: https://github.com/rublag/faustus |
In dmesg I get: If i change the value of NOTIFY_KBD_FBM to 0xae, It does say in dmesg it applied the fan boost mode but it doesn't seem to work in practice when stress testing?
Also, the fork does work, i get this in dmesg: |
@Hyper-KVM Yes I've added these debug mesasges to understand what's going on. I don't know how fan boost should work. But yes, I don't see any effect and in ACPI table this function seems to have no effect:
On one of the supported laptops this function is ~ 100 lines long. Does fan boost work on Windows? How can we test if it works properly? |
@rublag As far as i can tell, all 3 fan modes work correctly. Using the armory crate software of course, not sure if that has anything to do with it. |
@rublag @Hyper-KVM Fan boost does work on Windows for the FA506II as well. |
OK So a temporary solution @rublag @xurei, I changed the expected return value of setting throttle_thermal_policy from 1 to 0, and it works! the fan modes work! From 308a7dd8ec5d16d80e82d437914d9eb1d4a39fa5 Mon Sep 17 00:00:00 2001
From: Hyper-KVM <hyperkvmx86@gmail.com>
Date: Thu, 11 Jun 2020 18:59:35 -0400
Subject: [PATCH] Change expected retval from 1 to 0
---
src/faustus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/faustus.c b/src/faustus.c
index 01e1fcf..e8126b0 100644
--- a/src/faustus.c
+++ b/src/faustus.c
@@ -2136,6 +2136,8 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
value = asus->throttle_thermal_policy_mode;
+ pr_info("Set throttle thermal policy mode: %u\n", value);
+
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY,
value, &retval);
if (err) {
@@ -2143,7 +2145,7 @@ static int throttle_thermal_policy_write(struct asus_wmi *asus)
return err;
}
- if (retval != 1) {
+ if (retval != 0) {
pr_warn("Failed to set throttle thermal policy (retval): 0x%x\n",
retval);
return -EIO;
--
2.27.0 |
@xurei @rublag I have created a fork with the above patch from @Hyper-KVM. @Hyper-KVM Have you figured out which thermal policy corresponds to which fan mode? |
@lknop @Hyper-KVM You need to recompile kernel Save patch as backlight.patch and make these two changes in PKGBUILD:
and
|
@lknop The fan modes correspond to those in the readme on my machine. |
I think it's due to the fact address Edit: oh also do you guys also have an undefined method CTYP in your dmesg log? Looking in the DSDT, there's a function called _SCP which seems useless, so I removed it and that gets rid of at least that error lol. |
Made a fork with support for all FA506* and also now takes 1 or 0 as a value instead of 0. |
@Hyper-KVM I just tested your fork with my FA506II. dmesg after modprobe:
Here is my dsdt file for completeness. |
There is a BIOS update available (at least for FA506IV) that has broken cpu_fan RPM reading (not that it matters since it returned 0 anyways, it just now does not show up) but at least now most IIA0 calls will return 0xFFFFFFFE aka UNSUPPORTED, this should make it easier to narrow down the correct addresses for everything. So far there is CRFC (0x00120072) that is not defined in faustus.h, when I tried to see if that address would do anything with ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY it returned a value of -19, so I'm not sure what that means hopefully it means something to someone lol. anyway I will attach both the diff of BIOS 308 vs 304 and my full dsdt for 308. |
Some news.
|
Fixed cpu fan reporting and battery error on my fork |
So I just tested this and battery module is loaded, but cpu_fan is output as N/A, but at least it is there I guess. but definetly making progress, I may try just changing the CPU FAN value from 0x00110013 to 0x00110014 to see if that works. |
It is strange because in your dsdt there is |
edit: nvm it works now....idk why |
I added gpu fan sensor to my fork |
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:
The DMI bios/board versions are:
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.
The text was updated successfully, but these errors were encountered: