Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87001 - laptop_mode_tools use wrong path in /sys
Summary: laptop_mode_tools use wrong path in /sys
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-28 10:34 UTC by Eggert
Modified: 2007-02-11 09:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eggert 2005-03-28 10:34:13 UTC
The script /usr/sbin/laptop_mode did not work on my Toshiba A40 notebook. It turned out that cpufreq information is stored in 
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
what is wrong. The correct path is
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
The wrong path is used at two places in the script.


Reproducible: Always
Steps to Reproduce:
1.Install the laptop_mode_tools
2.Configure the /etc/laptop-mode/laptop-mode.conf to reduce the cpu frequency when the laptop lid is closed
3.Close the lid of the laptop
4.Verify the cpu frequency by 
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq (because the lid is closed, this has to be done from another system using ssh)

Actual Results:  
The cpu frequency was not changed 

Expected Results:  
The cpu frequency should change to the configured value 

the line 307 of the script should be: 
echo $CPU_MAXFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 
 
the line 364 of the script should be: 
echo `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` 
> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
Comment 1 Henrik Brix Andersen 2005-04-24 09:08:50 UTC
No, the current behavior of laptop_mode is the intended behavior - it just relies on having a non-userspace governor selected.

All the script does is setting the the maximum _allowed_ scaling frequency. It doesn't dictate the frequency.