mirror of
https://github.com/hirschmann/nbfc.git
synced 2026-04-25 16:45:53 +03:00
[GH-ISSUE #316] Feedback on attempt at getting Lenovo Y520 to work with nbfc #283
Labels
No labels
Stale
bug
config
discussion
duplicate
enhancement
experimental
feature
help-wanted
info
invalid
invalid
pull-request
question
up-for-grabs
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nbfc-hirschmann#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @johnneren on GitHub (Aug 18, 2017).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/316
Hi hirschmann.
First of all, thanks for this program and the very nicely written 'how to create configs for nbfc'
I decided to spend a few hours trying to create a profile for my Lenovo Y520. with 1.5.3 - beta
First I tried to decrypt the DSDT but all the programs I tried either crashed or went into a while(1) so I continued on to trying EC probing.
I figured out that there was a 90% chance the fan speed was located at 0x6 and fan target speed was at 0xFE based on the behavior when using prime95.
I also noticed that when using Lenovos sense software to set 'max fan speed' that register 0x39 was set to 1 and cleared when max speed was disabled in the lenovo software.
I thought that this might be a 'allow manual control' flag as you mentioned in the guide.
Using ec-probe I can write 1 or 0 to 0x39 without any issue and see the value through the monitor but writing to 0xFE has no effect.
Neither via the monitor or on the fan speed.
So I continued and created a ubunto live USB pen which allowed me to dump the DSDT and all ACPI data.
I also tried to search for where these variables are used which kinda confirmed that FAN (0x06) and FA2S (0xFE) shared something because their get methods was located next to each other.
But I was not able to find any 'If (manual_control) type of check so I'm not 100% sure about that.
Any input/feedback is appreciated!
Minor thought: Does nbfc have some kind of size check on the address that might have a offset error so 0xFE is not possible to write or something?
Thanks
@hirschmann commented on GitHub (Aug 21, 2017):
Your DSDT only defines 2 offsets in the EmbeddedControl space (=EC registers).
The field which you're trying to access is in the SystemMemory space (= hardware reserved RAM):
Unfortunately, NBFC can address only the EmbeddedControl-space. Controlling the fan by manipulating the SystemMemory-space would be too unstable and also a potential security risk.
You could give
ec-probe.exe monitoranother try and try to reverse-engineer the EC's register set. I know this answer is not particularly useful, but the only option if you don't want to poke around in the kernel address space.If a register doesn't change after a call to
ec-probe write, it's either read-only, or the EC cleared it before your call toec-probe read.ec-probe interprets all input values as 8-bit unsigned integer, therefore values from 0x00-0xFF (0-255) are supported.
@johnneren commented on GitHub (Sep 4, 2017):
Hi hirschmann.
I have tried looping through EC register 0-255 and writing them all to different values such as, 0, 35, 45, 90 , 255 but I didn't find any pattern for the speed control.
I did find display brightness, keyboard brightness and speed stepping control :P
I also managed to get the fan to run at a constant speed at one point... but I never figured out which combination did it.
I'm 'throwing in the towel' and accepting I will need to use my noise canceling headset with this laptop :)
You can close this issue now.
Cheers.
@hirschmann commented on GitHub (Sep 4, 2017):
Good job, even if you couldn't solve the problem. :)
I'm sorry I couldn't be more helpful.