Wednesday, 20 September 2017

Bluetooth on Fedora: joypads and (more) security

It's been a while since I posted about Fedora specific Bluetooth enhancements, and even longer that I posted about PlayStation controllers support.

Let's start with the nice feature.

Dual-Shock 3 and 4 support

We've had support for Dual-Shock 3 (aka Sixaxis, aka PlayStation 3 controllers) for a long while, but I've added a long-standing patchset to the Fedora packages that changes the way devices are setup.

The old way was: plug in your joypad via USB, disconnect it, and press the "P" button on the pad. At this point, and since GNOME 3.12, you would have needed the Bluetooth Settings panel opened for a question to pop up about whether the joypad can connect.

This is broken in a number of ways. If you were trying to just charge the joypad, then it would forget its original "console" and you would need to plug it in again. If you didn't have the Bluetooth panel opened when trying to use it wirelessly, then it just wouldn't have worked.

Set up is now simpler. Open the Bluetooth panel, plug in your device, and answer the question. You just want to charge it? Dismiss the query, or simply don't open the Bluetooth panel, it'll work dandily and won't overwrite the joypad's settings.


And finally, we also made sure that it works with PlayStation 4 controllers.



Note that the PlayStation 4 controller has a button combination that allows it to be visible and pairable, except that if the device trying to connect with it doesn't behave in a particular way (probably the same way the 25€ RRP USB adapter does), it just wouldn't work. And it didn't work for me on a number of different devices.

Cable pairing for the win!

And the boring stuff

Hey, do you know what happened last week? There was a security problem in a package that I glance at sideways sometimes! Yes. Again.

A good way to minimise the problems caused by problems like this one is to lock the program down. In much the same way that you'd want to restrict thumbnailers, or even end-user applications, we can forbid certain functionality from being available when launched via systemd.

We've finally done this in recent fprintd and iio-sensor-proxy upstream releases, as well as for bluez in Fedora Rawhide. If testing goes well, we will integrate this in Fedora 27.

6 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Wow! I didn't know that I could use the PS3 Controller so easily with Fedora 26! That's great!
But there is a serious flaw: Somehow the Gnome Desktop recognizes the position sensors in the Controller as if I would have a tablet! So when I turn the controller, my desktop rotates! I guess that I can disable rotation altogether, but that shouldn't be necessary.
Thank you for this post/feature!

EDIT: On a sidenote, as this is gaming related: Do you know what the status of GNOME Games for Fedora is? Will this be available at some point? I am running Retroarch right now, but I would prefer nice native GTK software :)

Bastien Nocera said...

> But there is a serious flaw: Somehow the Gnome Desktop recognizes the position sensors in the Controller as if I would have a tablet!

That's fixed in iio-sensor-proxy:
https://github.com/hadess/iio-sensor-proxy/commit/401d59e54b3123860180d4401e09df8a1e1bc6c3
and just needs a release.

> Do you know what the status of GNOME Games for Fedora is?

The recommendation is to use the Flatpak for GNOME Games.

Jared said...

I think it is odd that the dialogs have the options to either "Dismiss" or "Allow". Isn't the opposite of "Allow" to "Deny"? I can "Dismiss" the dialog, but that doesn't really tell me what choice I'm making.

djb said...

^ Also, it seems weird to me that the cancel action has the destructive-action style class, when all it does is to continue *not* doing something, which isn't an action. I'd expect to see that class on Delete buttons and whatnot, but not cancel type ones. The HIG is brief but seems to agree on this point.

Bastien Nocera said...

File bugs if you have concerns about them. The buttons match the mockups which were made by the same person that wrote the HIG, and we already implemented in gnome-bluetooth's code base for 4 years. So not anything new there :)