← Back to team overview

kernel-packages team mailing list archive

[Bug 1326725] Re: PS3 Sixaxis controller/joystick usb stopped working, regression in linux-image-extra-3.13.0-27-generic

 

I did a manual bisect of the ubuntu trusty kernel tree and the last
"good" (controller working) commit is:

commit 73ffcac5867519fa4b6a54e734ded0fed5b403cc
Author: Jiri Kosina

    HID: hidraw: make comment more accurate and nicer


The first sure "bad" (controller not working) commit I found is:

commit 6d8e891822be26ed5f376287d7c7c5988f4fe425:
Author: Frank Praznik

    HID: Add transport-driver callbacks to the hid_ll_driver struct


Between those two commits there are three more commits.
I could not test by cheking out these three commits one by one because the kernel failed to build.
Here they are:

commit c96bd945d3061dc77b640ceead6f4151983432cf
Author: Benjamin Tissoires

    HID: add inliners for ll_driver transport-layer callbacks

commit b0eff3d87fabad16aad6640703f1e5b6ff6108af
Author: Benjamin Tissoires

    HID: i2c-hid: implement ll_driver transport-layer callbacks

commit aa6c390c4d59c9ff4fffd887e15783b2b793951b
Author: Benjamin Tissoires

    HID: remove hid_get_raw_report in struct hid_device

I then tried to revert these commits in order:
c96bd945d3061dc77b640ceead6f4151983432cf
b0eff3d87fabad16aad6640703f1e5b6ff6108af
aa6c390c4d59c9ff4fffd887e15783b2b793951b

And, after rebuilding the kernel, the controller worked again.

The problem is that those commits (among many others) were pushed to fix http://bugs.launchpad.net/bugs/1305522
By doing so many heavy changes to hid were made.
This broke the hid-sony kernel driver.

After further research I found that the same author of those commits (Benjamin Tissoires) submitted a patch that supposedly fixed the issue:
https://lkml.org/lkml/2014/3/8/270

So I tried to backport that patch.

To make my life easier I fetched the latest version of these files directly from https://github.com/torvalds/linux
drivers/hid/hid-sony.c
drivers/hid/hidraw.c
drivers/hid/usbhid/hid-core.c

And added only a couple of lines to these files:
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
include/linux/hid.h

Recompiled and it worked.
I tested both dualshock 3 and dualshock 4 via usb. Both working.

If anyone would like to test it:
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-trusty.git ubuntu-trusty
cp ps3-1326725.diff ubuntu-trusty
cd ubuntu-trusty
git apply ps3-1326725.diff
and recompile the kernel.

I added the patch as an attachment.

Whether to apply/rewrite/properly backport a patch like this or to revert the commits is ubuntu kernel team's choice now.
I Hope this is useful.

Please don't make me recompile the kernel another 20+ times. :)

** Patch added: "ps3-1326725.diff"
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1326725/+attachment/4154382/+files/ps3-1326725.diff

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1326725

Title:
  PS3 Sixaxis controller/joystick usb stopped working, regression in
  linux-image-extra-3.13.0-27-generic

Status in “linux” package in Ubuntu:
  Confirmed

Bug description:
  After applying upgrades to my 14.04 installations and rebooting,
  suddenly the sony sixaxis usb joystick/controller input device which I
  use a lot will now no longer appear as a joystick device.  It happens
  on at least two machines with the newest 14.04 updates as of a couple
  of days ago.  See below for kernel messages.

  I believe the actual kernel error message for this bug is:

  "Jun  5 11:36:51 machine kernel: [47062.524566] sony
  0003:054C:0268.000E: can't set operational mode"

  After looking at the kernel sources I believe this is a problem with
  the hid_sony kernel module.  The changelog for linux-image-
  extra-3.13.0-27-generic, which contains this module, has many hid
  related changes.

  The same bug/regression, it appears, was reported on askubuntu.com
  some days ago, see this link:

  http://askubuntu.com/questions/474199/my-ps3-controller-stopped-
  working-2-days-ago

  Version information:

  $ lsb_release -d
  Description:    Ubuntu 14.04 LTS
  $ uname -a
  Linux valley 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  # dpkg -S /lib/modules/3.13.0-27-generic/kernel/drivers/hid/hid-sony.ko
  linux-image-extra-3.13.0-27-generic: /lib/modules/3.13.0-27-generic/kernel/drivers/hid/hid-sony.ko

  dmesg:

  Jun  5 11:36:50 machine kernel: [47062.360175] usb 2-1.1.3.1: new full-speed USB device number 19 using ehci-pci
  Jun  5 11:36:51 machine kernel: [47062.486789] usb 2-1.1.3.1: New USB device found, idVendor=054c, idProduct=0268
  Jun  5 11:36:51 machine kernel: [47062.486797] usb 2-1.1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
  Jun  5 11:36:51 machine kernel: [47062.486802] usb 2-1.1.3.1: Product: PLAYSTATION(R)3 Controller
  Jun  5 11:36:51 machine kernel: [47062.486806] usb 2-1.1.3.1: Manufacturer: Sony
  Jun  5 11:36:51 machine kernel: [47062.498624] sony 0003:054C:0268.000E: Fixing up Sony Sixaxis report descriptor
  Jun  5 11:36:51 machine kernel: [47062.524383] input: Sony PLAYSTATION(R)3 Controller as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.3/2-1.1.3.1/2-1.1.3.1:1.0/input/input22
  Jun  5 11:36:51 machine kernel: [47062.524563] sony 0003:054C:0268.000E: input,hiddev0,hidraw4: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-0000:00:1d.0-1.1.3.1/input0
  Jun  5 11:36:51 machine kernel: [47062.524566] sony 0003:054C:0268.000E: can't set operational mode
  Jun  5 11:36:51 machine kernel: [47062.556374] sony: probe of 0003:054C:0268.000E failed with error -38
  Jun  5 11:36:51 machine mtp-probe: checking bus 2, device 19: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.3/2-1.1.3.1"
  Jun  5 11:36:51 machine mtp-probe: bus: 2, device: 19 was not an MTP device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1326725/+subscriptions


References