Skip to content

enyone/lenovo-yoga-fan-control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lenovo-yoga-fan-control

Program for Linux-based OS to control Fan Speed on Lenovo Yoga 13.

Inside the Lenovo Yoga is an embedded controller (EC), which is responsible for some of the Yoga's low-level tasks. One of them is Fan controling.

There is 'notebook fan control' programm for controlling Fan on windows in internet.

Temperature Monitoring and Fan Control

There is a CPU temperature sensor connected to the EC via SMBus; note that this SMBus is not accessible by the CPU, and so the Linux i2c drivers cannot see any devices on this bus.

The fan is connected to a fan controller in the EC, which allows the fan speed to be varied (using PWM) between 0% and 100% duty cycle. By default, the EC sets the fan speed very strange. All time works on 60% of maximum fan speed.

This program works in automatic mode. It's controling Fan with my custom temp table. You should run it as root in background. I plane to make linux kernel with this functioanlity.

HowTo use

You can compile program from source.

Compiling from sourse:

sudo apt-get install gcc-4.9-base cmake git g++
git clone https://github.com/blan4/lenovo-yoga-fan-control.git
cd lenovo-yoga-fan-control
cmake CMakeLists.txt
make
sudo ./yoga_fan

For running script at runtime do this as ROOT:

sudo -s
make install
update-rc.d yoga_fan_daemon defaults

If you use system.d you should copy service file yoga_fan.service to /etc/systemd/system/ directory. After that enable service by sudo systemctl enable yoga_fan.service

Useful links

Ec specification

Yoga TempTable Bios patch for old versions

Linux IO programming

Kernel module for Asus eeePc

NBFC

###TODO:

  • add daemon for ubuntu
  • add daemon for systemd based
  • add config file
  • widget with fan speed and temperature
  • add fan device output and input to /sys/class/hwmon

About

Program for Linux to control Fan Speed on Lenovo Yoga 13.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 51.2%
  • Shell 40.3%
  • CMake 8.5%