Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UX3402ZA #151

Open
irvng-wav opened this issue Mar 8, 2024 · 15 comments
Open

Add support for UX3402ZA #151

irvng-wav opened this issue Mar 8, 2024 · 15 comments
Assignees
Labels
add new device Add support for new device AE_NOT_FOUND Unable to perform a fan ACPI call help wanted Extra attention is needed

Comments

@irvng-wav
Copy link

Environment
AFC Version: 3.15.0
OS version: Arch Linux with Kernel Linux 6.7.9-arch1-1
CPU Name: 12th Gen Intel® Core™ i7-1260P × 16

It does not work
I get the infamous acpi call failed with 'Error: AE_NOT_FOUND'. I know that right now there's no solution for it but I want to keep the conversation going.

Additional context
I found this article on the Arch Wiki about the ASUS Zenbook UM3402YAR, which is basically the same laptop but with an AMD cpu and gpu. There's a tutorial on how to change the fan profiles with a tool called nbfc which looks like it isn't maintained anymore, so I found an up to date Linux fork called nbfc-linux.

In Windows, you get the MyAsus App which lets you choose between three different fan profiles: Quiet, Balanced, and Performance. As I understand, each one of those modes has an hexadecimal value that you can manually set with the nbfc or nbfc-linux tool, that's explained in the Arch Wiki. I'm able to change between those fan modes, and it actually works. When I write the value for the quiet mode, the fans go quiet, and when I write it for the performance mode, the fans do start spinning faster but not as they do with Windows.

That's where I'm at. It kinda works. I installed the DOOM 2016 game both in Windows and Linux. In Windows, when the fan profile is either at Quiet or Balanced, the game runs at around 30 to 40 fps. But then if I engage the performance mode, the fans start working intensely and the game ramps up to a stable 60 fps. That doesn't happen on Linux. Either one of the three modes basically offers the same performance as Quiet or Balanced in Windows, meaning 30 to 40 fps.

Also I do music production as a part time freelance job. There's one piece of software called Vital, which runs perfectly on Windows with the performance mode, but sometimes struggles with the other two fan modes. In Linux I get the same performance with all three modes, and like with DOOM, it doesn't run quite as great as Windows with the performance mode.

Still, Linux is an awesome experience with this machine, and most of my needs are covered in it's current state. But dammit Asus, I want a true performance mode in Linux.

I hope we can get it to that state someday. Thank you @dominiksalvet for your work!

@irvng-wav irvng-wav added the add new device Add support for new device label Mar 8, 2024
@dominiksalvet dominiksalvet added the AE_NOT_FOUND Unable to perform a fan ACPI call label Mar 10, 2024
@dominiksalvet
Copy link
Owner

Hmmm... I think I saw similar behavior somewhere in the AFC issues. Unfortunately, I do not remember where, so I can't point you to the issue. Maybe try searching "max" among all issues.

Should you find something interesting, definitely link this issue with it, so people have more context. I can keep this issue open as long as it is relevant.

@dominiksalvet dominiksalvet added the help wanted Extra attention is needed label Mar 10, 2024
@akvadrako
Copy link

akvadrako commented Jun 4, 2024

I also get this acpi call failed with 'Error: AE_NOT_FOUND' error with my Asus Zenbook UX3404VC with i9-13900H. Same with afc-scout for the recommended ranges.

I gather this is a common issue, but what does it mean? Is there anything I can do to help?

@akvadrako
Copy link

Well I have figured out how to read the fan mode with acpi_call:

echo '\_SB_.PC00.LPCB.H_EC.ECRD "QFAN"'> /proc/acpi/call
cat /proc/acpi/call

To write the fan mode, one can use \.ATKD.FANL 1 (1=silent, 0=default, 2=performance)

@dominiksalvet
Copy link
Owner

@akvadrako Well, I believe that your examination could help someone (at least with the same laptop). 🚀 Maybe you could create a simple script and publish it on GitHub. If so, you can use, just like AFC, GitPack for its distribution since it's completely effortless. Think about it 😃

@akvadrako
Copy link

For now if anyone has this issue they can find it here. And it should be fixed in a near future kernel version so anybody can use the standard /sys/firmware/acpi/platform_profile.

https://lore.kernel.org/platform-driver-x86/[email protected]/T/

@barolo
Copy link

barolo commented Jul 20, 2024

For now if anyone has this issue they can find it here. And it should be fixed in a near future kernel version so anybody can use the standard /sys/firmware/acpi/platform_profile.

https://lore.kernel.org/platform-driver-x86/[email protected]/T/

I have the same laptop as OP but with kernel 6.10, I cannot make it work.

echo '\_SB_.PC00.LPCB.H_EC.ECRD "QFAN"'> /proc/acpi/call
cat /proc/acpi/call

returns 0x0

any hints?

@akvadrako
Copy link

That seems correct. It says your fan mode is Standard.

To set silent mode use echo '\.ATKD.FANL 1' > /proc/acpi/call

@barolo
Copy link

barolo commented Jul 20, 2024

That seems correct. It says your fan mode is Standard.

To set silent mode use echo '\.ATKD.FANL 1' > /proc/acpi/call

It doesn't seem to be doing anything, fan behaves the same
and /proc/acpi/call returns Error: AE_NOT_FOUND after

@akvadrako
Copy link

Then I guess that laptop is different. If you want to try to discover the right call, you have to investigate the ACPI tables. https://wiki.archlinux.org/title/DSDT is a good intro, but it's basically a bunch of guesswork.

@barolo
Copy link

barolo commented Jul 21, 2024

In Windows, you get the MyAsus App which lets you choose between three different fan profiles: Quiet, Balanced, and Performance. As I understand, each one of those modes has an hexadecimal value that you can manually set with the nbfc or nbfc-linux tool, that's explained in the Arch Wiki. I'm able to change between those fan modes, and it actually works. When I write the value for the quiet mode, the fans go quiet, and when I write it for the performance mode, the fans do start spinning faster but not as they do with Windows.

which values have you used? I'm trying ./ec_probe write 0x61 0x1 and it returns invalid argument

@barolo
Copy link

barolo commented Jul 21, 2024

@irvng-wav managed to get it to work, had to add ec_sys.write_support=1 to boot arguments to have a write access.
The relevant values are:

0x61 0x00 #standard mode
0x61 0x01 #whisper mode (yes, counterintuitively)
0x61 0x02 #performance mode

the other relevant register seems to be 0x74 unsure how it corresponds yet as it switches just between two values 0x3A and 0x08, between three profiles. I've set it to 3A. [perhaps max fan speed?]

It definitely works, as the fan in performance mode gets really loud.

@irvng-wav
Copy link
Author

irvng-wav commented Jul 21, 2024

@barolo you got me excited, but unfortunately it's not working the way it's working for you. I have set 0x61 to 0x02 (performance mode) and 0x74 was already set to 3A, but the fans are still wimpy:

[irvng@arch-zenbook ~]$ sudo ec_probe read 0x61
2 (02)
[irvng@arch-zenbook ~]$ sudo ec_probe read 0x74
58 (3A)

But I'm still on Kernel 6.9.10, so that makes me think that maybe they fixed this issue in kernel 6.10. I will have to wait until the Arch Linux team pushes it to the main repo to test it.

I'm so glad you got it working!

@barolo
Copy link

barolo commented Jul 21, 2024

@barolo you got me excited, but unfortunately it's not working the way it's working for you. I have set 0x61 to 0x02 (performance mode) and 0x74 was already set to 3A, but the fans are still wimpy:

[irvng@arch-zenbook ~]$ sudo ec_probe read 0x61
2 (02)
[irvng@arch-zenbook ~]$ sudo ec_probe read 0x74
58 (3A)

But I'm still on Kernel 6.9.10, so that makes me think that maybe they fixed this issue in kernel 6.10. I will have to wait until the Arch Linux team pushes it to the main repo to test it.

I'm so glad you got it working!

It should work, it's the same laptop, I'm on 6.10 though.
BTW, perf fan mode gets me -10 °C on max load.
And it sounds like a hair-dryer.

@barolo
Copy link

barolo commented Jul 21, 2024

@irvng-wav check if you have performance platform profile enabled, it's best to just use tlp for this, you can set it to autotrigger on AC, (plasma desktop alsa has such option in UI for it), plus set charge limit and other stuff.
Also try setting ASPM to performance manually as per https://wiki.archlinux.org/title/Power_management#Active_State_Power_Management

@irvng-wav
Copy link
Author

irvng-wav commented Jul 24, 2024

Hey @barolo I just upgraded my system to kernel 6.10 and followed your advice but for some reason the fan behavior doesn't change. Here are all the steps I did:

  1. Updated my system to kernel 6.10, then restarted the machine to boot into the new kernel.
  2. Changed the fan profile to performance with sudo ec_probe write 0x61 0x02.
  3. Put my pc under a stress test using the s-tui tool to see if anything had changed but the behavior was the same: The CPU usage went up to 100% with (CPU) temps of around 70° C and avg frequency of 2250 MHz. Fan speed didn't change.

So then I followed the advice of your last comment. I use the tool auto-cpufreq to set the CPU governor and EPP to performance when the laptop is connected to the charger. Here's a screenshot of that tool:
imagen
Is EPP the "performance platform profile" you're talking about?

Then I visited the arch wiki article you linked, checked the status of ASPM and it already was enabled:

[irvng@arch-zenbook ~]$ sudo lspci -vv | grep 'ASPM.*abled;'
[sudo] contraseña para irvng: 
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes, LnkDisable- CommClk+

So I changed the policy to performance with

# echo performance > /sys/module/pcie_aspm/parameters/policy

With all of that done I again engaged the stress test but nothing changes. I even disabled and uninstalled thermald to see if that changed anything but nope.

Note that I'm not using asus-fan-control. I don't have it installed.

Am I missing something? Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new device Add support for new device AE_NOT_FOUND Unable to perform a fan ACPI call help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants