nbfc-revive icon indicating copy to clipboard operation
nbfc-revive copied to clipboard

Config for Lenovo IdeaPad Pro 5 16APH8

Open johsin18 opened this issue 1 year ago • 2 comments

I would like to have a config for Lenovo IdeaPad Pro 5 16APH8. I tried to create one myself, but have not succeeded yet.

I use the updated OpenHardwareMonitorLib (@UraniumDonut you might want to pull from https://github.com/mxsgx/nbfc-revive).

"nbfc.exe config --recommend" crashes: The service is unavailable Object reference not set to an instance of an object

I have found out the following registers (which is consistent with sombody else's finding at https://www.computerbase.de/forum/threads/ideapad-5-15-technikthread.1948199/page-18)

0x06 FANS correlates with the fan speed, 0 for off 0xB0 CPUT CPU temperature in Celsius 0xB4 GPUT GPU temperature in Celsius

However, so far, I can only read the values. When writing to FANS, the value is overwritten again a glimpse later. I have tried to flip each EC bit one after the other, but none of them seems to enable writing to FANS.

If somebody knows more about the topic, please comment here. Maybe other things have to be modified, such as described here: https://github.com/UraniumDonut/nbfc-revive/issues/106

johsin18 avatar Oct 08 '23 13:10 johsin18

#106

I got a notification with questions from you regarding the issue; somehow I can't see it on github though.

The code you posted works only on Linux, right?

Yes.

could you please tell us how you found out about those I/O ports?

It's roughly described in the comments in the code – I studied DSDT tables (cf wiki) and found there a method called 'SFNS' which I guessed correctly to be 'Set FaN Speed', that used variables such as FNNB (FaN NumBer) and FNSP (FaN SPeed), and called \_SB.PCI0.SBRG.EC0.SFNV (FNNB, FNSP) to do something, and this something was like:

Local0 = RRAM (0x0521)
Local0 |= 0x80
WRAM (0x0521, Local0)

which turned out to be the operations that enable user fan speed control. WRAM and RRAM are two other methods from that DSDT. So it was more like guessing, reverse-engineering, trial and error rather than anything else.

anonymous-14523 avatar Oct 08 '23 18:10 anonymous-14523

Hi, I had deleted my message again when I saw your comment in the code. But your answer here is even more helpful, and will motivate me to find a solution. Many thanks!

johsin18 avatar Oct 13 '23 15:10 johsin18