Dell Inspiron on kernel 4.10 : battery detected only after AC power adapter event

Bug #1678590 reported by Xavier Gnata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Kai-Heng Feng
Zesty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Battery events does not work on Dell Inspiron 7537.

[Test Case]
Boot the machine, no battery detected.
Add a quirk for Inspiron 7537 can make battery detection work.

[Regression Potential]
None. It only applies to one specific laptop, Dell Inspiron 7537.

Hi,

I already reported the bug here:
http://www.spinics.net/lists/linux-acpi/msg73101.html

When I boot a Dell 15" serie 7000 with or without it AC power adapter no battery is detected:

acpi -i -b -a
Adapter 0: off-line

As soon as I plug or unplug the AC adapter, the battery is detected:
acpi -i -b -a
Battery 0: Charging, 62%, 01:13:00 until charged
Battery 0: design capacity 3950 mAh, last full capacity 3850 mAh = 97%
Adapter 0: on-line

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-4.10.0-13-generic root=UUID=42930a1e-fbdc-4cd8-a1d2-caf2bd33de1b ro acpi_osi=Linux quiet splash vt.handoff=7

I've tried with and without acpi_osi=Linux but it makes no difference.

Attached : dmesg and dsdt in http://www.spinics.net/lists/linux-acpi/msg73101.html
I think that acpi_osi=Linux used to do the trick but it does not work on vmlinuz-4.10.0-13-generic

Xavier
---
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC1D0p: xavier 1473 F...m pulseaudio
 /dev/snd/controlC1: xavier 1473 F.... pulseaudio
 /dev/snd/controlC0: xavier 1473 F.... pulseaudio
DistroRelease: Ubuntu 17.04
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=31a2d0a3-34b9-467d-8c4d-f226cc825604
InstallationDate: Installed on 2017-03-28 (5 days ago)
InstallationMedia: Kubuntu 17.04 "Zesty Zapus" - Beta amd64 (20170321)
MachineType: Dell Inc. Inspiron 7537
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-13-generic root=UUID=42930a1e-fbdc-4cd8-a1d2-caf2bd33de1b ro acpi_osi=Linux quiet splash
ProcVersionSignature: Ubuntu 4.10.0-13.15-generic 4.10.1
RelatedPackageVersions:
 linux-restricted-modules-4.10.0-13-generic N/A
 linux-backports-modules-4.10.0-13-generic N/A
 linux-firmware 1.164
Tags: zesty
Uname: Linux 4.10.0-13-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers
_MarkForUpload: True
dmi.bios.date: 10/04/2016
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A14
dmi.board.name: 03HR9V
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA14:bd10/04/2016:svnDellInc.:pnInspiron7537:pvr:rvnDellInc.:rn03HR9V:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Inspiron 7537
dmi.sys.vendor: Dell Inc.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1678590

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected zesty
description: updated
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : CRDA.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : IwConfig.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : JournalErrors.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : Lspci.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : Lsusb.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : ProcEnviron.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : ProcModules.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : PulseList.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : RfKill.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : UdevDb.txt

apport information

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.11 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc5

tags: added: kernel-da-key
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Exact same bug with kernel 4.11.0-041100rc5-generic
(still with acpi_osi=Linux in the kernel options)

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Seems like it's the same: https://bugzilla.kernel.org/show_bug.cgi?id=105721.
Please test if kernel option 'acpi_rev_override' works.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Thanks!
Adding acpi_rev_override does the trick!
I set it to "fix released" even if "workaround documented" would be more appropriate.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The 'workaround' can be made into Linux kernel, so you don't need additional kernel parameter once it's in Ubuntu's kernel.

Changed in linux (Ubuntu):
status: Fix Released → In Progress
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

OK do you have a patch?
On which basis do you want to set _REV to 2 instead of 5?

tags: removed: kernel-da-key
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please test the kernel without kernel parameter 'acpi_rev_override':

http://people.canonical.com/~khfeng/lp1678590/

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

No such bug (The battery is correctly detected) with
linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb
and
ro acpi_osi=Linux quiet splash vt.handoff=7

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks, I'll send a patch for this issue.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sent the patch, I'll backport the patch after it lands at mainline.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

I think you mean this patch? It will probably take quite some time to find its way to the package. I'm going to try to compile a patched ubuntu kernel in the meantime. thanks.

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 4421f7c9981c..bb542acc0574 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -188,6 +188,14 @@ static struct dmi_system_id acpi_rev_dmi_table[] __initdata = {
         DMI_MATCH(DMI_PRODUCT_NAME, "Latitude 3350"),
   },
  },
+ {
+ .callback = dmi_enable_rev_override,
+ .ident = "DELL Inspiron 7537",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7537"),
+ },
+ },
 #endif
  {}
 };

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Yes.

Though I think use 'acpi_rev_override' should be a better alternative in the meantime.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Mix of "fun" and "to be right sure it works" :)

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

The patch is not getting much attention on the linux-acpi list :(

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The maintainer didn't replied mail but I think it's being applied [1].

I'll backport the patch once it hit mainline.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=2cff319e9666f534a7538aa1f4178d1f799b068a

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Here we go (except if it would be reverted before 4.12 but why would it?)
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/blacklist.c

description: updated
Seth Forshee (sforshee)
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Zesty):
status: New → Fix Committed
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

Perfect example of excellent support! Thanks.
I hope the patch will find its way to the next zesty kernel update.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-zesty' to 'verification-done-zesty'. If the problem still exists, change the tag 'verification-needed-zesty' to 'verification-failed-zesty'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-zesty
Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

It works with the kernel currently in -proposed.
Thank you!

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (19.7 KiB)

This bug was fixed in the package linux - 4.10.0-26.30

---------------
linux (4.10.0-26.30) zesty; urgency=low

  * linux: 4.10.0-26.30 -proposed tracker (LP: #1700528)

  * CVE-2017-1000364
    - Revert "UBUNTU: SAUCE: mm: Only expand stack if guard area is hit"
    - Revert "mm: do not collapse stack gap into THP"
    - Revert "mm: enlarge stack guard gap"
    - mm: larger stack guard gap, between vmas
    - mm: fix new crash in unmapped_area_topdown()
    - Allow stack to grow up to address space limit

linux (4.10.0-25.29) zesty; urgency=low

  * linux: 4.10.0-25.29 -proposed tracker (LP: #1699028)

  * CVE-2017-1000364
    - SAUCE: mm: Only expand stack if guard area is hit

  * CVE-2017-9074
    - ipv6: Prevent overrun when parsing v6 header options
    - ipv6: Check ip6_find_1stfragopt() return value properly.

  * [Zesty] QDF2400 ARM64 server - NMI watchdog: BUG: soft lockup - CPU#8 stuck
    for 22s! (LP: #1680549)
    - iommu/dma: Stop getting dma_32bit_pfn wrong
    - iommu/dma: Implement PCI allocation optimisation
    - iommu/dma: Convert to address-based allocation
    - iommu/dma: Clean up MSI IOVA allocation
    - iommu/dma: Plumb in the per-CPU IOVA caches
    - iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range

  * Zesty update to 4.10.17 stable release (LP: #1692898)
    - xen: adjust early dom0 p2m handling to xen hypervisor behavior
    - target: Fix compare_and_write_callback handling for non GOOD status
    - target/fileio: Fix zero-length READ and WRITE handling
    - iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement
    - usb: xhci: bInterval quirk for TI TUSB73x0
    - usb: host: xhci: print correct command ring address
    - USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
    - USB: Proper handling of Race Condition when two USB class drivers try to
      call init_usb_class simultaneously
    - USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"
    - staging: vt6656: use off stack for in buffer USB transfers.
    - staging: vt6656: use off stack for out buffer USB transfers.
    - staging: gdm724x: gdm_mux: fix use-after-free on module unload
    - staging: wilc1000: Fix problem with wrong vif index
    - staging: comedi: jr3_pci: fix possible null pointer dereference
    - staging: comedi: jr3_pci: cope with jiffies wraparound
    - usb: misc: add missing continue in switch
    - usb: gadget: legacy gadgets are optional
    - usb: Make sure usb/phy/of gets built-in
    - usb: hub: Fix error loop seen after hub communication errors
    - usb: hub: Do not attempt to autosuspend disconnected devices
    - x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
    - selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug
    - x86, pmem: Fix cache flushing for iovec write < 8 bytes
    - um: Fix PTRACE_POKEUSER on x86_64
    - perf/x86: Fix Broadwell-EP DRAM RAPL events
    - KVM: x86: fix user triggerable warning in kvm_apic_accept_events()
    - KVM: arm/arm64: fix races in kvm_psci_vcpu_on
    - arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses
    - block: fix blk_integrity_register to use templ...

Changed in linux (Ubuntu Zesty):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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