steamcontroller-linux-kernel icon indicating copy to clipboard operation
steamcontroller-linux-kernel copied to clipboard

Add README

Open johnjelinek opened this issue 9 years ago • 15 comments

Please add a readme with installation and testing instructions.

johnjelinek avatar Jan 21 '16 03:01 johnjelinek

Done: f5e956e

Do you need more details?

cvuchener avatar Jan 21 '16 10:01 cvuchener

This might be good -- I'm going to compile kernel headers and try out the stuff in the README. Thanks

johnjelinek avatar Jan 21 '16 13:01 johnjelinek

Could you add uninstall directions? Also, do you know if this driver can emulate an xbox controller?

johnjelinek avatar Jan 23 '16 04:01 johnjelinek

For uninstalling delete the module in /lib/modules//extra/hid-valve-sc.ko and run depmod. You need to delete the udev rules too if you installed them.

Also, do you know if this driver can emulate an xbox controller?

The driver does not allow remapping and the Steam controller is not a Xbox controller. Well written applications should allow input configuration instead of using xpad mappings, fix it if it is open source or use xboxdrv if you don't have any other choice.

cvuchener avatar Jan 23 '16 09:01 cvuchener

I think a make uninstall that does the uninstall steps you mentioned above would be good :) I'll take at the RetroPie stuff to see if it can support a generic controller.

johnjelinek avatar Feb 07 '16 14:02 johnjelinek

My makefile only pass commands to the kernel makefile and there is no modules_uninstall target. I can add a dkms.conf file, if you want to use dkms for automatic install/update/remove.

RetroPie is based on RetroArch, right? There should not be any issue with non x360 pads, you can create an autoconfig file for the steam controller or configure it from the GUI.

cvuchener avatar Feb 07 '16 17:02 cvuchener

The dkms.conf might be helpful. I'll try to config it from the GUI again.

johnjelinek avatar Feb 07 '16 17:02 johnjelinek

I have just tested RetroArch and there is some problem with the touch pads because the udev driver in RetroArch does not work with analog hats.

To fix that, you can either patch RetroArch, in input/drivers_joypad/udev_joypad.c: Remove or comment

              case ABS_HAT0X:
              case ABS_HAT0Y:
              case ABS_HAT1X:
              case ABS_HAT1Y:
              case ABS_HAT2X:
              case ABS_HAT2Y:
              case ABS_HAT3X:
              case ABS_HAT3Y:
              {
                 code                           -= ABS_HAT0X;
                 pad->hats[code >> 1][code & 1]  = events[i].value;
                 break;
              }

from udev_add_pad and

  /* Skip hats for now. */
  if (i == ABS_HAT0X)
  {
     i = ABS_HAT3Y;
     continue;
  }

from udev_poll_pad

Or change the axes used by my driver, in hid-valve-sc.c replace any occurrence of:

  • ABS_HAT0X
  • ABS_HAT0Y
  • ABS_HAT1X
  • ABS_HAT1Y

by:

  • ABS_Z
  • ABS_RX
  • ABS_RY
  • ABS_RZ

cvuchener avatar Feb 07 '16 18:02 cvuchener

Copy the files to /usr/src/hid-valve-sc-0.1/ and run dkms install hid-valve-sc/0.1

This means the whole repo and contents of running make? Or just the ko/o files?

johnjelinek avatar Feb 08 '16 03:02 johnjelinek

I now see what you mean by the touch pad problem. Does the userland driver not rely on udev? The analog hats work there.

johnjelinek avatar Feb 08 '16 03:02 johnjelinek

I made the suggested changes to your driver. Works great now :)

johnjelinek avatar Feb 08 '16 03:02 johnjelinek

For systems like genesis/snes, this driver works great with your changes mentioned above, but for n64, the mapping is all off. The analog stick is y-inverted.

johnjelinek avatar Feb 13 '16 18:02 johnjelinek

as an aside -- I can't install w/ dkms:

$ sudo dkms install hid-valve-sc/0.1
Error! echo
Your kernel headers for kernel 4.1.13-v7+ cannot be found at
/lib/modules/4.1.13-v7+/build or /lib/modules/4.1.13-v7+/source.

To build manually, I have to:

sudo make -C ~/linux M=$PWD modules_install

I tried making the kernel source path ~/linux in the dkms.conf, but no worky.

johnjelinek avatar Feb 14 '16 02:02 johnjelinek

I got dkms to succeed. Do I still need to copy over the *.rules with a dkms install?

johnjelinek avatar Feb 15 '16 03:02 johnjelinek

Yes, dkms only install the kernel modules.

cvuchener avatar Feb 15 '16 10:02 cvuchener