[Bug 827854] New: System freezes when running on battery with SATA ALPM enabled
https://bugzilla.novell.com/show_bug.cgi?id=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c0 Summary: System freezes when running on battery with SATA ALPM enabled Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: x86-64 OS/Version: openSUSE 12.3 Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: tobiaspotocek@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=546545) --> (http://bugzilla.novell.com/attachment.cgi?id=546545) Output of dmesg after freeze passes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 When AC is unplugged, several power saving tweaks are applied. Among others there is the script /usr/lib/pm-utils/power.d/alpm which will activate SATA link power management. This will lead to frequent system freezes. Reproducible: Always Steps to Reproduce: 1. Buy Asus Zenbook UX32VD (or similar, hardware details are provided later) 2. Install OpenSuse 12.3 3. Unplug the power source 4. Wait ;-) Actual Results: The system freezes randomly, approximately every 5 minutes. However it seems that it can be triggered by heavy disk load. One freeze lasts approximately from 30 to 60 seconds. During the freeze the system is in some cases completely unresponsive (even the cursor is frozen), in other you can use "what is on the screen", but is is impossible to run anything new (even ls in the command line). The diod indicating disc activity is constantly on during the freeze. After the freezes passes, everything returns to normal. There are no freezes what so ever when running on AC. There are a lot of errors in /var/log/messages after the freezes. Few examples (see attachments for whole log): 3-07-02T19:11:54.480614+02:00 zenbook kernel: [34448.565112] ata1.00: exception Emask 0x40 SAct 0xf SErr 0x50800 action 0x6 frozen 2013-07-02T19:11:54.480629+02:00 zenbook kernel: [34448.565118] ata1: SError: { HostInt PHYRdyChg CommWake } 2013-07-02T19:11:54.480631+02:00 zenbook kernel: [34448.565121] ata1.00: failed command: READ FPDMA QUEUED 2013-07-02T19:11:54.480632+02:00 zenbook kernel: [34448.565146] ata1.00: cmd 60/08:00:98:28:5a/00:00:07:00:00/40 tag 0 ncq 4096 in 2013-07-02T19:11:54.480633+02:00 zenbook kernel: [34448.565146] res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x44 (timeout) 2013-07-02T19:11:54.480634+02:00 zenbook kernel: [34448.565156] ata1.00: status: { DRDY } 2013-07-02T19:11:54.480635+02:00 zenbook kernel: [34448.565162] ata1.00: failed command: READ FPDMA QUEUED 2013-07-02T19:11:54.480636+02:00 zenbook kernel: [34448.565173] ata1.00: cmd 60/d8:08:a8:28:5a/00:00:07:00:00/40 tag 1 ncq 110592 in 2013-07-02T19:11:54.480637+02:00 zenbook kernel: [34448.565173] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x44 (timeout) 2013-07-02T19:11:54.785597+02:00 zenbook kernel: [34448.870195] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out 2013-07-02T19:11:54.785599+02:00 zenbook kernel: [34448.870247] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded 2013-07-02T19:11:54.785601+02:00 zenbook kernel: [34448.870253] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out 2013-07-02T19:11:54.789572+02:00 zenbook kernel: [34448.873982] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out 2013-07-02T19:11:54.789595+02:00 zenbook kernel: [34448.874114] ata1.00: ACPI cmd ef/10:06:00:00:00:a0 (SET FEATURES) succeeded 2013-07-02T19:11:54.789597+02:00 zenbook kernel: [34448.874125] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out 2013-07-02T19:11:54.790576+02:00 zenbook kernel: [34448.874817] ata1.00: device reported invalid CHS sector 0 Expected Results: This shouldn't be happening. This problem seems to be similar to this one: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/610055 Luckily, it's quite simple to fix it. Simply disable /usr/lib/pm-utils/power.d/sata_alpm. You can do it by creating a new conf file in /etc/pm/config.d/ and putting "SATA_ALPM_ENABLE=false" in it. This will immediately prevent freezes from happening (simply plug/unplug AC to active new settings). I have several times tried to disable and enable this tweak and I can confirm that it really works. You can check your /var/log/pm-powersave.log to see if the tweak is applied. There _should not_ be any messages like "Setting SATA APLM on host0 to min_performance...Done." Hardware info: My laptop is Asus Zenbook UX32VD. See https://www.asus.com/Notebooks_Ultrabooks/ASUS_ZENBOOK_UX32VD/#specification... for full specs. It's the i7 version, with two SSDs in RAID 0. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c1 --- Comment #1 from Tobiáš Potoček <tobiaspotocek@gmail.com> 2013-07-02 17:50:37 UTC --- Created an attachment (id=546546) --> (http://bugzilla.novell.com/attachment.cgi?id=546546) Put this file in /etc/pm/config.d/ to stop the freezes -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c2 --- Comment #2 from Tobiáš Potoček <tobiaspotocek@gmail.com> 2013-07-02 17:52:07 UTC --- Created an attachment (id=546547) --> (http://bugzilla.novell.com/attachment.cgi?id=546547) Output of lspci I can provide more hardware info if you tell me how. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c Tobiáš Potoček <tobiaspotocek@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #546547|application/octet-stream |text/plain mime type| | -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c Ye Yuan <yyuan@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yyuan@suse.com AssignedTo|bnc-team-screening@forge.pr |vdziewiecki@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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c3 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-07-23 13:08:41 UTC --- I am all for removing sata_alpm from pm-utils, and also most of the other power.d hooks that don't save much power anyway and just cause trouble. I'll look into it soon. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c4 --- Comment #4 from Tobiáš Potoček <tobiaspotocek@gmail.com> 2013-07-23 17:16:00 UTC --- It should be definitely optional. When I was trying to optimize power management on my laptop, I came across this tip quite often, but it was always followed by a warning that this tweak might cause serious trouble. I don't think it was very wise to enable this by default in OpenSuse. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c5 --- Comment #5 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-08-02 17:00:33 CEST --- This is an autogenerated message for OBS integration: This bug (827854) was mentioned in https://build.opensuse.org/request/show/185640 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c6 --- Comment #6 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-06 09:49:04 UTC --- Submitted. https://build.opensuse.org/request/show/186072 -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c7 --- Comment #7 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-06 09:55:24 UTC --- And a more conservative fix for 12.2 where I removed only the alpm hook: https://build.opensuse.org/request/show/186073 -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c8 --- Comment #8 from Benjamin Brunner <bbrunner@suse.com> 2013-08-06 13:37:34 CEST --- Thanks for your submission. Unfortunately the build for 12.2 fails. Please see the buildlog from https://build.opensuse.org/package/show/openSUSE:Maintenance:1923/pm-utils.o... -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c9 --- Comment #9 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-12 13:29:39 UTC --- Thanks, I submitted fixed version that builds: https://build.opensuse.org/request/show/186741 -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c10 --- Comment #10 from Swamp Workflow Management <swamp@suse.de> 2013-08-19 16:04:33 UTC --- openSUSE-RU-2013:1360-1: An update that has one recommended fix can now be installed. Category: recommended (low) Bug References: 827854 CVE References: Sources used: openSUSE 12.3 (src): pm-utils-1.4.1-26.17.1 openSUSE 12.2 (src): pm-utils-1.4.1-18.24.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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c11 Jan Ritzerfeld <suse@bugs.jan.ritzerfeld.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse@bugs.jan.ritzerfeld.or | |g --- Comment #11 from Jan Ritzerfeld <suse@bugs.jan.ritzerfeld.org> 2013-08-23 09:10:03 UTC --- @Wojtek: I beg to differ, these hooks do save much power. Removing all these hooks yields to my T430s consuming ~25% more battery power (from ~8.25W to 10.5W)! sata_alpm contributes about 1W and wireless another 1W. @Tobiáš: Any chance that you have an Intel SSD 520? However, this is a SSD firmware bug and also affects Windows: https://bugzilla.kernel.org/show_bug.cgi?id=43182 https://bugzilla.kernel.org/show_bug.cgi?id=51861 http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T430s-Intel-SSD-520... -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c12 --- Comment #12 from Tobiáš Potoček <tobiaspotocek@gmail.com> 2013-08-23 09:26:46 UTC --- @Jan Ritzerfeld: I'm not sure of the exact type but it's definitely SanDisk. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c13 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |crrodriguez@opensuse.org --- Comment #13 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-23 09:31:27 UTC --- Cristian: can you think of a way to save some power on alpm and wireless, without using pm-utils? Jan: I'm sorry, we have to drop pm-utils, the sooner the better. We have to save your two watts in a different way, I'm sure it will be possible soon. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c14 --- Comment #14 from Jan Ritzerfeld <suse@bugs.jan.ritzerfeld.org> 2013-08-23 10:50:26 UTC --- @Tobiáš: "hdparm -I /dev/sda" should give you the exact model number and the firmware revision. Maybe there is a SSD firmware update available. @Vojtech: I understand and tend to agree to Lennart who stated (August 2012) that they try to minimize the differences between AC and battery. Most power saving would be reasonable on AC, too. For the time being, I copied the needed hooks to /etc/pm/power.d/ manually. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c15 Cristian Rodríguez <crrodriguez@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED CC| |crrodriguez@opensuse.org, | |mmarek@suse.com InfoProvider|crrodriguez@opensuse.org | --- Comment #15 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-08-23 13:21:14 CLT --- (In reply to comment #13)
Cristian: can you think of a way to save some power on alpm and wireless, without using pm-utils?
No, because what we are seeing here is clearly a kernel bug. if enabling SATA ALPM results in machine hang, then IMHO the kernel must refuse to enable it on this particular machine/controller/whatever. With regards to wireless, enabling or disabling power saving on an particular wireless interface should be done in networkmanager and kick in only when ON_BATTERY. doing it in pm-utils looks absolutely wrong. (imagine drop and down menu, "enable power saving: with options "always", "on battery", "on low battery"...) -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c16 --- Comment #16 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-08-23 13:23:46 CLT --- (In reply to comment #15)
(In reply to comment #13)
Cristian: can you think of a way to save some power on alpm and wireless, without using pm-utils?
No, because what we are seeing here is clearly a kernel bug.
OR a bug in the SSD firmware, not sure if the kernel has hooks to disable SATA ALPM on particular drives/firmware versions. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c17 --- Comment #17 from Tobiáš Potoček <tobiaspotocek@gmail.com> 2013-08-23 19:18:22 UTC --- @Jan The exact model is SanDisk SD5SF2256G1002E. I have two of those in RAID 0 in my laptop. I don't know if that's relevant. The firmware might be out-of-date but at this point the battery life is not an issue for me. Stability and reliability are more important. So I'm not going to change something that works fine :) -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c18 --- Comment #18 from Jan Ritzerfeld <suse@bugs.jan.ritzerfeld.org> 2013-08-24 09:58:50 UTC --- @Tobiáš: Never change a running system... However, SSD firmwares may have really strange bugs. E.g., crashing when the SMART Power_On_Hours value reaches 5200 and working again for one hour after a cold reboot. So, be prepared. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c19 --- Comment #19 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-28 09:32:52 UTC --- Jan could you fill a feature request to NetworkManager to do some power saving on wireless cards? I don't know how ALPM should be handled properly, if anyone can come with an idea, it would be great, but pm-utils will not do it. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c20 --- Comment #20 from Jan Ritzerfeld <suse@bugs.jan.ritzerfeld.org> 2013-08-28 10:06:02 UTC --- There is already "support power saving capabilities of wifi chipsets": https://bugzilla.gnome.org/show_bug.cgi?id=353665 -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c21 --- Comment #21 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-08-28 13:15:53 CLT --- (In reply to comment #17)
@Jan The exact model is SanDisk SD5SF2256G1002E. I have two of those in RAID 0 in my laptop. I don't know if that's relevant. The firmware might be out-of-date but at this point the battery life is not an issue for me. Stability and reliability are more important. So I'm not going to change something that works fine :)
I *strongly* suggest you to upgrade the disk firmware if possible, SSDs have very unnerving bugs, once I spent a full week "debugging" a misterious hang like this. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c22 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution| |INVALID --- Comment #22 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-08-30 15:42:13 UTC --- I'll close this bug as invalid, since it was a firmware bug not caused by pm-utils. Power hooks were removed from pm-utils and those power savings have to be done elsewhere, it's not pm-utils' job. I'm glad there already is a request for network manager. Where should we implement activating sata alpm power management? My guess is laptop-mode-tools. -- 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=827854 https://bugzilla.novell.com/show_bug.cgi?id=827854#c23 --- Comment #23 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-08-30 11:58:06 CLT --- (In reply to comment #22)
Where should we implement activating sata alpm power management? My guess is laptop-mode-tools.
Nope, Probably in upower or whatever backend that controls the "power management" applets on the relevant DE. -- 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