Bug 1402652 - Battery not working since Fedora 24 on Dell Inspiron 7537
Summary: Battery not working since Fedora 24 on Dell Inspiron 7537
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-08 04:06 UTC by Dominik Gronkiewicz
Modified: 2019-01-09 12:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-08 16:27:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik Gronkiewicz 2016-12-08 04:06:05 UTC
Hello,

I filed this bug before for Fedora 24 about half year ago, however now on Fedora 25 it is still not fixed, therefore I am opening a new ticket.

The battery is not present after booting the system. The log says:
[root@dell9 ~]# dmesg | grep batt
[ 1.248629] ACPI: Battery Slot [BAT0] (battery absent)

However, any battery event (such as plugging or unplugging the charger) makes the battery indicator show up again. It is a very frustrating, since you need to have a charger and a socket to check the battery status.

The reason, known for a long time, is Linux kernel returning _REV value of 2 instead of 5 expected by Dell BIOS. Changing this value sometime before the 4.6 kernel caused the regression. Adding "acpi_osi=Linux acpi_rev_override" to kernel parameters fixes the issue, however acpi_rev_override is disabled by default in Fedora for unknown reasons.

I wrote about this issue on Dell Linux lists, however I got no response. I guess Dell ACPI is not going anywhere.

The temporary solution that was proposed to me was to recompile my own kernel with CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y. However, It is unnaceptable as a permanent solution. I don't see myself going through the hell of recompiling the kernel after each update for the next few years, particularly if an easy solution exists.

Please re-enable the CONFIG_ACPI_REV_OVERRIDE_POSSIBLE in the kernel until the code of Dell ACPI is updated. Dell 7000 series is a very popular platform and one of very few on the market shipped with Linux - thus I guess it deserves some attention.

Thank you in advance,
Dominik

Comment 1 Laura Abbott 2016-12-08 16:27:39 UTC
Our position hasn't changed. CONFIG_ACPI_REV_OVERRIDE_POSSIBLE has the potential to cause more problems than it solves. Overriding the REV changes how all tables are interpreted, not the one for the battery. We don't plan on turning it on.

Comment 2 Dominik Gronkiewicz 2016-12-08 17:20:47 UTC
What problems can it cause? The flag only allows user to override the ACPI _REV, does not set it by default. I can see no harm it will cause for an user who doesn't turn it on. It is extremely unfair that first someone "fixed" the kernel by changing the _REV value, breaking a perfectly working system, and now you don't provide any way to fix this. Enabling this flag WILL NOT BREAK ANY SINGLE MACHINE. Disabling it breaks all Dell Inspiron 7xxx machines, which come shipped with Linux, therefore are a popular choice among Linux users.

If you don't plan to enable this flag, please provide an another solution to make my laptop work. (Compiling my kernel every two weeks is ridiculous and is obviously not an acceptable solution.) To be honest, I feel extremely sorry and dissapointed with Fedora community right now.

Dominik.

Comment 3 Dominik Gronkiewicz 2016-12-17 20:39:36 UTC
To anyone affected by this problem, here is how to deal with this issue in Fedora 25:

To exclude kernel from the repositories, edit the .repo files
gedit admin:///etc/yum.repos.d/fedora{,-updates}.repo

Append following at the end of each of three sections in both files:
exclude=kernel* perf python-perf

Note that the above change will crash PackageKit while trying to fetch updates in Fedora 24. After moving to 25, everything works for me.

Now you can either trust me and add the kernel repository I am using for my laptop (Dell 7537)

https://copr.fedorainfracloud.org/coprs/gronki/kernel-dell7537/

or build the kernel using this easy tutorial: https://fedoramagazine.org/building-fedora-kernel/
The only edit you need to do for battery slot to work is to append this line:
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
to config-local file. 

You can also follow the "standard" way using rpmdev tools only, but using fedpkg is way easier. Also, when using rpmbuild alone, you have to add your flags everytime you want to build a new version (the old source gets wiped out), while using fedpkg makes it as easy as merging changes from the upstream git branch (origin/f25) into your local branch.

Building kernel takes a lot of time and requires plenty of resources so you might want to do it overnight or do it on some other machine that won't burn your knees. (Copr is super convenient for this purpose.)

After installing the custom kernel, you need to add following kernel boot parameters to /etc/default/grub: 
acpi_osi=Linux acpi_rev_override

Hope this gets indexed by google so that others can find this solution. I got very frustrated using rpmbuild, but using fedpkg and copr is so convenient I can live with the custom kernel. :)


Note You need to log in before you can comment on or make changes to this bug.