Skip to content

Instantly share code, notes, and snippets.

@mebasoglu
Last active May 14, 2026 10:26
Show Gist options
  • Select an option

  • Save mebasoglu/27a64a7e478c4eaf8a467eb41f3de7c5 to your computer and use it in GitHub Desktop.

Select an option

Save mebasoglu/27a64a7e478c4eaf8a467eb41f3de7c5 to your computer and use it in GitHub Desktop.

Gigabyte AORUS 16X 9KG Fan Control on GNU/Linux

Overview

This guide explains how to control fans on the Gigabyte AORUS 16X 9KG laptop using the gigabyte-laptop-wmi kernel driver.

Problem

The laptop's fans don't spin up until ~85°C, then go full speed causing thermal throttling or shutdown during gaming.

Solution

Install the gigabyte-laptop-wmi kernel driver which provides:

  • Fan mode control (Normal, Silent, Gaming, Custom, Auto, Fixed)
  • Custom fan speed (25-100%)
  • Fan curve configuration
  • Temperature monitoring via hwmon

Prerequisites

  • Ubuntu 22.04 (or similar GNU/Linux distribution)
  • Root/sudo access
  • Build tools (build-essential, dkms)

Installation Steps

1. Install Build Dependencies

sudo apt update
sudo apt install build-essential dkms

2. Download the Driver

cd /tmp
curl -sL https://github.com/tangalbert919/gigabyte-laptop-wmi/archive/refs/heads/master.tar.gz -o driver.tar.gz
tar -xzf driver.tar.gz

3. Fix Package Version

The DKMS config has a placeholder version that needs to be replaced:

cd gigabyte-laptop-wmi-master
sed -i 's/@PKGVER@/1.0.0/' dkms.conf
tar -czf driver.tar.gz Makefile aorus-laptop.c dkms.conf
cd ..
mv gigabyte-laptop-wmi-master/driver.tar.gz .

4. Install via DKMS

sudo rm -rf /var/lib/dkms/aorus-laptop
sudo dkms ldtarball driver.tar.gz
sudo dkms build aorus-laptop/1.0.0
sudo dkms install aorus-laptop/1.0.0
sudo dkms autoinstall aorus-laptop/1.0.0

5. Verify Installation

dkms status
lsmod | grep aorus_laptop

Expected output should show the module built and loaded.

Fan Control

Where Controls Are

All controls are located at:

/sys/devices/platform/aorus_laptop/

Available Fan Modes

Mode Value Description
Normal 0 Default mode
Silent 1 Quieter, less cooling
Gaming 2 Aggressive cooling
Custom 3 User-defined curve
Auto 4 Auto with custom max
Fixed 5 Fixed speed

Set Fan Mode

# Gaming mode (recommended for gaming)
echo '2' | sudo tee /sys/devices/platform/aorus_laptop/fan_mode

# Fixed speed at 50%
echo '5' | sudo tee /sys/devices/platform/aorus_laptop/fan_mode
echo '50' | sudo tee /sys/devices/platform/aorus_laptop/fan_custom_speed

Set Custom Fan Curve

# Enable custom mode
echo '3' | sudo tee /sys/devices/platform/aorus_laptop/fan_mode

# Set fan curve index 1: 40°C = 30% speed
# Formula: (fan_speed * 256) + temperature
# Example: 30 * 256 + 40 = 7720
echo '1' | sudo tee /sys/devices/platform/aorus_laptop/fan_curve_index
echo '7720' | sudo tee /sys/devices/platform/aorus_laptop/fan_curve_data

# Repeat for other indices (2-15) as needed

View Current Settings

# Current fan mode
cat /sys/devices/platform/aorus_laptop/fan_mode

# Custom fan speed (if in Auto or Fixed mode)
cat /sys/devices/platform/aorus_laptop/fan_custom_speed

# Temperatures and fan RPMs
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/temp*_input
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/fan*_input

Monitoring

View Temperatures

# Via hwmon
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/temp1_input
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/temp2_input
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/temp3_input

# Via sensors (if configured)
sensors

View Fan Speed

cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/fan1_input
cat /sys/devices/platform/aorus_laptop/hwmon/hwmon*/fan2_input

Troubleshooting

Module Not Loading on Boot

If Secure Boot is enabled, you need to sign the module:

# Sign the module
sudo modsign signing ~mok/M4.priv /var/lib/dkms/aorus-laptop/1.0.0/6.8.0-110-generic/x86_64/module/aorus_laptop.ko

# Or disable Secure Boot in BIOS

Permission Denied

All write operations require root:

echo 'value' | sudo tee /sys/devices/platform/aorus_laptop/fan_mode

Driver Not Found After Reboot

Check if module loaded:

lsmod | grep aorus_laptop

If not loaded manually:

sudo modprobe aorus_laptop

Alternative: Manual Loading (No DKMS)

If DKMS doesn't work, manually load after each boot:

# Compile
cd gigabyte-laptop-wmi-master
make

# Load
sudo insmod aorus-laptop.ko

# Auto-load on boot
echo 'aorus_laptop' | sudo tee /etc/modules-load.d/aorus.conf
sudo cp aorus-laptop.ko /lib/modules/$(uname -r)/misc/
sudo depmod -a

GUI Alternative: gigabyte-cc

For a graphical interface, see: https://github.com/jokelbaf/gigabyte-cc

Requirements:

  • gigabyte-laptop driver loaded
  • Node.js 20+
  • Rust + Tauri CLI

Note: The AORUS 16X 9KG may not be fully compatible with gigabyte-cc yet.

Notes

  • The driver interacts with the laptop's embedded controller (EC)
  • Changes persist across reboots (stored in EC)
  • Works alongside Windows Gigabyte Control Center (dual-boot safe)
  • Some features may vary by BIOS version

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment