Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Ps4 controller
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
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Sat Dec 28, 2019 11:41 pm    Post subject: [solved] Ps4 controller Reply with quote

Just got a ps4 controller to get a decent d-pad for stuff like megaman and the like.
I had figured since steam detects the controler it works, nope. It's not creating any /dev/input/js* entries and nothing sees it 'except' steam. And for the life of me i can't figure it out..

dmesg
Code:
[ 5881.041757] usb 1-8: new full-speed USB device number 13 using xhci_hcd
[ 5881.412742] usb 1-8: New USB device found, idVendor=054c, idProduct=09cc, bcdDevice= 1.00
[ 5881.412745] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5881.412747] usb 1-8: Product: Wireless Controller
[ 5881.412749] usb 1-8: Manufacturer: Sony Interactive Entertainment
[ 5881.548818] input: Sony Interactive Entertainment Wireless Controller Touchpad as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-8/1-8:1.3/0003:054C:09CC.000D/input/input25
[ 5881.548981] input: Sony Interactive Entertainment Wireless Controller Motion Sensors as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-8/1-8:1.3/0003:054C:09CC.000D/input/input26
[ 5881.600805] input: Sony Interactive Entertainment Wireless Controller as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-8/1-8:1.3/0003:054C:09CC.000D/input/input24
[ 5881.600952] sony 0003:054C:09CC.000D: input,hidraw1: USB HID v81.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-0000:02:00.0-8/input3

I have the module built in.


Last edited by truekaiser on Sun Dec 29, 2019 5:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Dec 29, 2019 12:01 am    Post subject: Reply with quote

Per that output you should have /dev/input/input{24,25,26} files?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Sun Dec 29, 2019 12:05 am    Post subject: Reply with quote

I've got the module builtin as well, and the above looks about the same as for mine when plugged through USB, and gives me a /dev/input/js0 along with the input/event* device. If there's a problem at this point I would assume it's whatever is supposed to be creating the device (personally using eudev, but udev should work too, unless there's some bad rules).

Edit: or wait, maybe missing the joystick device support? like CONFIG_INPUT_JOYDEV=y (please go over the wiki entry if not already, joystick+event interface notably)
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Sun Dec 29, 2019 12:27 am    Post subject: Reply with quote

Ant P. wrote:
Per that output you should have /dev/input/input{24,25,26} files?


nope..
Code:
slatepaws /usr/src/linux #  cd /dev/input/
slatepaws /dev/input # ls
by-id  by-path  event0  event1  event10  event11  event2  event3  event4  event5  event6  event7  event8  event9  js0 mice  mouse0
slatepaws /dev/input #

the js0 is a xbox360 controller but it's dpad sucks.

lonen wrote:
I've got the module builtin as well, and the above looks about the same as for mine when plugged through USB, and gives me a /dev/input/js0 along with the input/event* device. If there's a problem at this point I would assume it's whatever is supposed to be creating the device (personally using eudev, but udev should work too, unless there's some bad rules).

Edit: or wait, maybe missing the joystick device support? like CONFIG_INPUT_JOYDEV=y (please go over the wiki entry if not already)


No i have that.
Code:
Symbol: INPUT_JOYDEV [=y]                                                                                                                                                                                                      │ 
  │ Type  : tristate                                                                                                                                                                                                               │ 
  │ Prompt: Joystick interface                                                                                                                                                                                                     │ 
  │   Location:                                                                                                                                                                                                                    │ 
  │     -> Device Drivers                                                                                                                                                                                                          │ 
  │       -> Input device support                                                                                                                                                                                                  │ 
  │ (1)     -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])                                                                                                                                                  │ 
  │   Defined at drivers/input/Kconfig:140                                                                                                                                                                                         │ 
  │   Depends on: !UML && INPUT [=y]                                                                                                                                                                                               │ 
  │                                                     


these are my eudev rules

steam controller
Code:
# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"


joystick-perm.rules
Code:
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="028e", MODE="0666"
KERNEL=="event[0-20]*", ENV{ID_BUS}=="?*", ENV{ID_INPUT_JOYSTICK}=="?*", MODE="0644"


Could it be a new revision? The one that needs 4.5? the model is cuh-zct2u.
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Sun Dec 29, 2019 3:23 am    Post subject: Reply with quote

truekaiser wrote:
Ant P. wrote:
Per that output you should have /dev/input/input{24,25,26} files?


nope..
Code:
slatepaws /usr/src/linux #  cd /dev/input/
slatepaws /dev/input # ls
by-id  by-path  event0  event1  event10  event11  event2  event3  event4  event5  event6  event7  event8  event9  js0 mice  mouse0
slatepaws /dev/input #

the js0 is a xbox360 controller but it's dpad sucks.

lonen wrote:
I've got the module builtin as well, and the above looks about the same as for mine when plugged through USB, and gives me a /dev/input/js0 along with the input/event* device. If there's a problem at this point I would assume it's whatever is supposed to be creating the device (personally using eudev, but udev should work too, unless there's some bad rules).

Edit: or wait, maybe missing the joystick device support? like CONFIG_INPUT_JOYDEV=y (please go over the wiki entry if not already)


No i have that.
Code:
Symbol: INPUT_JOYDEV [=y]                                                                                                                                                                                                      │ 
  │ Type  : tristate                                                                                                                                                                                                               │ 
  │ Prompt: Joystick interface                                                                                                                                                                                                     │ 
  │   Location:                                                                                                                                                                                                                    │ 
  │     -> Device Drivers                                                                                                                                                                                                          │ 
  │       -> Input device support                                                                                                                                                                                                  │ 
  │ (1)     -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])                                                                                                                                                  │ 
  │   Defined at drivers/input/Kconfig:140                                                                                                                                                                                         │ 
  │   Depends on: !UML && INPUT [=y]                                                                                                                                                                                               │ 
  │                                                     


these are my eudev rules

steam controller
Code:
# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", TAG+="udev-acl"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"


joystick-perm.rules
Code:
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="028e", MODE="0666"
KERNEL=="event[0-20]*", ENV{ID_BUS}=="?*", ENV{ID_INPUT_JOYSTICK}=="?*", MODE="0644"


Could it be a new revision? The one that needs 4.5? the model is cuh-zct2u.


derp on the kernel now looking at it. It 'kinda' works via bluetooth. Picked up as a generic wireless game pad by some games (20xx) steam thinks it's an xbox-360 controller. the one streamed game i tried didn't pick it up. would prefer wired..
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sun Dec 29, 2019 5:54 am    Post subject: Reply with quote

truekaiser

the ps4 controller has been picked up as a xbox controller in steam games as far as i have understand it but this is something they are working on.
at first in shadows of the tomb raider my ps4 controller was picked up as xbox controller but now it is picked up as ps4 controller.

regards hedmo
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Sun Dec 29, 2019 5:09 pm    Post subject: Reply with quote

I somehow fixed it??

I was coming through logs, steam's said it couldn't access /dev/uinput.
Searching that i found the page of 'ds4drv' the Userspace driver before the kernel driver added support. Found their Udev rules.
Code:
KERNEL=="uinput", MODE="0666"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:05C4.*", MODE="0666"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:09CC.*", MODE="0666"

Slapped that into a udev rule, reloaded, plugged the controller back in, boom it worked. Steam presents it as an xbox360 to games, internally it sees it properly. What matters is now i have a proper gd d-pad, and not the excuses that call themselves one on the xbox controller, switch, OR any third party generics!
Essential for action platformers like mega man and similar.
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