A Linux kernel module providing direct access to ACPI Embedded Controller (EC), useful for MSI laptops where the in-kernel msi_ec driver doesn't support certain firmware versions.
- Direct ACPI EC register access via /dev/ec0
- Multi-EC device support
- Fan curve control for MSI laptops
- Cooler Boost control
- User-space interface via device files
sudo apt install build-essential linux-headers-$(uname -r)git clone https://github.com/agnath18K/acpi_ec.git
cd acpi_ec
sudo ./install.shNote: Secure Boot must be disabled as the module is unsigned.
After installation:
/dev/ec0- Primary EC/dev/ec1,/dev/ec2- Secondary ECs (if present)
Control fan curves on supported MSI laptops:
# Show current status
sudo ./msi_fan_curve.sh status
# Show current fan curve
sudo ./msi_fan_curve.sh curve
# Apply a profile
sudo ./msi_fan_curve.sh apply performance # or: silent, balanced, gaming
# Backup/restore curves
sudo ./msi_fan_curve.sh backup ~/my_curve.bak
sudo ./msi_fan_curve.sh restore ~/my_curve.bak
# Live monitoring
sudo ./msi_fan_curve.sh monitorAvailable profiles:
| Profile | Description |
|---|---|
| silent | Lower fan speeds, prioritize quiet operation |
| balanced | Mix of cooling and noise |
| performance | Aggressive cooling, fans reach 100% |
| gaming | Maximum cooling, fans spin up early |
Simple monitoring and Cooler Boost control:
sudo ./msi_fan_control.sh status # Show temps and fan speeds
sudo ./msi_fan_control.sh monitor # Live monitoring
sudo ./msi_fan_control.sh boost-on # Enable Cooler Boost
sudo ./msi_fan_control.sh boost-off # Disable Cooler BoostLegacy script for Cooler Boost only:
sudo ./cooler_boost.sh status
sudo ./cooler_boost.sh on
sudo ./cooler_boost.sh off# Read from offset 0x68 (CPU temp)
sudo dd if=/dev/ec0 bs=1 count=1 skip=104 2>/dev/null | od -An -tu1
# Write 0x80 to offset 0x98 (Cooler Boost ON)
echo -ne "\x80" | sudo dd of=/dev/ec0 bs=1 count=1 seek=152 2>/dev/nullCopy the systemd service files:
sudo cp systemd/acpi-ec.service /etc/systemd/system/
sudo cp systemd/msi-fan-curve.service /etc/systemd/system/
# Edit msi-fan-curve.service to point to your script location
sudo systemctl daemon-reload
sudo systemctl enable acpi-ec.service
sudo systemctl enable msi-fan-curve.service| Offset | Hex | Description |
|---|---|---|
| 104 | 0x68 | CPU Temperature |
| 112 | 0x70 | CPU Fan % |
| 128 | 0x80 | GPU Temperature |
| 136 | 0x88 | GPU Fan % |
| 152 | 0x98 | Cooler Boost (0x00=OFF, 0x80=ON) |
| 244 | 0xF4 | Fan Mode (140=Advanced) |
| 106-111 | 0x6A-0x6F | CPU Temp Thresholds |
| 114-120 | 0x72-0x78 | CPU Fan Speeds |
| 130-135 | 0x82-0x87 | GPU Temp Thresholds |
| 138-144 | 0x8A-0x90 | GPU Fan Speeds |
Note: Register addresses may vary by firmware version. The above are verified for firmware 16U8EMS2.100.
sudo ./uninstall.sh# Check if module is loaded
lsmod | grep acpi_ec
# Check kernel logs
dmesg | grep acpi_ec
# Check device permissions
ls -l /dev/ec*GPL v2 - see LICENSE file.
- Thomas Renninger (ec_sys.c)
- Sayafdine Said (Out-of-tree port)