Keyboard-like controller not detected on boot.

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
TargetBoy

Keyboard-like controller not detected on boot.

Post by TargetBoy »

I am using an I-Pac2 control interface for my Linux Mint based arcade cabinet. This interface looks to the computer like a USB keyboard. I also have a normal usb wireless keyboard/mouse connected to the system.

However, it is not being properly detected at boot. I have a script set up to automatically start the game, but when it starts the I-Pac2 is not detected but the normal keyboard is. After boot, it does not appear with the lsusb command. If I unplug the I-Pac2 and plug it back in after boot completes, it is detected, shows up with the lsusb command and works fine. However, I can not open the arcade cabinet and plug in the controls every time it is turn on!

Is there a way to force the USB controller to re-check for connected devices? The I-Pac2 runs on USB supplied power. My guess is that when the computer checks for devices, the I-Pac2 is not ready to respond, so the system does not know that it exists. Or maybe it is just weird and does not respond exactly as the computer expects at that point.

I have tried several solutions to keyboard recognition problems, particularly the post at http://forums.linuxmint.com/viewtopic.php?f=90&t=160288.

I saw one post that has what seemed like a usb restart command: http://askubuntu.com/questions/645/how- ... 519#290519. However, all of the options here use information from the lsusb command. Since the I-Pac2 is not even showing up in lsusb, it does not help.

Is there a command to tell Linux "Check to see if there are any new USB devices"?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
PatH57

Re: Keyboard-like controller not detected on boot.

Post by PatH57 »

Hi,

let's see

Code: Select all

lsusb
when the device is recognized so we have it's id.

Code: Select all

sudo apt-get install input-utils

Code: Select all

lsinput
udevadm , with this command line, you need to unplug the device before using the command and then plug it to see it:

Code: Select all

udevadm monitor --udev
and have a look at this
http://tuxtweaks.com/2009/01/force-usb- ... in-ubuntu/
TargetBoy

Re: Keyboard-like controller not detected on boot.

Post by TargetBoy »

So, before the device is recognized lsusb gives:

Code: Select all

Bus 001 Device 002: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 3938:1032  
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I should note that the OS is running from that USB stick. There are no hard drives in this machine (It is for an arcade cabinet, it only needs to run one application.)

After unplugging the controller and plugging it back in, lsusb shows:

Code: Select all

Bus 001 Device 002: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 009: ID d208:0310  
Bus 002 Device 002: ID 3938:1032  
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
When the controller is plugged in, the udevadm monitor command shows:

Code: Select all

$ udevadm monitor --udev
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [1484.161735] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8 (usb)
UDEV  [1484.166324] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.0 (usb)
UDEV  [1484.166876] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.2 (usb)
UDEV  [1484.170003] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.2/0003:D208:0310.0005 (hid)
UDEV  [1484.171560] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.0/0003:D208:0310.0003 (hid)
UDEV  [1484.172676] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.2/0003:D208:0310.0005/hidraw/hidraw4 (hidraw)
UDEV  [1484.176089] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.2/input/input21 (input)
UDEV  [1484.176834] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1 (usb)
UDEV  [1484.177205] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.0/0003:D208:0310.0003/hidraw/hidraw2 (hidraw)
UDEV  [1484.178088] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.0/input/input19 (input)
UDEV  [1484.178917] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.2/input/input21/event19 (input)
UDEV  [1484.180496] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1/0003:D208:0310.0004 (hid)
UDEV  [1484.181908] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1/0003:D208:0310.0004/hidraw/hidraw3 (hidraw)
UDEV  [1484.181945] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1/input/input20 (input)
UDEV  [1484.182768] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1/input/input20/mouse1 (input)
UDEV  [1484.183695] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.1/input/input20/event18 (input)
UDEV  [1484.189994] add      /devices/pci0000:00/0000:00:04.0/usb2/2-8/2-8:1.0/input/input19/event17 (input)
After installing, the lsinput command gives:

Code: Select all

$ sudo lsinput
/dev/input/event0
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "PNP0C0C/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event1
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event2
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43776
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_REP

/dev/input/event3
   bustype : BUS_USB
   vendor  : 0x3938
   product : 0x1032
   version : 272
   name    : "MOSART Semi. 2.4G RF Keyboard & "
   phys    : "usb-0000:00:04.0-4/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event4
   bustype : BUS_USB
   vendor  : 0x3938
   product : 0x1032
   version : 272
   name    : "MOSART Semi. 2.4G RF Keyboard & "
   phys    : "usb-0000:00:04.0-4/input1"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC

/dev/input/event5
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Front Headphone"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event6
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Line Out Side"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event7
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Line Out CLFE"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event8
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Line Out Surround"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event9
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Line Out Front"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event10
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Line"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event11
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Rear Mic"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event12
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia Front Mic"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event13
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia HDMI/DP,pcm=9"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event14
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia HDMI/DP,pcm=8"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event15
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia HDMI/DP,pcm=7"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event16
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA NVidia HDMI/DP,pcm=3"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event17
   bustype : BUS_USB
   vendor  : 0xd208
   product : 0x310
   version : 273
   name    : "Ultimarc I-PAC2 Ultimarc I-PAC2"
   phys    : "usb-0000:00:04.0-8/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event18
   bustype : BUS_USB
   vendor  : 0xd208
   product : 0x310
   version : 273
   name    : "Ultimarc I-PAC2 Ultimarc I-PAC2"
   phys    : "usb-0000:00:04.0-8/input1"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

/dev/input/event19
   bustype : BUS_USB
   vendor  : 0xd208
   product : 0x310
   version : 273
   name    : "Ultimarc I-PAC2 Ultimarc I-PAC2"
   phys    : "usb-0000:00:04.0-8/input2"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED
I will try "lsusb >/dev/usb" and post whether it works.
TargetBoy

Re: Keyboard-like controller not detected on boot.

Post by TargetBoy »

Neither "lsusb >/dev/null" or "modprobe -r ehci_hcd" had any effect. The lsusb did nothing. The modprobe gave an error that ehci_usb is built in. Apparently it does not want to disconnect the device the OS is loaded from.
PatH57

Re: Keyboard-like controller not detected on boot.

Post by PatH57 »

Code: Select all

Apparently it does not want to disconnect the device the OS is loaded from.
are you running a live usb?
TargetBoy

Re: Keyboard-like controller not detected on boot.

Post by TargetBoy »

No, I used a live USB to install onto another USB stick. I did disable the Swap, to keep it from destroying the stick.
PatH57

Re: Keyboard-like controller not detected on boot.

Post by PatH57 »

ok then the usb refresh will not work as it would disable the system drive.
try to reload the usb modules.

Code: Select all

sudo modprobe usb-uhci

Code: Select all

sudo modprobe usb-ohci

Code: Select all

sudo modprobe usb-storage
or

Code: Select all

lsusb -d d208:0310 2>&1 > /dev/null
d208:0310 seems to be the device.
TargetBoy

Re: Keyboard-like controller not detected on boot.

Post by TargetBoy »

"sudo modprobe usb-uhci" and "sudo modprobe usb-ohci" both said module not found. sudo modprobe usb-storage" gave no output at all.

The lsusb command had no effect as well, since the full lsusb does not see the device.

Can you break down this command though:

lsusb -d d208:0310 2>&1 > /dev/null

-d : List a specific device
d208:0310: The device ID of the I-PAC2
2>&1 : What is this?
> /dev/null : Uses the output of the previous command as input for /dev/null. What is /dev/null and why does it require input?

Thank you for all your help.
Locked

Return to “Hardware Support”