Bug 239350 - Regression in support for Logitec dual action gamepad
Summary: Regression in support for Logitec dual action gamepad
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 12.0-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-20 20:26 UTC by Jason W. Bacon
Modified: 2019-09-02 01:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2019-07-20 20:26:12 UTC
I've been using this gamepad with numerous FreeBSD versions for years and at some point in the past year it stopped working.  It's seen but then immediately disconnects:

Jul 20 15:09:21 coral kernel: ugen0.2: <Logitech Logitech Dual Action> at usbus0
Jul 20 15:09:21 coral kernel: uhid1 on uhub2
Jul 20 15:09:21 coral kernel: uhid1: <Logitech Logitech Dual Action, class 0/0, rev 1.10/3.00, addr 12> on usbus0
Jul 20 15:09:21 coral kernel: uhid1: at uhub2, port 4, addr 12 (disconnected)
Jul 20 15:09:21 coral kernel: uhid1: detached

Problem is the same on 11.2-RELEASE and 12.0-RELEASE.

FreeBSD coral.acadix.biz 12.0-RELEASE-p6 FreeBSD 12.0-RELEASE-p6 GENERIC  amd64

It still works on my PowerMac G5:

ugen2.2: <Logitech Logitech Dual Action> at usbus2
uhid0 on uhub2
uhid0: <Logitech Logitech Dual Action, class 0/0, rev 1.10/3.00, addr 2> on usbus2

FreeBSD powermacg5.acadix  bacon ~ 482: hexdump /dev/uhid0 

[ move left joystick ]

0000000 807f 807f 0800 04fc 807d 807f 0800 04fc
0000010 8679 807f 0800 04fc 8d77 807f 0800 04fc
0000020 8977 807f 0800 04fc 8477 807f 0800 04fc
0000030 8077 807f 0800 04fc 807b 807f 0800 04fc

FreeBSD powermacg5.acadix.biz 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  powerpc
Comment 1 Jason W. Bacon freebsd_committer freebsd_triage 2019-07-21 13:52:57 UTC
Interesting discovery:

The problem goes away on all systems if I remove or comment out the following in /etc/rc.conf:

webcamd_enable="YES"

I do not need to stop the service, just edit rc.conf and the problem immediately ceases.
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-21 15:41:44 UTC
Likely webcamd attaches and create /dev/input/evdevX devices.

--HPS
Comment 3 Jason W. Bacon freebsd_committer freebsd_triage 2019-07-24 02:29:11 UTC
Thanks for the suggestion, but nope:

ugen0.4: <Logitech Logitech Dual Action> at usbus0 (disconnected)
ugen0.4: <Logitech Logitech Dual Action> at usbus0
uhid1 on uhub0
uhid1: <Logitech Logitech Dual Action, class 0/0, rev 1.10/3.00, addr 9> on usbus0
uhid1: at uhub0, port 4, addr 9 (disconnected)
uhid1: detached
<<<ROOT@coral.acadix>>> /home/bacon 1046 # ls /dev/input/
event0  js0

FYI, this happens on systems with or without webcam hardware.
Comment 4 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-24 07:40:51 UTC
That is the expected behaviour.

--HPS
Comment 5 Jason W. Bacon freebsd_committer freebsd_triage 2019-07-24 14:29:55 UTC
I'm not clear what you mean by expected behavior.  Did you mean /dev/eventX rather than /dev/evdevX?
Comment 6 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-24 15:23:52 UTC
The js0 and event0 device is for your webcamd supported device. Currently there is no blacklisting of devices webcamd should not attach to.

--HPS
Comment 7 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-24 15:24:18 UTC
When webcamd attaches it will detach other kernel drivers like uhid.

--HPS
Comment 8 Jason W. Bacon freebsd_committer freebsd_triage 2019-07-24 15:33:58 UTC
But this system doesn't have a webcam.  Are you saying webcamd will attach to my gamepad and push the uhid driver out of the way in the process?  I.e. webcamd considers a gamepad to be a supported device?

Thanks,

   JB
Comment 9 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-24 15:41:15 UTC
webcamd is for multiple USB based devices. Not just webcams. See "make config" in /usr/ports/multimedia/webcamd .

--HPS
Comment 10 Jason W. Bacon freebsd_committer freebsd_triage 2019-07-24 15:54:30 UTC
I see now...  Maybe time for a name change?  I never would have imagined that a daemon called webcamd would support my gamepad.  Thanks.