[Samsung NP530U3C-A01] LID close, AC, and battery status events not produced anymore

Bug #1283589 reported by juanmanuel on 2014-02-22
144
This bug affects 28 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Medium
Unassigned

Bug Description

On my Samsung Series 5 NP530U3C-A01 the LID close, AC, and battery status events not produced anymore. The situation is the same (tested with trusty-desktop-amd64.iso 2014-02-22). I created a blog post where I can put all the information related to this bug here: http://zenstep.com.ar/samsung-linux/

In summary, after a suspend sleep with many events (8 plug/unplug, or battery dropping or increasing about 16%, maybe less), the Embedded Controller accumulates those events and stops producing GPE 0x17. Neither Windows nor Linux query those accumulated events, because the EC doesn't produce GPE 0x17 anymore. The issue persists between restarts and shutdowns, and even after re-suspending/re-resuming. Hitting the reset button through the hole in the back fixes the problem temporarily. That is, until the next unlucky suspend.

IMPORTANT: if the laptop is never ever suspended, the issue never comes back.

To force the issue to happen, you can either:
1) Sleep the computer in linux (by closing the lid or any other means).
2) Unplug from the wall, plug, unplug, plug, unplug, plug, unplug, plug (8 actions or more).
3) Resume from sleep. You'll note that the battery icon is fixed, and unplugging or plugging doesn't update battery status anymore. Also note that the ability to suspend by closing the LID is lost.

OR:
1) echo disable > /sys/firmware/acpi/interrupts/gpe17
2) plug, unplug, plug, unplug, plug, unplug, plug, unplug (8 actions)
3) echo enable > /sys/firmware/acpi/interrupts/gpe17

WORKAROUND: Turn off the computer, unplug it, hit the reset button in the back of the laptop, and then plug it again.

WORKAROUND (kernel patch 1): https://bugzilla.kernel.org/show_bug.cgi?id=44161#c133

BETTER WORKAROUND (kernel patch 2): https://bugzilla.kernel.org/show_bug.cgi?id=44161#c149

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-11-generic 3.13.0-11.31
ProcVersionSignature: Ubuntu 3.13.0-11.31-generic 3.13.3
Uname: Linux 3.13.0-11-generic x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 2546 F.... pulseaudio
CasperVersion: 1.337
Date: Sat Feb 22 22:57:34 2014
LiveMediaBuild: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140222)
MachineType: SAMSUNG ELECTRONICS CO., LTD. 530U3C/530U4C
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: initrd=/casper/initrd.lz file=/cdrom/preseed/hostname.seed boot=casper quiet splash -- BOOT_IMAGE=/casper/vmlinuz.efi
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-11-generic N/A
 linux-backports-modules-3.13.0-11-generic N/A
 linux-firmware 1.125
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/15/2013
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: P14AAJ
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: SAMSUNG_NP1234567890
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: FAB1
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvrP14AAJ:bd04/15/2013:svnSAMSUNGELECTRONICSCO.,LTD.:pn530U3C/530U4C:pvr0.1:rvnSAMSUNGELECTRONICSCO.,LTD.:rnSAMSUNG_NP1234567890:rvrFAB1:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvr0.1:
dmi.product.name: 530U3C/530U4C
dmi.product.version: 0.1
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.

juanmanuel (rockerito99) wrote :
description: updated
juanmanuel (rockerito99) wrote :

Attached DSDT of a Samsung Series 5 NP530U3C ultrabook with the same problem. Bios version is latest: P14AAJ

description: updated
juanmanuel (rockerito99) wrote :

This is the program I made, that "unstucks" the computer so that it can send LID and AC and Battery events again. (it queries the embedded controller queued events, thus unblocking the EC so that it can start sending them again).

Ideally run after resume from sleep, or at any other time.

juanmanuel (rockerito99) wrote :

Script that calls the program found in the other attachment after resume from sleep.

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed

This is a patch created by Lan Tianyu on the kernel bugzilla to do the same that my workaround did, but in a more proper way, and from the kernel:

          https://bugzilla.kernel.org/show_bug.cgi?id=44161#c133

I tested it:

          https://bugzilla.kernel.org/show_bug.cgi?id=44161#c135

and it works.
Lets hope more people test this patch so that it can be included some day in the kernel.

description: updated
juanmanuel (rockerito99) wrote :

More description about this issue found I posted in blog format here:

           http://www.zenstep.com.ar/samsung-laptop
--
Juan Manuel Cabo

juanmanuel (rockerito99) wrote :
tags: added: patch
summary: - LID close and AC and battery status events not produced anymore on
- samsung ultrabook.
+ [Samsung NP530U3C-A01] LID close and AC and battery status events not
+ produced anymore
summary: - [Samsung NP530U3C-A01] LID close and AC and battery status events not
+ [Samsung NP530U3C-A01] LID close, AC, and battery status events not
produced anymore
description: updated
juanmanuel (rockerito99) wrote :

Christopher: you changed my description of the bug, and in doing so, confused the two different ways to force the issue to show up. You listed the second way as a fourth item of the first way, when it is a different way.

Take a look at the original description.
--
Juan Manuel Cabo

tags: added: cherry-pick

Also affect Serie 9 (NP900X3C in my case)

 Description: Ubuntu 13.10
 Release: 13.10

 Ubuntu 3.11.0-17.31-generic 3.11.10.3

juanmanuel workaround works.

Waiting Ubuntu patch

mmalmeida (mmalmeida) wrote :

Alfo affects: Samsung series 9 NP900X4C

Tim Edwards (tkedwards) wrote :

I have a Samsung NP530U3C-A01 laptop and I can confirm this bug affects my laptop. After applying the workaround script from juanmanuel in #3 and #4 I re-tested and the problem no longer appears.

Thanks juanmanuel for writing the fix and being so patient with Ubuntu's ridiculous bug policies - just don't lose your laptop otherwise we'll have to start this whole bug report process again!

«Thanks juanmanuel for writing the fix and being so patient with Ubuntu's ridiculous bug policies»

I think it's more of a one-man trolling issue than a policy problem.

juanmanuel (rockerito99) wrote :

UPDATED v2: Safer because it obtains the EC ports automatically from /proc/ioports, and it micro-pauses between queries, so that the EC returns each event only once. This replaces the little program in #3.
________
This is the program I made, that "unstucks" the computer so that it can send LID and AC and Battery events again. (it queries the embedded controller queued events, thus unblocking the EC so that it can start sending them again).

Ideally run after resume from sleep, or at any other time.

Tim Edwards (tkedwards) wrote :

@andrea-lazzarotto
To be fair it does say "One defect, per person, per hardware, per report" at https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue.

The 'One defect, per person' is obviously stupid when there's >100 of us with the same hardware and same problem, opening 100 bugs isn't going to help anyone. But I wouldn't make it personal against the guy if he's just a volunteer enforcing Canonical's rules.

Tomer (tbrisker) wrote :

@tkedwards
Only that rule was made to prevent multiple bugs being cluttered together in one bug report, not to be taken literally as a means of filling the bug system with hundreds of useless duplicates, and I quote:
"Don't amalgamate every issue and hardware you find a problem in after an update... Instead, do a separate report for each distinct issue, on each hardware. This is how different hardware can have similar problematic symptoms (ex. computer won't boot), but different root causes, and patches that fix the different causes."
Obviously this doesn't mean that every affected user should file a separate report for a common problem - otherwise what's the point of having the "this affects me too" on the top.

juanmanuel (rockerito99) on 2014-02-23
description: updated
Jon Cowell (info-synct) wrote :

I also have a Samsung NP-A530U3C-A01UK laptop that exhibits the same behaviour. Since applying the fix from juanmanul all is now well.

Many thanks juanmanual for identifying the cause for this long running issue and for working diligently to find the fix.

juanmanuel (rockerito99) wrote :

This is a NEW and BETTER patch created by Kieran Clancy on the kernel bugzilla to do the same that my workaround did, but in a more proper way, and from the kernel:

          https://bugzilla.kernel.org/show_bug.cgi?id=44161#c149

I also tested it this weekend, and it works (I forced the issue to happen again, and then saw it being resolved automatically by a kernel compiled with this patch).

The most salient advantage over the previous patch is that it also unstucks the EC when the computer starts (in addition to sleep resume). This is more fool proof and suits more use cases.

It also checks the laptop model.

Lets hope more people test this patch so that it can be included some day in the kernel.

juanmanuel (rockerito99) wrote :

> Many thanks juanmanuel for identifying the cause for this long running issue and for working diligently to find the fix.

You're welcome, it fills me with joy reading all this good feedback!!
--
Juan Manuel Cabo
http://zenstep.com.ar/samsung-linux

Joseph Salisbury (jsalisbury) wrote :

@juanmanuel ,

Do you plan on submitting your patch for inclusion in the mainline kernel?

tags: added: kernel-da-key
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
juanmanuel (rockerito99) wrote :

Joseph: The best kernel patch so far was made by Kieran Clancy (see post #18 here). His patch is attached to a kernel bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44161 in comment 149.

I'm just the author of the userspace workaround (post #3, #4, #14) that started it all (see the other issue here https://bugs.launchpad.net/ubuntu/+source/acpi/+bug/971061 comments 102 onwards) . It is a standalone program that unstucks the EC. On the other hand, Kieran's kernel patch now does the same in a cleaner way from inside the kernel.

In my humble opinion, Kieran Clancy's patch can be included in the kernel. I don't know whether Kieran will submit it.

Cheers!
--
Juan Manuel Cabo

juanmanuel (rockerito99) wrote :

Breaking News!

A fix in the form of a kernel patch has now been posted to the linux-acpi and linux-kernel mailing list:

        "[PATCH v2] ACPI / EC: Clear stale EC events on Samsung systems"
        http://marc.info/?l=linux-acpi&m=139359680828880&w=2

That kernel patch was made by Kieran Clancy and tested by me and others.

--
Juan Manuel Cabo
http://zenstep.com.ar/samsung-linux

zeeeeee (miesogeno) wrote :

juanmanuel,
No matter who found the latest/better solution, you are truly a hero.
After reading all the associated bug reports, I decided to use your script because I don't know how to compile the kernel, and I presume I would have to redo it every time the kernel got an update.

My laptop model is NP530U4C, finally with a normal behavior.
Gracias!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.