Introduction

Fancy is a set of software which allows you to control your laptop fans. It includes a service daemon to allow accessing to the EC and controlling it through D-Bus, a CLI to send commands and a GUI (WIP). It works only on Linux and Windows support is not planned1.

Installation

NOTE: If you have Secure Boot enabled, you have to install acpi_ec or disable it.

Arch Linux (thanks to @BachoSeven!)

yay -S fancy

Debian

For now, you can find the .deb in the Releases.

Fedora

sudo dnf copr enable musikid/Fancy
sudo dnf install fancy

For other distros

git clone https://github.com/MusiKid/fancy.git
cd fancy
make && sudo make install
1

Well, NBFC is already well integrated with the Windows "ecosystem", since C# is more common on Windows. It works very well, so go check it. If you want to provide Windows support, you are also welcome.

Supported models

You can check if your computer model is supported by running fancy list --recommended.

Or, you can also check the list below:

  • ASUS Vivobook X580VD
  • Acer Aspire 1410
  • Acer Aspire 1810T
  • Acer Aspire 1810TZ
  • Acer Aspire 1825PTZ
  • Acer Aspire 5738G
  • Acer Aspire 5745G
  • Acer Aspire 5749
  • Acer Aspire 5930
  • Acer Aspire 7551G
  • Acer Aspire 7735
  • Acer Aspire 7740G
  • Acer Aspire 7741G
  • Acer Aspire E1-522
  • Acer Aspire E1-772
  • Acer Aspire E5-471G
  • Acer Aspire E5-475G
  • Acer Aspire E5-575G
  • Acer Aspire E5-731
  • Acer Aspire LT-10Q
  • Acer Aspire One AO531h
  • Acer Aspire One AO751h
  • Acer Aspire One AOA110
  • Acer Aspire One AOA150
  • Acer Aspire S3
  • Acer Aspire S7-191
  • Acer Aspire S7-391
  • Acer Aspire V13
  • Acer Aspire V3-371
  • Acer Aspire V3-571G
  • Acer Aspire V5-551
  • Acer Aspire V5-572G
  • Acer Aspire VN7-572G V15 Nitro
  • Acer Aspire VN7-572G V15 Nitro BE
  • Acer Aspire VN7-591G V15 Nitro BE
  • Acer Aspire VN7-791G V17 Nitro BE
  • Acer Aspire VN7-792G V17 Nitro BE
  • Acer Aspire VN7-793G V17 Nitro BE
  • Acer Extensa 5220
  • Acer Extensa 5630Z
  • Acer LT-10Q
  • Acer Predator 17 G9-793-782K
  • Acer Predator G3-572
  • Acer TravelMate 7730G
  • Asus F5SR
  • Asus G53SX
  • Asus K43SD
  • Asus K43U
  • Asus K46C
  • Asus K501LX
  • Asus K501UX
  • Asus M52VA
  • Asus N550JV
  • Asus N550JX
  • Asus N551JB
  • Asus N56JR
  • Asus N56VZ
  • Asus ROG G501JW
  • Asus ROG G751JL
  • Asus ROG G751JT
  • Asus ROG G751JY
  • Asus ROG G752VS
  • Asus ROG G752VT
  • Asus ROG G752VY
  • Asus ROG G75VX
  • Asus ROG GL702VM
  • Asus ROG GL702ZC
  • Asus Transformer 3 Pro
  • Asus Vivobook S400CA
  • Asus Vivobook TP301UA
  • Asus X301A1
  • Asus X540LA
  • Asus Zenbook Flip UX360UAK
  • Asus Zenbook Pro UX550VE
  • Asus Zenbook UX21E
  • Asus Zenbook UX301LA
  • Asus Zenbook UX302LA
  • Asus Zenbook UX310UA
  • Asus Zenbook UX310UAK
  • Asus Zenbook UX31A
  • Asus Zenbook UX32A
  • Asus Zenbook UX32LN
  • Asus Zenbook UX32VD
  • Asus Zenbook UX330UA
  • Asus Zenbook UX410UQ
  • Asus Zenbook UX430UA
  • Asus Zenbook UX430UQ
  • Asus Zenbook UX51VZA
  • Asus Zenbook UX530U
  • Dell Inspiron 7348
  • Dell Inspiron 7375
  • Dell Vostro 3350
  • Dell XPS M1530
  • Fujitsu ESPRIMO Mobile V5505
  • Gateway AOA110
  • Gateway AOA150
  • Gateway LT31
  • Gigabyte AERO 14KV8
  • Gigabyte p35w v3
  • HP 15-BW00x
  • HP Compaq 15-s103tx
  • HP Compaq 615
  • HP Compaq 625
  • HP Compaq 6530b
  • HP Compaq 6735s Turion X2 RM-72
  • HP Compaq 8710p
  • HP Compaq Presario CQ40 Turion X2 RM-74
  • HP Compaq nw9440
  • HP ENVY m6 1206dx
  • HP ENVY m6 Sleekbook
  • HP ENVY m6-1254eo
  • HP ENVY x360 Convertible 13-ag0xxx
  • HP ENVY x360 Convertible 15-cn0xxx
  • HP EliteBook 2560p
  • HP EliteBook 2570p
  • HP EliteBook 2760p
  • HP EliteBook 840 G2
  • HP EliteBook 8470p
  • HP EliteBook 8560p
  • HP EliteBook 8560w
  • HP EliteBook 8760w
  • HP EliteBook Folio 1040 G1
  • HP EliteBook Folio 9470m
  • HP EliteBook Folio 9470m_i5-3427u_bios-F.66
  • HP Laptop 14-cm0xxx
  • HP Laptop 14-dk0xxx
  • HP Laptop 17-by1xxx
  • HP Laptop 17-ca1xxx
  • HP Notebook 15-ba010ng
  • HP OMEN Notebook PC 15
  • HP Pavilion 14-v066br
  • HP Pavilion 17-ab240nd
  • HP Pavilion HDX18
  • HP Pavilion dv6
  • HP Pavilion dv6 6190
  • HP Pavilion x360 Convertible 14-dh1xxx
  • HP Pavilion x360 Convertible 15-br0xx
  • HP ProBook 430 G1
  • HP ProBook 440 G3
  • HP ProBook 450 G1
  • HP ProBook 4520s
  • HP ProBook 4530s
  • HP ProBook 4535s
  • HP ProBook 4540s
  • HP ProBook 4710s
  • HP ProBook 4720s
  • HP ProBook 5330m
  • HP ProBook 6455b
  • HP ProBook 6460b
  • HP ProBook 6465b
  • HP ProBook 650 G1
  • HP ProBook 650 G2
  • HP ProBook 6550b
  • HP ProBook 6560b
  • HP Spectre x360 Convertible 13-ae0xx
  • HP Spectre x360 Convertible 15-ch0xx
  • HP ZBook 15
  • HP ZBook 15 G3
  • HP ZBook Studio G3
  • Lenovo IdeaPad Y580
  • Lenovo Ideapad 500S-13ISK
  • Lenovo Ideapad 500S-14ISK
  • Lenovo Ideapad 510s
  • Lenovo Ideapad 710S
  • Lenovo Ideapad U160
  • Lenovo Ideapad U330p
  • Lenovo Ideapad U430p
  • Lenovo ThinkPad 13
  • Lenovo ThinkPad Edge E520
  • Lenovo ThinkPad Helix
  • Lenovo ThinkPad L380 Yoga
  • Lenovo ThinkPad L390 i7-8565U
  • Lenovo ThinkPad T430s
  • Lenovo ThinkPad T440s
  • Lenovo ThinkPad T540p
  • Lenovo ThinkPad x121e
  • Lenovo ThinkPad x220i
  • Lenovo ThinkPad x230
  • Lenovo Thinkpad L530
  • Lenovo U31-70
  • Lenovo U41-70
  • Lenovo V330-IKB(81AX)
  • Lenovo V580
  • Lenovo Yoga 11s
  • Lenovo Yoga 13 2191
  • Lenovo Yoga 2 13
  • Lenovo Yoga 3 14
  • Lenovo Yoga 510
  • Lenovo Yoga 710
  • Medion Akoya P6612
  • Medion Akoya P6630
  • Packard Bell AOA110
  • Packard Bell AOA150
  • Packard Bell DOA150
  • Packard Bell DOTMA
  • Packard Bell DOTMU
  • Packard Bell DOTVR46
  • Packard Bell ENBFT
  • Packard Bell Easynote TJ65
  • Razer Blade 14 2017
  • RedmiBook 14 (TM1814)
  • Sony Vaio SVE1711
  • Sony Vaio SVE1713Y1E
  • Sony Vaio SVF13N190X
  • Sony Vaio SVF14N1C5E
  • Sony Vaio SVT1312M1ES
  • Sony Vaio VPCF12S1E
  • Toshiba Satellite L740
  • Toshiba Satellite L745
  • Vestel Smartboard Series-14XXXX
  • Xiaomi Mi Book (TM1613, TM1703)

Debugging

To debug the service, you can set the RUST_LOG variable and check the logs.

systemd

With systemd, you can do that by running systemctl edit fancy.service and edit the file like this:

### Editing /etc/systemd/system/fancy.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
[Service]
# Replace debug by the appropriate level
Environment="RUST_LOG=debug"

### Lines below this comment will be discarded

You can then check the logs by running journalctl -xeu fancy.service. If you want to follow the logs, you can run journalctl -feu fancy.service.

Log levels

The possible log levels are:

  • debug
  • info
  • trace

Service

The service does the communication between hardware and software, by sending the commands received from the D-Bus API to the ACPI.

D-Bus API

The service can be controlled through the D-Bus API. You can also view information like the temperature, fan speed, etc.

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "https://specifications.freedesktop.org/dbus/introspect-latest.dtd">

<node>
  <interface name="com.musikid.fancy">
    <property name="FansSpeeds" type="ad" access="read"></property>
    <property name="TargetFansSpeeds" type="ad" access="readwrite"></property>
    <property name="PollInterval" type="t" access="read"></property>
    <method name="SetTargetFanSpeed">
      <arg name="Index" direction="in" type="y" />
      <arg name="Speed" direction="in" type="d" />
    </method>
    <property name="FansNames" type="as" access="read"></property>
    <property name="Config" type="s" access="readwrite"></property>
    <property name="Auto" type="b" access="readwrite"></property>
    <property name="Critical" type="b" access="read"></property>
    <property name="Temperatures" type="a{sd}" access="read"></property>
  </interface>
</node>

Properties changes

It's not possible (for now) to subscribe to the following properties:

  • FansSpeeds
  • PollInterval
  • FansNames
  • Critical
  • FansNames
  • Temperatures

This is because they are directly modified by the service and the signal org.freedesktop.DBus.Properties.PropertiesChanged have to be triggered manually, which would consume more CPU.

FansNames and PollInterval change only when Config is changed, so subscribing to Config and getting these properties when it changes should work. The other properties can instead manually be polled with an interval of PollInterval.

Configuration

The service configuration path is /etc/fancy/config.toml. It should not be modified manually.


#![allow(unused)]
fn main() {
#[derive(Debug, Serialize, Deserialize, Default)]
/// Stores the service configuration which can be written to the disk.
pub(crate) struct ServiceConfig {
    pub ec_access_mode: ECAccessMode,
    pub selected_fan_config: String,
    pub auto: bool,
    pub target_fans_speeds: Vec<f64>,
    #[serde(default)]
    pub temp_compute: TempComputeMethod,
    #[serde(default)]
    pub check_control_config: bool,
}
}

Fan Configuration

It is possible to create/edit them with the GUI (coming soon!).

Path

Configurations should be located at /etc/fancy/configs. It will soon be possible to add them from other locations.

Formats

Fan configurations from NBFC, nbfc-revive and nbfc-linux are fully supported (which means XML and JSON). It is possible to add support for virtually every format, if there is enough demand for it (and a Serde package!). Open an issue if you think that it would be really useful to add another format.

% fancy(1) | Fancy CLI

NAME

fancy - Fancy CLI

SYNOPSIS

fancy get [speeds | temps | config | auto | status]

fancy set [-f FAN_SPEED [FAN_SPEEDS ...] | -a] [-c CONFIGURATION]

fancy list [--recommended]

DESCRIPTION

fancy is the CLI of fancy(7), a set of software which allows to control laptop fans.

OPTIONS

SET

-f, --fans-speeds FAN_SPEEDS...

: Set fans speeds by percentage, between 0 and 100

-c, --config CONFIGURATION

: Set the configuration used by the daemon

-a, --auto : Let the daemon automatically choose the speed, according to the temperature

-m, --manual : Apply the defined target speeds while the temperature is not critical (meaning when the computer starts to burn your legs).

GET

fancy get speeds

: Get fans speeds

fancy get target-speeds

: Get fans target speeds

fancy get temps

: Get temperatures

fancy get config

: Get current configuration

fancy get auto

: Get automatic speed management state

fancy get status

: Get summary

LIST

List all available configurations

--recommended

: List only recommended configurations

BUGS

Bugs can be reported at https://github.com/MusiKid/fancy

% fancyd(8) | Fancy Daemon

NAME

fancyd - Fancy service daemon

SYNOPSIS

fancyd

DESCRIPTION

fancyd is the service daemon of fancy(7), a set of software which allows to control laptop fans. It should not be run manually!

BUGS

Bugs can be reported at https://github.com/MusiKid/fancy