You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

HP EliteBook 2540p Ubuntu16.04风扇转速设置求助

Fixing Fan Control Issues on HP EliteBook 2540p in Ubuntu 16.04

Hey there, sorry to hear you're stuck fighting with uncooperative fan controls on your HP EliteBook 2540p under Ubuntu 16.04—those HP-specific fan restrictions are notoriously frustrating, especially when you know it works smoothly in Windows with HWinfo32. Let's walk through targeted fixes to get manual fan control working:

1. First, Check Your BIOS Settings

This is the most common culprit for HP laptops. Reboot your machine and enter the BIOS (usually by pressing F10 during startup). Look for options like:

  • Fan Control Mode (under Power or Hardware sections)
  • OS Controlled Fan or similar

Set this to allow the operating system to manage fan speeds instead of leaving it fully in BIOS control. Save changes and boot back into Ubuntu—this unlocks the ability for tools like lm-sensors to interact with the fan.

2. Verify Sensor & Fan Node Detection

Let's make sure Ubuntu can see your fan and PWM controls:

  1. Reinstall and reconfigure lm-sensors to ensure all hardware is detected:
    sudo apt-get update && sudo apt-get install lm-sensors
    sudo sensors-detect
    
    Follow the prompts to scan for sensors (answer "yes" to most questions).
  2. Run sensors to check if fan speeds (fan*_input) and CPU temperatures are displayed. If fans aren't showing up, find the correct hardware node:
    ls /sys/class/hwmon/
    
    For each hwmonX directory (e.g., hwmon0), check the device name:
    cat /sys/class/hwmon/hwmon0/name
    
    Look for entries related to your fan controller (not just coretemp which is CPU temp). Inside that directory, look for pwm* files (PWM control channels) and fan*_input (fan speed readings).
  3. Test manual PWM control directly:
    # Replace X and Y with your hwmon number and PWM channel
    sudo chmod 666 /sys/class/hwmon/hwmonX/pwmY
    echo 128 > /sys/class/hwmon/hwmonX/pwmY
    
    This sets the fan to roughly 50% speed (PWM values range from 0-255). If the fan responds, you've found the right channel—skip to step 4 to set up fancontrol. If not, move to the next fix.

3. Load Required Kernel Modules

HP laptops often need specific kernel modules to expose fan controls. Try loading the hp-wmi module:

sudo modprobe hp-wmi

After loading, re-run sensors and check if fan nodes appear. If they do, re-run sudo pwmconfig to generate a fancontrol configuration file.

4. Fix pwmconfig Not Working

If pwmconfig still fails to detect PWM devices, try upgrading your kernel—Ubuntu 16.04's default kernel might lack proper support for older HP models. Install the Hardware Enablement (HWE) kernel:

sudo apt-get install linux-generic-hwe-16.04

Reboot your system, then re-run sensors-detect and pwmconfig. This often resolves compatibility issues with older hardware.

5. Alternative: Control CPU Frequency to Reduce Heat

If you still can't get direct fan control, reducing CPU load can lower temperatures and indirectly calm the fan. Install cpufrequtils:

sudo apt-get install cpufrequtils

Set your CPU to power-saving mode to limit clock speeds:

sudo cpufreq-set -g powersave

This won't give you manual fan control, but it can reduce heat output enough to make the fan more manageable without a cooling pad.


内容的提问来源于stack exchange,提问作者Nilkamal Gotarne

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:11:13