-
Notifications
You must be signed in to change notification settings - Fork 114
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
No Battery Indicator (Steam and KDE Desktop) #21
Comments
Please check my patches at https://github.com/kakra/linux/tree/rebase-4.14/xbox-one-s-controller which bind the controller to hid-microsoft instead of hid-general (xpadneo not included). This works for bluetooth, never tried usb. With the hid-microsoft driver, the battery indicator shows up in the KDE systray in the battery and energy saving category. I didn't have time yet to try your latest xpadneo driver. |
BTW: As with identify rumble, battery indicator in Steam only works with the Steam controller for me, it didn't work with hid-microsoft. But KDE desktop notifications worked for that driver (but Steam controller doesn't show up there). So, in Steam it seems to be implemented differently. Since I had a working desktop notification from KDE, this was no problem. I'm currently integrating your latest hid-xpadneo updates into my kernel patches. |
Strange, since there is no special handling (not even a single line) for any power supply in hid-microsoft. Has to be something generic, maybe it is in another stacked driver.
Ah! Okay I misunderstood that - do you know by any chance which driver is loaded for the Steam gamepad? Thanks! |
I also think this comes from a stacked driver. Do you mean the original Steam controller gamepad? That one with the trackpads? It has no special hid driver, it works as a generic input device. It's totally useless, evtest doesn't see it as an input device, until you load the Steam client. The Steam client then attaches a uinput hid driver running in user space. This is used to map the serveral behaviors onto a controller. You'll then see dynamically created input devices. It can emulate Xbox 360 controllers for games, it can emulate a mouse/trackpad for desktop usage, you can virtually map any button/axis/pointer to the gamepad that you could ever think of. |
It looks like simply "manufacturer" and "model_name" may be missing:
|
Perfect but somehow strange because I still do not see it here (despite thw fact that I am using KDE too) - anyway, will add those missing attributes in the evening. |
The underlying part on the driver-stack was or rather is hid-input itself, which has a builtin generic The problem you observed (empty on half battery) - is because the generic part need some information about what values represents the minimum and which maximum capacity. It tries to evaluate the The good news is: We/I can learn from the hid-input implementation for ours ;) I will not use the builtin (generic) solution since the whole thing is a bit more complicated in our case (battery pack and disposable batteries result in different values, both are influences by the charging cable, and so on) |
@kakra: added, hope it works - I still don't see any peripheral batteries, but that's not a problem related to xpadneo. |
I think you need powerdevil in KDE for it to work. |
Thanks! I will keep it open until I fixed my problem too, or at least as long as I am not totally sure that this is not a problem which is caused by the driver. I have powerdevil installed, but the problem is that it's internal I also would like to rethink some Properties (Online, Present) before closing - missing code documentation is sometimes really a problem in linux kernel code 👎, therefore I am not totally sure if those properties mean what I think they mean. Anyhow - I am glad it works for you 😄 |
The underlying Problem is, that UpdateIt is recognized as
|
@kakra Can you do me a favor and give me the output of the following command on your system |
Here you go:
|
Thanks, but... strange. Can you please give me the following too, please (and sorry) 😄 1 |
Here it is, tho I only have |
Thank you very much, I still don't know exactly why but this helps a lot. The last command was indeed wrong, btw: |
Here you go:
|
BTW: The Steam controller does not show up here. So it has its own means of reporting battery. The Steam client doesn't seem to use standard interfaces here. |
I finally found the underlying problem... The KDE battery notification is based on Powerdevil. In upowerdevice.cpp you can see the following
As you can see, a device is only recognized as a battery if the In your case @kakra the gamepad was registered as an keyboard (type = 6), but in my case it was an gaming-input (type = 12).
Therefore, changing the function above to the following does fix the problem:
You have to recompile the library and replace it in |
I consider closing this issue, the driver is working as expected - the problems are caused by |
Closed, thanks @kakra for your help in finding the problem! |
I'd prefer if Valve would bring this up to Linux standard interfaces... |
Yeah me too :) |
I wonder why Gentoo Linux correctly shows it as battery despite missing such a patch. Maybe because UPower identifies the device as keyboard for me? |
Yep that's why I guess - but the question is why... is your UPower version older than 6 months? They changed it at Version |
I'm still at:
|
automatically add new types like gaming_input, as discussed here: https://forum.kde.org/viewtopic.php?f=204&t=151433&p=395938#p395938 especially necessary for: atar-axis/xpadneo#21 Differential Revision: https://phabricator.kde.org/D11331
The driver is now registering a power_supply for the gamepad (#14) at startup of the device.
You can access it's current state in
/sys/bus/hid/devices/<gamepad>/power_supply/
.Unfortunately the battery is now visible in Steam, we don't know why yet.
@kakra, at #16 you wrote:
Are you talking about bluetooth or usb? Can you explain me how exactly you did that and how I can reproduce that? I will inspect the differences then and may find what steam expects and is missing.
The text was updated successfully, but these errors were encountered: