Created attachment 56863 [details] pm-utils/pm/power.d/laptop-mode Version: 1.4.1 As I reported to Debian: http://bugs.debian.org/659260 Since laptop-mode can be executed after or before sysctl.conf depending on the system on AC or Battery, it is not good idea to overwite /proc/sys/vm/* with the fixed default kernel values which is hardcoded in laptop-mode script in a bit hidden way. Simple fix (solution 1) --- a/pm/power.d/laptop-mode +++ b/pm/power.d/laptop-mode @@ -65,8 +65,6 @@ # disable laptop mode, set vm parameters back to sane defaults if state_exists laptop_mode_default; then write_values $(restorestate laptop_mode_default) - else - write_values 0 10 5 500 fi echo "Laptop mode disabled." } But this may be a bit fragile since this code may have had some reason to be here. If you hardcode them in this script, I wish you to make it more obvious which people will be changing easily. Also, i realize using battery mode even under AC is good if you have SSD. Replacing this script with attached code may be good idea. ====== EXPERIMENTAL RESULT OF DEBIAN SYSTEM WITH pm-utils ===== = Normal system = == Normal - start on AC == • boot on AC • hard-coded AC setting in laptop_mode of pm-utils (no state file) • unplug • hard-coded BATT setting in laptop_mode of pm-utils (state file with hard-coded AC setting in laptop_mode of pm-utils) • plug • hard-coded AC setting in laptop_mode of pm-utils == Normal - start on BATT == • boot on BATT • hard-coded BATT setting in laptop_mode of pm-utils (state file with sysctrl.conf) • plug • setting in /etc/sysctrl.conf content (state file with sysctrl.conf) • unplug • hard-coded BATT setting in laptop_mode of pm-utils (state file with sysctrl.conf) = Disable hard-coded AC - solution 1 applied = = Disable hard-coded AC - start on AC = • boot on AC • setting in /etc/sysctrl.conf content (no state file) • unplug • hard-coded BATT setting in laptop_mode of pm-utils (state file with sysctrl.conf) • plug • setting in /etc/sysctrl.conf content (state file with sysctrl.conf) = Disable hard-coded AC - start on BATT = • boot on BATT • hard-coded BATT setting in laptop_mode of pm-utils (state file with sysctrl.conf) • plug • setting in /etc/sysctrl.conf content (state file with sysctrl.conf) • unplug
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.