-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surface Pro 2017 / Book 2 / Laptop: Battery Status Not Working #28
Comments
@geoffholden Can you give me the output of this: $ ls /sys/bus/acpi/devices |
Oh I have the same (or similar) issue with the battery status not showing/working on the Pro 2017, was actually thinking about making an issue for it after my wifi/network issue was resolved(which it is), then found that there already was one so. |
@jakeday as requested:
|
The Surface Pro 2017 and Surface Book 2 both share the same MSHW0040 to read battery stats. I'll have to brush up on my DSDT to fix this unless someone is kind enough to help. |
I am keen to get this working (I have a SP2017) but am new to DSDT. So far I've dumped and decompiled the DSDT DSL block. Any pointers would be appreciated. |
Is there anything the average Linux user can do to help solving this issue? I'm not familiar with DSDT, but I am anxious to get this solved. |
Likewise, here. |
Same issue here, but on Surface Laptop |
I guess this one is helpful. |
I believe I have this same issue. I am running a flavor of ubuntu called Pop!_OS and I cannot get my battery to register. |
Based on the dmesg output from my Surface Laptop, this patch may be worth looking into: |
@nish-astuff That is part of a patchset that delays the _STA checks until dependencies are met. However, that's not our issue here. We need the _SAN device further exposed and to handle the RQST calls to _SAN from the other devices (such as BAT1 and BAT2). |
@jakeday Thank you for the explanations. I am sure you have noticed this guide from ubuntu help: |
I believe this is the same problem discussed in this thread https://bugzilla.kernel.org/show_bug.cgi?id=198145 |
Do you have any repos so I can just update my machine and it will be pushed to my surface? Or do I need to reinstall the kernel everytime there is an update? Thanks, |
ok, so one that is definitely needed is CONFIG_SERIAL_8250_DW , I also added a few others including CONFIG_DMA_ENGINE=y and CONFIG_DMA_ACPI=y that seems likely to be related but I haven't tested in isolation, the full diff of config changes I made to now have a displaying battery monitor is uploaded to https://download.sumptuouscapital.com/tmp/linux-surface/diff.txt now to figure out if it works correctly, as it doesn't seem to be updating regularly, but at least https://download.sumptuouscapital.com/tmp/linux-surface/Screenshot%20from%202018-12-03%2018-30-11.png is quite a bit better than earlier today :) And now also; |
@krifisk Thanks for the diff! The battery estimations fluctuate quite a bit, at least for me. They should also update from time to time, I can't say much to the regularity of this though. The EC does send some update events (or at least I'm interpreting them as such), which, as far as I can tell, don't seem to be regular (I'd say their frequency is power draw related, but I haven't really tested that theory). Also I'm currently using UPower as frontend, which polls the status, so there might be differences. |
yes, it fluctuates quite a bit, and indeed it does update, just on infrequent intervals, e.g it updates if detaching / attaching tablet, otherwise it seems to be about every 2-3 minutes or so, so I'll live with that as long as I know it works :) Again, thanks for your work on this. |
Yeah, detaching the tablet causes the EC to send a power state event that also updates the internal battery, so I think that should be the correct behavior.
No problem. To be honest, I'm mostly doing this for myself, and if I can help others while I'm at it, why not :-) |
@qzed: Thanks for your hard work on this. Could you be so kind to release a recent prebuilt kernel? I am still struggling with compiling a working kernel for my Surface Book 2. I either get battery status or buttons working, but never both :-( |
@thmichel The latest I can give you is 4.18.20 (the IPTS patch isn't ready for 4.19.y). There shouldn't be much of a difference to the 4.18.16 kernel currently available, but I can have a look at it this evening. |
I've just renamed the module to better reflect its purpose (as this has somewhat shifted over time). In case you have the module installed with dkms, this means you should uninstall the module with |
I haven’t been active on this for a while due to other commitments but I'd like to wade in on the bounty discussion that @remingtonlang brought up earlier this month. First of all, I’d like to point out that the bounty was specifically created for the battery issue because there were many people that desperately needed that feature, including myself. @jakeday jumped in on this issue but his contributions went down the wrong path and he dropped out of the mix early. My contributions were basically a bunch of raw data and some hints as to the direction we needed to move in. @qzed picked up the ball and ran with it, pulling in the open source community and turning it into a ball game. @bpasteur and @Fireobridy had some contributions as well but I’d have to award the MVP to @qzed. If not for his efforts, we would not have battery (and a bunch of other functionality that came with it) today. While I can’t speak for @bpasteur and @Fireobridy I feel that @qzed should claim that bounty, consider it a Christmas present and a thank you from all of us that already got what we wanted, battery status. |
Good call @carrylook, I totally agree and would like to add that it's a small reward for all of the time and effort that @qzed has already put in and continues to put into this project... and I have a feeling that the rest of the community monitoring this will agree as well. Thank You!!! |
As the original poster of the bounty, I concur with what @carrylook has said as well. It has definitely been a team effort, but @qzed looks to be MVP. Nothing wrong with taking it! As I said in the original bounty post, if you really don't need it then I think it should still be released to you for a charity of your choice. |
Hi, I downloaded and installed all deb files from https://github.com/qzed/linux-surface/releases/tag/v4.18.20-pre1/, and it looks like I'm running 4.18.20, but my battery is still not detected. Are there any additional commands I have to execute besides installing the deb files..? |
I hope so too! But it'll be a long way until then. There are currently three bugs in the kernel blocking this, and it may take a while to get this sorted out properly (the fixes in the module repo are just quick-fixes). I'll start working on that once the module is integrated here. |
Hi , first thank you so much for so gut job ! Thank you ! |
Sorry for not updating in awhile, I had some personal stuff that kept me from it. My vote is 100% the bounty should go to @qzed |
This has been merged in and is now working. |
Not working here despite compiling kernel from |
As you've all decided, I have now claimed the bounty. Thank you all! I really appreciate it! (Also I again want to empathize without your support I would not have been able to fix it!) |
Hi, just to
Just for clarity, these updates are merged into the latest kernel just released(like 8mins ago)? Eagerly awaiting the acpi-module update. Much thanks to you an all contributors for the work on this. |
@lynscott yes, they are merged into the latest prebuilt! |
The new 2017 version of the Surface Pro has no battery status.
I don't know of any working kernel for this issue.
I suspect this is an ACPI issue, as I have the following lines in my kernel messages:
The text was updated successfully, but these errors were encountered: