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

Ayaneo Air 1S fan control #1042

Open
xerootg opened this issue Nov 16, 2024 · 10 comments
Open

Ayaneo Air 1S fan control #1042

xerootg opened this issue Nov 16, 2024 · 10 comments

Comments

@xerootg
Copy link

xerootg commented Nov 16, 2024

Hey! The ayaneo air 1s that I have does not allow manual fan speed settings with oxp-sensors. I built nfbc and used ec_probe to poke at the registers that HandheldCompanion has documented and things work, so. It seems there's a bug in the oxp-sensors kernel module.

for example:

[gamer@chimeraos ~]$ echo 1 | sudo tee /sys/devices/platform/oxp-platform/hwmon/hwmon6/pwm1_enable
1
[gamer@chimeraos ~]$ echo 99 | sudo tee /sys/devices/platform/oxp-platform/hwmon/hwmon6/pwm1
99
tee: /sys/devices/platform/oxp-platform/hwmon/hwmon6/pwm1: Operation not supported

the fan spins up but is frozen at something around 2k rpm and no matter what I try to set pwm1 to fails.

vs

[gamer@chimeraos ~]$ sudo nbfc/pkg/nbfc-linux-git/usr/bin/ec_probe write 0x4a 0x01 #enable manual control
[gamer@chimeraos ~]$ sudo nbfc/pkg/nbfc-linux-git/usr/bin/ec_probe write 0x4b 0x64 #set to 100

I've looked at the driver and its quite intimidating. It seems like someone assumed the 1s worked the same as a pile of other devices and I'm not sure where to start. Is anyone familiar with that driver that would be interested in collaborating on a patch? I'm going to try and get fancontrol working for now.

@pastaq
Copy link
Contributor

pastaq commented Nov 19, 2024

Can you link here the registers for the air 1S?

@xerootg
Copy link
Author

xerootg commented Nov 19, 2024

Sure! By registers, you want me to dump the EC memory at runtime? Or is there something else?

@xerootg
Copy link
Author

xerootg commented Nov 19, 2024

@xerootg
Copy link
Author

xerootg commented Nov 24, 2024

Ok, so I went on a hunt. I updated my EC and my bios to the latest, didn't fix things. I then compared the mainline kernel oxp_sensors.c to the 6.9/chimeraos version, and there's quite a few differences, but the biggest thing - air 1s doesn't have a pwm set: mainline vs chimera's 6.9 fork - alas, 6.10 through 6.12 have support. chimera's 9.10 fork chimera's 9.12 fork

I guess that means this is a solved case of all releases of v46 don't support the 1s fan. ☹️

@xerootg
Copy link
Author

xerootg commented Nov 24, 2024

ok, so I tried unstable, 6.10 kernel, lacks the ability to enable manual fan control, but can disable manual fan control. :(

I tested, manually set the bit for manual control, and I can use oxp-sensors for setting pwm1, so its something.

@pastaq
Copy link
Contributor

pastaq commented Nov 24, 2024

What register and value did you use to enable it?

@xerootg
Copy link
Author

xerootg commented Nov 24, 2024

same as before [gamer@chimeraos ~]$ sudo nbfc/pkg/nbfc-linux-git/usr/bin/ec_probe write 0x4a 0x01 #enable manual control

@pastaq
Copy link
Contributor

pastaq commented Nov 24, 2024

Odd that the driver isn't working, that's the same value.

@pastaq
Copy link
Contributor

pastaq commented Nov 24, 2024

Nvm, I see the issue. Older patch on our 6.10 kernel with a missing entry. Easy fix.

@xerootg
Copy link
Author

xerootg commented Nov 24, 2024

ok, but there's bugs in both drivers. the older kernel can enable manual control but can't set the pwm value, and the new driver cant enable manual but can set the pwm value. ideally 6.10 would be able to both set the pwm value as well as enable manual control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants