[Bug 753589] New: sysctl settings are not restored after suspend
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c0 Summary: sysctl settings are not restored after suspend Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: srid@rkmail.ru QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Opera/9.80 (X11; Linux x86_64; U; ru) Presto/2.10.229 Version/11.61 I've noticed that my custom settings from /etc/sysctl.conf are not applied when machine wakes up from suspend/hibernation. (tested on 2 machines) Reproducible: Always Steps to Reproduce: 1. put something in /etc/sysctl.conf, for example "vm.dirty_bytes = 4194304" 2. apply new settings: sysctl -e --system 3. make sure that that settings are applied 4. run pm-hibernate (pm-suspend) 5. resume machine 6. check current settings again Actual Results: All custom sysctl settings are missing Expected Results: settings should be restored from configuration files -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c1 --- Comment #1 from Iakov Karpov <srid@rkmail.ru> 2012-04-08 08:47:32 UTC --- + the same happens when switching power source (AC power to battery power and vice-versa) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c Iakov Karpov <srid@rkmail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|sysctl settings are not |sysctl.conf settings are |restored after suspend |lost when changing | |powerstate -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@novell.com AssignedTo|bnc-team-screening@forge.pr |werner@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c2 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium CC| |aj@suse.com, rjw@suse.com, | |werner@suse.com Platform|x86-64 |All AssignedTo|werner@suse.com |bnc-team-screening@forge.pr | |ovo.novell.com Severity|Normal |Major --- Comment #2 from Dr. Werner Fink <werner@suse.com> 2012-04-11 08:20:28 UTC --- I've not written the suspend/hibernation scripts nor I'm maintainer of. If those scripts do miss a simple reload of sysctl, then the author and/or current maintainer should know where this has to be added. I guees after readding the kernel modules which may unloaded before going into suspend/hibernate state -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c3 kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |nld10-bugs-qa@forge.provo.n |ovo.novell.com |ovell.com --- Comment #3 from kk zhang <kkzhang@novell.com> 2012-04-11 08:24:06 UTC --- Hi,could you please help to have a look this?I am not sure whether it is right to assign it to you.Feel free to reassign it.Thank you. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c Andreas Jaeger <aj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|nld10-bugs-qa@forge.provo.n |rjw@suse.com |ovell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c4 Rafael Wysocki <rjw@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |srid@rkmail.ru --- Comment #4 from Rafael Wysocki <rjw@suse.com> 2012-04-11 20:48:56 UTC --- How is 3. done, exactly? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c5 Iakov Karpov <srid@rkmail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|srid@rkmail.ru | --- Comment #5 from Iakov Karpov <srid@rkmail.ru> 2012-04-12 04:24:19 UTC --- (In reply to comment #4)
How is 3. done, exactly?
man sysctl? #sysctl variable print current value #sysctl -a print all variables and values I'm personally using "sysctl vm.dirty_bytes", because I set it in my sysctl.conf -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c6 Rafael Wysocki <rjw@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |srid@rkmail.ru --- Comment #6 from Rafael Wysocki <rjw@suse.com> 2012-04-12 22:03:29 UTC --- OK What happens if you suspend by "echo mem > /sys/power/state" instead of running pm-suspend? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c7 Iakov Karpov <srid@rkmail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|srid@rkmail.ru | --- Comment #7 from Iakov Karpov <srid@rkmail.ru> 2012-04-13 03:55:24 UTC --- (In reply to comment #6)
OK
What happens if you suspend by "echo mem > /sys/power/state" instead of running pm-suspend?
Everything looks fine when suspending that way. At least, vm.dirty_bytes is not reset to 0. # sysctl vm.dirty_bytes vm.dirty_bytes = 4194304 # echo mem > /sys/power/state # sysctl vm.dirty_bytes vm.dirty_bytes = 4194304 # -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c8 Rafael Wysocki <rjw@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|rjw@suse.com |kkzhang@suse.com --- Comment #8 from Rafael Wysocki <rjw@suse.com> 2012-04-13 20:41:30 UTC --- Well, it's not a kernel problem, then. Most likely, one of the scripts in /usr/lib/pm-utils/sleep.d/ does something wrong to your sysctl settings. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c9 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |os.gnome.maintainers@gmail. | |com, vdziewiecki@suse.com AssignedTo|kkzhang@suse.com |vdziewiecki@suse.com --- Comment #9 from Dr. Werner Fink <werner@suse.com> 2012-04-16 07:18:18 UTC --- (In reply to comment #8) Why do you talk about kernel problems? AFAICS this is a problem in the package suspend and/or pm-utils. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c Vojta Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c10 Vojta Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 - Medium |P4 - Low --- Comment #10 from Vojta Dziewięcki <vdziewiecki@suse.com> 2012-04-17 11:55:56 UTC --- Actually it is /usr/lib/pm-utils/power.d/laptop-mode. When running on battery, it tests "vm parameters to buffer as many writes as possible", which is, IMO, a good idea and it can actually save power, so I would leave this as it is. Upon switching to AC power (or upon resume from suspend, when the laptop is on AC, because resuming from suspend calls the power.d hooks), it restores those settings "back to sane defaults", as stated in the script. Since we want to load custom parameters, not just defaults, I will add: sysctl -e --system to this laptop-mode hook to the "AC" part, and put it in the next maintenance update. Iakov: if you don't want to wait for the maintenance update, just add sysctl -e --system to the end of laptop_mode_ac() function in /usr/lib/pm-utils/power.d/laptop-mode. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c11 --- Comment #11 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-04-19 12:00:38 CEST --- This is an autogenerated message for OBS integration: This bug (753589) was mentioned in https://build.opensuse.org/request/show/114572 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c12 --- Comment #12 from Vojta Dziewięcki <vdziewiecki@suse.com> 2012-04-19 12:06:02 UTC --- In case someone wants the fixed packages now: http://download.opensuse.org/repositories/home:/vdziewiecki/ I have also submitted them to factory. As I said, I will add this to the next pm-utils maintenance update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c13 Stefan Seyfried <seife@novell.slipkontur.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |seife@novell.slipkontur.de --- Comment #13 from Stefan Seyfried <seife@novell.slipkontur.de> 2012-05-30 11:00:37 CEST --- see bug 764388 for the nice side effects this crazy "sysctl -e --system" 'fix' brings. Instead of the big hammer, just resetting what was changed by the laptop-mode hook script would have been much nicer. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c14 --- Comment #14 from Dr. Werner Fink <werner@suse.com> 2012-05-30 09:17:41 UTC --- (In reply to comment #13) This would require a push/pop scheme of what is changed and has to be restored afterwards. And clearly this list has to survive the suspend. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c15 --- Comment #15 from Vojta Dziewięcki <vdziewiecki@suse.com> 2012-06-04 18:12:41 UTC --- Created an attachment (id=493527) --> (http://bugzilla.novell.com/attachment.cgi?id=493527) Proposed fix Ok this might work: We remove the "crazy big hammer", but we also remove the "state_exists laptop_mode_default" test, which prevented the user-defined values from being saved most of the times and caused this bug. Now with this line removed, the script will save the values correctly upon unplugging the adapter and restore them upon plugging. Now the problem is that the powersave hooks run not only upon pugging or unplugging the ac adapter, but also on suspend and resume, and it causes trouble in this case (tested on my laptop): 1. Unplug the laptop adapter and plug it in again, the values get saved and restored correctly. 2. Change some value affected by laptop-mode hook (vm.dirty_bytes for example) 3. Suspend and wake, the values are never saved, but they are restored again to the values that had been saved before (upon unplugging the adapter). This is unwanted behaviour, since user-defined sysctl settings can be lost this way, so I propose adding on_ac_power tests upon suspend/resume, as seen in the attached patch. This way, the saved values would never be restored two times (Again, tested on my laptop - the value remained the same before and after suspend). There is no need to run "pm-powersave false" hook if the laptop is already running on ac-power, so IMO this shouldn't have any side-effects. So what do you guys think? Would this be an acceptable solution? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c16 --- Comment #16 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-06-20 18:00:25 CEST --- This is an autogenerated message for OBS integration: This bug (753589) was mentioned in https://build.opensuse.org/request/show/125546 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c17 --- Comment #17 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-06-21 14:00:27 CEST --- This is an autogenerated message for OBS integration: This bug (753589) was mentioned in https://build.opensuse.org/request/show/125636 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c18 --- Comment #18 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-06-21 20:00:29 CEST --- This is an autogenerated message for OBS integration: This bug (753589) was mentioned in https://build.opensuse.org/request/show/125701 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c19 Vojta Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution| |FIXED --- Comment #19 from Vojta Dziewięcki <vdziewiecki@suse.com> 2012-06-25 11:45:23 UTC --- Submitted. 12.1: sr#125700 11.4: sr#125699 Closing. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c20 --- Comment #20 from Swamp Workflow Management <swamp@suse.de> 2012-07-03 15:09:56 UTC --- openSUSE-RU-2012:0816-1: An update that has 5 recommended fixes can now be installed. Category: recommended (low) Bug References: 633496,697379,751621,751811,753589 CVE References: Sources used: openSUSE 12.1 (src): pm-utils-1.4.1-12.25.1 openSUSE 11.4 (src): pm-utils-1.4.1-5.32.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c21 Fabio Scl <fa0sck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fa0sck@gmail.com --- Comment #21 from Fabio Scl <fa0sck@gmail.com> 2012-07-04 09:44:06 UTC --- Hi, after applying pm-utils patches to my openSUSE 12.1 x86_64 (therefore now using pm-utils-1.4.1-12.25.1.x86_64) I don't know if it's just me but I noticed this put laptop on battery: ~> cat /proc/sys/vm/laptop_mode 5 OK, the same for other pm parameters then suspend/hibernate... resume: ~> cat /proc/sys/vm/laptop_mode 0 and the same for other pm parameters (link_power_management_policy, etc.) but one I think should expect: ~> cat /proc/sys/vm/laptop_mode 5 (and other param.) I modified/reverted line: resume|thaw) on_ac_power || pm-powersave false ;; with resume|thaw) on_ac_power || pm-powersave ;; in file /usr/lib/pm-utils/sleep.d/00powersave (of course) now it works as I would expect but I don't know if the workaround is good, potential drawbacks, etc. I will test more and carefully, hoping the issue is just a problem of mine. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c22 --- Comment #22 from Andreas Jaeger <aj@suse.com> 2012-07-04 09:54:51 UTC --- Fabio, if you think there's a problem, please reopen the bug - closed bugs are ignored ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c23 Fabio Scl <fa0sck@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED | --- Comment #23 from Fabio Scl <fa0sck@gmail.com> 2012-07-04 12:03:28 UTC --- (In reply to comment #22)
Fabio, if you think there's a problem, please reopen the bug - closed bugs are ignored ;)
Ops -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c24 --- Comment #24 from Fabio Scl <fa0sck@gmail.com> 2012-07-04 12:07:23 UTC --- (In reply to comment #23)
(In reply to comment #22)
Fabio, if you think there's a problem, please reopen the bug - closed bugs are ignored ;)
Ops
To all: I apologize, reopened now. See #21 for details. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c25 --- Comment #25 from Vojta Dziewięcki <vdziewiecki@suse.com> 2012-07-10 10:04:06 UTC ---
I modified/reverted line:
resume|thaw) on_ac_power || pm-powersave false ;;
with
resume|thaw) on_ac_power || pm-powersave ;;
Yeah, it should definitely be like this, I don't know why I wrote "false" there, my bad. I'll fix it in the next maintenance update, cause it's not worth doing one on it's own. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c26 --- Comment #26 from Bernhard Wiedemann <bwiedemann@suse.com> 2012-07-10 13:00:08 CEST --- This is an autogenerated message for OBS integration: This bug (753589) was mentioned in https://build.opensuse.org/request/show/127476 Factory / pm-utils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753589 https://bugzilla.novell.com/show_bug.cgi?id=753589#c27 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #27 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2014-07-16 15:18:30 UTC --- Fixed long ago. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com