Overview

This guide covers fan control, CPU temperature monitoring, thermal management, CPU frequency capping, throttle monitoring, power management (TLP), GNOME desktop setup, and keyboard customization for a MacBook Pro Late 2019 running t2linux-ubuntu.


1. Fan Control with t2fanrd

Check Service Status

sudo systemctl status t2fanrd

Manage the Service

sudo systemctl start t2fanrd
sudo systemctl stop t2fanrd
sudo systemctl restart t2fanrd
sudo systemctl enable t2fanrd    # start on boot
sudo systemctl disable t2fanrd   # disable on boot

View Logs

journalctl -u t2fanrd -f

Configuration File

sudo nano /etc/t2fand.conf

Configuration Parameters

ParameterDescription
low_tempTemperature (°C) where fans start spinning above minimum speed
high_tempTemperature (°C) where fans reach maximum speed
speed_curveHow fan speed scales between low and high (linear, quadratic, etc.)
always_full_speedIf true, fans run at max RPM constantly, ignoring the curve
[Fan1]
low_temp=40
high_temp=80
speed_curve=linear
always_full_speed=false

[Fan2]
low_temp=40
high_temp=80
speed_curve=linear
always_full_speed=false
  • Below 40°C → fans at minimum (quiet)
  • Between 40–80°C → fans scale linearly
  • At 80°C → fans at full speed
  • CPU is safe up to ~100°C, so 80°C as full-speed trigger is conservative

[!NOTE] After editing, always restart the service:

sudo systemctl restart t2fanrd

2. Temperature Monitoring

Quick Snapshot

sudo apt install lm-sensors
sensors

Detailed Sensor Output

sensors -u

Real-Time Monitoring

# Terminal dashboard (CPU temp, frequency, power)
sudo apt install s-tui
s-tui

# System monitor
sudo apt install btop
btop

Monitor with TLP

sudo apt install tlp tlp-rdw
sudo tlp-stat -t

Continuous Watch

watch -n 2 'sudo tlp-stat -t'

3. Sensor Layout

This MacBook exposes three fan sensor sources:

SourceSensorsNotes
applesmc-acpi-0fan1, fan2Real fans (left and right)
amdgpu-pci-0300fan1Ghost sensor (always 0 RPM, ignore it)

The GPU (AMD Radeon Pro) shares the chassis fans — it doesn’t have its own. The 0 RPM reading from amdgpu is normal.

Key Temperature Sensors (applesmc)

SensorMeaning
TC1C–TC8CCPU core temps
TCMXCPU max temp
TG0PGPU proximity
TGDDGPU diode
TH0XHeatsink
TB0T–TB2TBattery temps
Ts0P/Ts1PPalm rest temps

4. TLP Power & CPU Management

Install & Enable

sudo apt install tlp tlp-rdw
sudo systemctl enable tlp
sudo tlp start
tlp-stat -s    # check status

How TLP Config Works

Settings are loaded in order (last wins):

  1. Intrinsic defaults (built-in)
  2. /etc/tlp.d/*.conf (drop-in overrides)
  3. /etc/tlp.conf (main config — this wins over everything)

[!IMPORTANT] Keep /etc/tlp.conf clean (all defaults, everything commented out). Put all custom CPU settings in drop-in profiles under /etc/tlp.d/ so you can easily switch between them.

Profile Setup

Step 1: Restore default tlp.conf

sudo apt install --reinstall tlp

This ensures /etc/tlp.conf is stock with everything commented out.

Step 2: Copy profile files to /etc/tlp.d/

Three profiles are provided with this guide. Copy them to your system:

sudo cp profile-performance.conf /etc/tlp.d/
sudo cp profile-balanced.conf /etc/tlp.d/
sudo cp profile-powersaver.conf /etc/tlp.d/

Step 3: Disable all profiles except one

Only one profile should have a .conf extension at a time. Rename the others to .conf.off:

# Disable all
sudo rename 's/\.conf$/.conf.off/' /etc/tlp.d/profile-*.conf

# Enable balanced (default)
sudo mv /etc/tlp.d/profile-balanced.conf.off /etc/tlp.d/profile-balanced.conf

# Apply
sudo tlp start

Profile Details

profile-performance.conf

# Use for: heavy workloads, compiling, video rendering
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=70
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
CPU_ENERGY_PERF_POLICY_ON_AC=performance
CPU_ENERGY_PERF_POLICY_ON_BAT=balance_performance

profile-balanced.conf

# Use for: daily use, browsing, coding, office work
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=70
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=50
CPU_BOOST_ON_AC=0
CPU_BOOST_ON_BAT=0
CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance
CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power

profile-powersaver.conf

# Use for: max battery life, light tasks, reading
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=50
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=30
CPU_BOOST_ON_AC=0
CPU_BOOST_ON_BAT=0
CPU_ENERGY_PERF_POLICY_ON_AC=balance_power
CPU_ENERGY_PERF_POLICY_ON_BAT=power

Profile Comparison

SettingPerformanceBalancedPowersaver
AC max100% (4.8 GHz)70% (~3.4 GHz)50% (~2.4 GHz)
BAT max70% (~3.4 GHz)50% (~2.4 GHz)30% (~1.4 GHz)
Turbo ACEnabledDisabledDisabled
Turbo BATDisabledDisabledDisabled
Energy ACperformancebalance_performancebalance_power
Energy BATbalance_performancebalance_powerpower

Quick Switch Script (tlp-profile)

Install the provided script:

#!/bin/bash
# tlp-profile - Quick switch between TLP power profiles
# Profiles stored in /etc/tlp.d/ as profile-<name>.conf
# Only one profile can be active at a time (.conf = active, .conf.off = inactive)

PROFILE_DIR="/etc/tlp.d"

if [ -z "$1" ]; then
    echo "Usage: tlp-profile <performance|balanced|powersaver>"
    echo ""
    echo "Active profile:"
    active=$(ls "$PROFILE_DIR"/profile-*.conf 2>/dev/null)
    if [ -n "$active" ]; then
        for f in $active; do
            basename "$f" | sed 's/profile-//;s/\.conf//'
        done
    else
        echo "  none"
    fi
    echo ""
    echo "Available profiles:"
    for f in "$PROFILE_DIR"/profile-*.conf "$PROFILE_DIR"/profile-*.conf.off; do
        [ -f "$f" ] && basename "$f" | sed 's/profile-//;s/\.conf\.off//;s/\.conf//'
    done | sort -u
    exit 0
fi

# Disable all profiles
for f in "$PROFILE_DIR"/profile-*.conf; do
    [ -f "$f" ] && mv "$f" "${f}.off"
done

# Enable selected profile
TARGET="$PROFILE_DIR/profile-${1}.conf.off"
if [ -f "$TARGET" ]; then
    mv "$TARGET" "${TARGET%.off}"
    tlp start
    echo "Switched to: $1"
    echo ""
    echo "Verify:"
    echo "  CPU cap: $(cat /sys/devices/system/cpu/intel_pstate/max_perf_pct)%"
    echo "  Turbo off: $(cat /sys/devices/system/cpu/intel_pstate/no_turbo)"
else
    echo "Profile not found: $1"
    echo "Available: performance, balanced, powersaver"
    exit 1
fi
sudo cp g /usr/local/bin/
sudo chmod +x /usr/local/bin/tlp-profile

Usage:

# Switch profiles
sudo tlp-profile balanced
sudo tlp-profile performance
sudo tlp-profile powersaver

# Check active profile
tlp-profile

The script disables all profiles, enables the selected one, runs tlp start, and shows the current CPU cap and turbo status.

Manual Profile Switching (without the script)

# Disable all
sudo rename 's/\.conf$/.conf.off/' /etc/tlp.d/profile-*.conf

# Enable desired profile (e.g. performance)
sudo mv /etc/tlp.d/profile-performance.conf.off /etc/tlp.d/profile-performance.conf

# Apply[
sudo tlp start

Verify Settings

# Check CPU cap percentage
cat /sys/devices/system/cpu/intel_pstate/max_perf_pct

# Check turbo boost is off (1 = disabled)
cat /sys/devices/system/cpu/intel_pstate/no_turbo

# Check current frequencies
grep "MHz" /proc/cpuinfo

# Full TLP power report
tlp-stat -p

Temporary Overrides (don’t survive reboot)

# Temporarily set to 100%
echo 100 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

# Set back to 70%
echo 70 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

Frequency Reference Table

CPU_MAX_PERFApprox Max Frequency
100%4.8 GHz (full)
80%~3.8 GHz
70%~3.4 GHz
60%~2.9 GHz
50%~2.4 GHz
30%~1.4 GHz

Turbo Boost explained: Intel feature that temporarily pushes cores above base clock (up to 4.8 GHz). Generates a lot of heat in thin laptops. Disabling it keeps temps stable and avoids the boost→throttle→boost cycle.

[!Note] The GNOME Quick Settings power profile toggle (Balanced/Power Saver/Performance) requires power-profiles-daemon, which conflicts with TLP. Since TLP is installed, manage power via profiles or terminal commands instead.


5. CPU Frequency Monitoring (cpufrequtils)

Install

sudo apt install cpufrequtils

Usage

# Full CPU frequency info
cpufreq-info

# Current governor and policy
cpufreq-info -p

# Set governor to performance (all cores)
for i in $(seq 0 15); do sudo cpufreq-set -c $i -g performance; done

# Set governor back to powersave
for i in $(seq 0 15); do sudo cpufreq-set -c $i -g powersave; done

Governors

GovernorBehavior
performanceAlways max frequency
powersaveScales on demand (default with intel_pstate, smart)

[!Note] With intel_pstate driver, powersave is the recommended default — it still scales up on demand, unlike the old cpufreq powersave which locked to minimum. cpupower / linux-tools is not available for t2linux custom kernels. Use cpufrequtils instead.


6. Throttle Monitoring

Check Throttle Events Since Boot

# Package-level throttle count
cat /sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count

# Per-core throttle counts
for i in /sys/devices/system/cpu/cpu*/thermal_throttle/core_throttle_count; do echo "$i: $(cat $i)"; done

If the counts are 0, no throttling has occurred since boot.

Check If Throttling Is Active Now

# Current frequency vs max — if well below max, something is limiting it
grep "MHz" /proc/cpuinfo

# CPU hardware limits
lscpu | grep "MHz"

# Kernel throttle messages
dmesg | grep -i throttl

Real-Time Monitoring

# Best visual tool — shows freq, temp, power in real-time
s-tui

Quick One-Liner

echo "Throttle count: $(cat /sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count)" && echo "CPU MHz:" && grep "MHz" /proc/cpuinfo | head -4

[!Tip] Reboot to reset throttle counters, then monitor over a day to see if your config changes improved things.


7. thermald (Intel Thermal Daemon)

Safety net that automatically throttles CPU before critical temps. Works alongside t2fanrd (fans) — thermald handles CPU throttling if fans alone aren’t enough.

Install & Enable

sudo apt install thermald
sudo systemctl enable thermald
sudo systemctl start thermald

Check Status & Logs

sudo systemctl status thermald
journalctl -u thermald --no-pager | tail -30

Check Thermal Zones

cat /sys/class/thermal/thermal_zone*/type
cat /sys/class/thermal/thermal_zone*/temp

Config file (usually no need to edit): /etc/thermald/thermal-conf.xml


8. GNOME Desktop Setup

Install Extension Manager

sudo apt install gnome-shell-extension-manager

Open it from the app launcher or run extension-manager. Use the Browse tab to search and install extensions.

Useful Extensions

ExtensionDescription
VitalsShows CPU temp, fan speed, memory, network in top bar
FreonShows temperatures and fan speeds from lm-sensors
AppIndicatorAdds system tray support for apps like Discord, Slack
Top Bar OrganizerRearrange items in the top panel
LilypadHide, reorder, and collapse top bar icons

[!Tip] After installing extensions, restart GNOME Shell with Alt+F2 → type r → Enter, or log out and back in.

Vitals Configuration

In Vitals settings, set the temperature sensor to TC0F (CPU filtered) for the most accurate CPU temperature reading in the top bar. This is an applesmc sensor that tracks the CPU’s thermal state on the logic board.


9. GNOME Tweaks (Keyboard & UI Customization)

Install

sudo apt install gnome-tweaks

Open it from the app launcher or run gnome-tweaks.

Swap Cmd and Ctrl Keys (macOS-like shortcuts)

On a MacBook, the Cmd key maps to Super in Linux. To make Cmd+C/V/Z work like macOS:

  1. Open Tweaks
  2. Go to Keyboard & Mouse → Additional Layout Options
  3. Expand Ctrl position
  4. Check “Swap Left Win with Left Ctrl”

Verify Key Mappings

# Interactive — press keys to see what they map to
xev -event keyboard

# Show current modifier map
xmodmap -pm

10. Clipboard (xclip)

Install

sudo apt install xclip

Usage

# Copy command output to clipboard
echo "hello" | xclip -selec[tion clipboard

# Copy file contents to clipboard
cat somefile.txt | xclip -selection clipboard

# Paste from clipboard
xclip -selection clipboard -o

[!Tip] -selection clipboard targets the Ctrl+V clipboard. Without it, xclip uses the X primary selection (middle-click paste).


11. Quick Reference Commands

# Fan service
sudo systemctl status t2fanrd
sudo systemctl restart t2fanrd
journalctl -u t2fanrd -f

# Edit fan curve
sudo nano /etc/t2fand.conf

# Switch TLP profiles
sudo tlp-profile balanced
sudo tlp-profile performance
sudo tlp-profile powersaver
tlp-profile                     # show active profile

# Apply TLP changes
sudo tlp start

# Check CPU cap & turbo
cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
cat /sys/devices/system/cpu/intel_pstate/no_turbo

# Temporary CPU cap override
echo 70 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

# Check current frequencies
grep "MHz" /proc/cpuinfo

# Check throttle events
cat /sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count

# Check temps
sensors
sensors | grep -E "Package|Core"
sudo tlp-stat -t
watch -n 2 'sudo tlp-stat -t'

# Detailed sensor dump
sensors -u

# Full TLP power report
tlp-stat -p

# Check what's using CPU
top -o %CPU -n 1 | head -20

# CPU frequency info
cpufreq-info
cpufreq-info -p

# Check GNOME desktop
echo $XDG_CURRENT_DESKTOP

# Swap Cmd/Ctrl
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swap_lwin_lctl']"

# Copy to clipboard
echo "text" | xclip -selection clipboard

# Clean unused packages
sudo apt autoremove