Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Steam, libinput and PS4 controller not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
superjaded
l33t
l33t


Joined: 05 Jul 2002
Posts: 802

PostPosted: Tue Jun 12, 2018 1:08 am    Post subject: [Solved] Steam, libinput and PS4 controller not working Reply with quote

Not real sure what the status is on PS4 controllers in Steam.

As far as I can tell the controller is recognized generally. I'm using KDE, so I can plug in the PS4 controller and then go to the Joystick KCM and see the PS4 controller (/dev/input/js0). It also has a display where it shows what button / stick is used, and it seems to react the way you'd expect. However, Steam doesn't seem to recognize the gamepad at all. I think the only two games I've tried are Soda Girls and Wizard of Legend, and the gamepad doesn't work in either game. I've also tried going to Steam's Settings -> Controllers -> General Controller Settings and no controllers are detected.

I'm presently running Steam via flatpak (nstalled from this overlay) if that matters. Pretty much everything from that perspective is the default except for the fact I did an rbind mount in order to make my array available to steam:

Code:
/mnt/bigdata/gentoo_data/games -> /home/chris/.var/app/com.valvesoftware.Steam/Desktop/remote


Not really sure if there was any info worth pasting. Here is my kernel .config and emerge --info in case it helps.

Anyone had similar issues and resolved them?


Last edited by superjaded on Thu Jun 14, 2018 4:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Tue Jun 12, 2018 5:55 am    Post subject: Reply with quote

Go steam ->settings ->controller -> general controller settings -> enable PS4 controller ( it doesnt need need to be detected just check that)
Some games dont see controller in linux (At least I saw in Bioshock Infinite game didnt see it at all)

I've just read that u were in that menu -> if u were in that menu and enabled - switch to Big Picture Mode and see if its working. Ofc connect controller via usb first and press playstation button.
I have only joysticks menu enabled in kernel, nothign more.
_________________
Sent from Windows
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Jun 13, 2018 12:23 am    Post subject: Reply with quote

Is the controller's /dev/input/js* readable by your user?

You might need something like this in /etc/udev/rules.d/:
Code:
ENV{ID_INPUT_JOYSTICK}=="1", GROUP="plugdev", MODE="0660"


Once that's fixed, you'll have another problem...
Back to top
View user's profile Send private message
superjaded
l33t
l33t


Joined: 05 Jul 2002
Posts: 802

PostPosted: Wed Jun 13, 2018 7:53 pm    Post subject: Reply with quote

@mir3x: Forgot to mention I enabled that already.

@Ant: Readable? Yes. I haven't made any changes to my udev config of which to speak, but the default permissions were 664 (ie; readable by everyone).

I also noticed js0 is writable by the "input" group. I added my user account to that group and restarted. Same behavior.

Doing some more searches, I'm starting to wonder if gamepads are actually supported within the flatpak method. Not finding many relevant results in general. I wanted to stick with the flatpak method to limit the amount of 32bit stuff in my general system, but I'll try installing Steam to my system briefly to see if I have any better luck with it.

Thanks for the input.

EDIT: No dice with installing it in the main system. The investigation continues!
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Thu Jun 14, 2018 11:24 am    Post subject: Reply with quote

To help u find issue, there is my dmesg after conencting controller:
Code:
[  715.263363] usb 1-4: new full-speed USB device number 4 using xhci_hcd
[  715.566747] usb 1-4: New USB device found, idVendor=054c, idProduct=05c4
[  715.566751] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  715.566753] usb 1-4: Product: Wireless Controller
[  715.566754] usb 1-4: Manufacturer: Sony Computer Entertainment
[  715.590522] input: Sony Computer Entertainment Wireless Controller Touchpad as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4:1.0/0003:054C:05C4.0007/input/input14
[  715.590608] input: Sony Computer Entertainment Wireless Controller Motion Sensors as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4:1.0/0003:054C:05C4.0007/input/input15
[  715.642121] input: Sony Computer Entertainment Wireless Controller as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4:1.0/0003:054C:05C4.0007/input/input13
[  715.642258] sony 0003:054C:05C4.0007: input,hidraw4: USB HID v81.11 Gamepad [Sony Computer Entertainment Wireless Controller] on usb-0000:01:00.0-4/input0


Steam says it after connecting ( and disconnecting at end):
Code:

Local Device Found
  type: 054c 05c4
  path: 0001:0005:00
  serial_number:  - 0
  Manufacturer: Sony Computer Entertainment
  Product:      Wireless Controller
  Release:      100
  Interface:    0

!! Steam controller device opened for index 0.
Steam Controller reserving XInput slot 0
Controller 0 connected, configuring it now...
Installing breakpad exception handler for appid(steam)/version(1528497815)
Opted-in Controller Mask: 31
DS4 Controller calibration:
  Sensor 0: bias 28, sensitivity 1,9162  Sensor 1: bias -2, sensitivity 1,9414  Sensor 2: bias -6, sensitivity 1,9503  Sensor 3: bias -64, sensitivity 1,9638  Sensor 4: bias 103, sensitivity 2,0004  Sensor 5: bias 165, sensitivity 2,0338
Generating new string page texture 151: 384x256, total string texture memory is 8,51 MB
!! Controller 0 attributes:
  Type: 34
  ProductID: 1476
  Serial: 401b5f365d3a
  Capabilities: 00035bff
  Firmware Version: 0
  Firmware Build Time: 2147483647 (wto, 19 sty 2038 03:14:07 GMT)
  Bootloader Build Time: 2147483647 (wto, 19 sty 2038 03:14:07 GMT)
Loaded Config for Local Selection Path for App ID 413090: /home/mirex/.local/share/Steam/steamapps/workshop/content/241100/1186435726/851604638009836982_legacy.bin
[413090]Non-Steam Controller Configs Enabled: 1
Loaded Config for Local Selection Path for App ID 413090: /home/mirex/.local/share/Steam/steamapps/workshop/content/241100/1186435726/851604638009836982_legacy.bin
Opted-in Controller Mask: 31
Loaded Config for Local Selection Path for App ID 413080: /home/mirex/.local/share/Steam/steamapps/workshop/content/241100/922639654/818937737353561140_legacy.bin
[413080]Non-Steam Controller Configs Enabled: 1
Couldn't initialize virtual gamepad: Couldn't open /dev/uinput for writing
!! Controller 0 attributes:
  Type: 34
  ProductID: 1476
  Serial: 401b5f365d3a
  Capabilities: 00035bff
  Firmware Version: 0
  Firmware Build Time: 2147483647 (wto, 19 sty 2038 03:14:07 GMT)
  Bootloader Build Time: 2147483647 (wto, 19 sty 2038 03:14:07 GMT)
OnFocusWindowChanged to window type: k_nGameIDControllerConfigs_Desktop, AppID 413080
Loaded Config for Local Selection Path for App ID 413080: /home/mirex/.local/share/Steam/steamapps/workshop/content/241100/922639654/818937737353561140_legacy.bin
Couldn't initialize virtual gamepad: Couldn't open /dev/uinput for writing
Couldn't initialize virtual gamepad: Couldn't open /dev/uinput for writing

..... .....
Controller device closed after hid_read failure
Controller 0 disconnected



/etc/X11/xorg.conf.d/40-libinput.conf is default one, in comment its written:
# Match on all types of devices but joysticks
There is no joysticks, 5 default entries.

Maybe you need to be in plugdev group or some other one...
_________________
Sent from Windows
Back to top
View user's profile Send private message
superjaded
l33t
l33t


Joined: 05 Jul 2002
Posts: 802

PostPosted: Thu Jun 14, 2018 4:34 pm    Post subject: Reply with quote

Guess I should have done that when Ant suggested it! Added myself to plugdev, restarted and now Steam sees my PS4 controller. I could also play a game with it. Awesome!

I'm still not clear on what the specific issue was. After confirming plugdev worked, I removed myself from the group to see what the Steam output was. I get the same error about writing to /dev/uinput that you saw, but the file doesn't actually exist which seems to be the bigger problem so it may not even be relevant to the issue. Additionally, I could still use the PS4 controller while not in plugdev. Maybe it just needs plugdev for device detection.

This is at least in the copy of steam installed in my main system. I might try the flatpak again to see if it will work that way, and then I can uninstall the 32bit libs from my system. ;)

Thanks for the help!
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Thu Jun 14, 2018 5:21 pm    Post subject: Reply with quote

Have fun.

Remember that you can play with controller in games which doesnt support controller. In Big picture mode u can press PS during game then go to settings and load some custom/users configs - or do it before starting game in Big Picture. Maybe in normal mode too, but not sure how to do that there.
_________________
Sent from Windows
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Jun 15, 2018 2:40 am    Post subject: Reply with quote

/dev/uinput is used for Steam's "fake an xbox360 pad or other device so that lazy console/win9x ports work" feature, AFAIK. If your games work without it, congrats! You don't need it.

And yeah, the PS4 controller is a bit harder to set up than most - it creates at least half a dozen /dev/ entries, so simply having correct-looking perms on one isn't enough.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum