Linux-Magic-Trackpad-2-Driver icon indicating copy to clipboard operation
Linux-Magic-Trackpad-2-Driver copied to clipboard

How to get the battery state?

Open schmunk42 opened this issue 6 years ago • 2 comments

My problem is that I currently need to have my touchpad almost always connected via USB to have it working. I suppose this is due a low battery state, but I am not sure since I can't see the loading percentage at the moment.

I found only https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver/issues/19 when looking for "battery", do you have any advice how to get the actual battery level?

schmunk42 avatar Feb 08 '19 08:02 schmunk42

https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver/issues/19#issuecomment-409420052 describes it pretty well. You have to do it manually, as it's not implemented in the driver yet.

dos1 avatar Feb 21 '19 23:02 dos1

I also would like to have any way to know the battery state of my magic trackpad 2 on linux. Even if it means being able to check only when it is connected to a wire, that would still be a big improvement. As things stand now, we have no way to tell really.

[edit- OT] Thank you for making the trackpad work, it's fantastic.

aleksfadini avatar Mar 11 '21 02:03 aleksfadini

For anyone stumbling over this. In Gnome you can check the power state of devices under Settings > Power > Devices without having to install or configure anything nowadays:

image

As the README states the driver was merged in 2018.

Therefore I think that this issue can be closed. :wink:

alexanderadam avatar Aug 10 '23 16:08 alexanderadam

@alexanderadam is right, that modifications should be made in the official linux kernel if necessary. Thank you

mwyborski avatar Aug 10 '23 18:08 mwyborski

@mwyborski I think that you can close this issue here, too, right?

alexanderadam avatar Aug 10 '23 18:08 alexanderadam

For future reference, battery level reporting (USB only) was added in https://github.com/torvalds/linux/commit/0b91b4e4dae63cd43871fc2012370b86ee588f91. It also works for me on KDE Plasma, so this issue could indeed be closed.

NicoWeio avatar Aug 14 '23 13:08 NicoWeio