g15daemon with Realtime Kernel

Hello,

i did install the OpenSuse RPMs (I use 10.2).
When I try to start g15daemon with this command:
USB_DEVFS_PATH=/sys/bus/usb/devices/ g15daemon -d 2

There is the following message:

usb_os_find_devices: Found uevent on usb1<br />
Too many configurations (10 > 8)<br />
Too many configurations (49 > 8)<br />
Too many configurations (108 > 8)<br />
Too many configurations (191 > 8)<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
error obtaining child information: Inappropriate ioctl for device<br />
libg15: Found 21 supported devices<br />
libg15: Trying to find Logitech G15<br />
libg15: Logitech G15 not found<br />
libg15: Trying to find Logitech G11<br />
libg15: Found Logitech G11, trying to open it<br />
libg15: Device has 1 possible configurations<br />
libg15: Device has 1 Alternate Settings<br />
libg15: Interface 0 has 2 Endpoints<br />
USB error: could not get bound driver: Inappropriate ioctl for device<br />
USB error: could not set config 1: Inappropriate ioctl for device<br />
libg15: Error setting the configuration, this is fatal<br />
libg15: Logitech G11 not found<br />
libg15: Trying to find Logitech Z-10<br />
libg15: Logitech Z-10 not found<br />
libg15: Trying to find Logitech G15 v2<br />
libg15: Logitech G15 v2 not found

(I didn't paste the whole output. On other usb ports the messages are the same.
My kernel is a vanilla Kernel patched with realtime patches.
During the boot Process I got messages like "the ioctl TIOCGDEV is not known by the kernel".
Is this caused by the vanilla kernel or the realtime patches? Or is there any possibility to change the ioctl manually?

Greetings and thanks
Michael

Re: g15daemon with Realtime Kernel

I'm glad someone's using my RPMs :) For your usbfs problem, it's a known problem with opensuse, since that distro doesn't enable it by default. Instead of putting the mount command in the init script, you should follow the instructions on this page:

http://en.opensuse.org/SDB:VMware_-_USB_support

That way, you can setup groups and permissions which makes it less insecure (but not totally secure, which is the reason usbfs was removed in opensuse).

I hope that helps,
Georges.

Re: g15daemon with Realtime Kernel

Good to hear. Thanks for letting us know.

Re: g15daemon with Realtime Kernel (SOLVED)

Hi,

i tried mount -t usbfs none /proc/bus/usb and started g15daemon via /etc/init.d/g15daemon start and now it works. I added the mount line into the startscript in init.d.
Thanks a lot for your help. I'm so glad :D

Michael

Re: g15daemon with Realtime Kernel

Hello,

I tried "mount -t usbdevfs none /proc/bus/usb" but it said:

mount: unknown filesystem type 'usbdevfs'

Re: g15daemon with Realtime Kernel

Try it with /proc/bus/usb mounted like so:
mount -t usbdevfs none /proc/bus/usb

Re: g15daemon with Realtime Kernel

If I do not set USB_DEVFS_PATH the message is usb_os_init: No USB VFS found, is it mounted?.
I booted with a vanilla 2.6.23.9 Kernel without the realtime patches, and tried the same with g15daemon - the results are the same.
The problem is that I cannot use a OpenSuse standard Kernel because it has any timer problem with my machine.
But it has to work with a standard kernel or?

cat /proc/bus/input/devices says:

I: Bus=0010 Vendor=001f Product=0001 Version=0100<br />
N: Name="PC Speaker"<br />
P: Phys=isa0061/input0<br />
S: Sysfs=/devices/platform/pcspkr/input/input0<br />
U: Uniq=<br />
H: Handlers=kbd event0<br />
B: EV=40001<br />
B: SND=6</p>
<p>I: Bus=0003 Vendor=046d Product=c508 Version=0110<br />
N: Name="Logitech USB Receiver"<br />
P: Phys=usb-0000:00:1a.0-1/input0<br />
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/input/input1<br />
U: Uniq=<br />
H: Handlers=mouse0 event1<br />
B: EV=20007<br />
B: KEY=ff0000 0 0 0 0 0 0 0 0<br />
B: REL=103<br />
B: LED=ff00</p>
<p>I: Bus=0003 Vendor=046d Product=c221 Version=0110<br />
N: Name="Gaming Keyboard"<br />
P: Phys=usb-0000:00:1a.0-2.1/input0<br />
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-2/1-2.1/1-2.1:1.0/input/input2<br />
U: Uniq=<br />
H: Handlers=kbd event2<br />
B: EV=120003<br />
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe<br />
B: LED=1f</p>
<p>I: Bus=0003 Vendor=046d Product=c221 Version=0110<br />
N: Name="Gaming Keyboard"<br />
P: Phys=usb-0000:00:1a.0-2.1/input1<br />
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-2/1-2.1/1-2.1:1.1/input/input3<br />
U: Uniq=<br />
H: Handlers=kbd event3<br />
B: EV=3<br />
B: KEY=78 0 e0000 0 0 0</p>
<p>I: Bus=0003 Vendor=046d Product=c225 Version=0111<br />
N: Name="G11 Keyboard"<br />
P: Phys=usb-0000:00:1a.0-2.4/input0<br />
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-2/1-2.4/1-2.4:1.0/input/input4<br />
U: Uniq=<br />
H: Handlers=kbd event4<br />
B: EV=100003<br />
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe</p>
<p>I: Bus=0019 Vendor=0000 Product=0002 Version=0000<br />
N: Name="Power Button (FF)"<br />
P: Phys=LNXPWRBN/button/input0<br />
S: Sysfs=/devices/virtual/input/input5<br />
U: Uniq=<br />
H: Handlers=kbd event5<br />
B: EV=3<br />
B: KEY=100000 0 0 0</p>
<p>I: Bus=0019 Vendor=0000 Product=0001 Version=0000<br />
N: Name="Power Button (CM)"<br />
P: Phys=PNP0C0C/button/input0<br />
S: Sysfs=/devices/virtual/input/input6<br />
U: Uniq=<br />
H: Handlers=kbd event6<br />
B: EV=3<br />
B: KEY=100000 0 0 0<br />

so there is a detection of the g11 keyboard but I don't know if this helps :-)
I tried keytouch too and the editor shows the G11 Keyboard as event4. It also reacts if I press G1 to edit my preferences.
(On F1 it doesn't), but if I load the config file into keytouch, nothing happens. I say "G1 is firefox" but "G1" Button only sends F1.

/proc/bus/usb is emtpy - is this incorrect?

Re: g15daemon with Realtime Kernel

Quote:
Is this the config option you meant?

Yes. So it looks like it's still there, and your config has usbfs enabled.

Does the problem still occur without setting USB_DEVFS_PATH? If it does, is there any chance you can boot with a different kernel? It would at least tell us if the problem is definitely kernel related, or a userspace SuSE/libusb bug.

Mike

Re: g15daemon with Realtime Kernel

Hi,

thanks for your reply.
"grep GETDRIVER drivers/usb/core/devio.c" returns:

case USBDEVFS_GETDRIVER:<br />
                snoop(&dev->dev, "%s: GETDRIVER\n", __FUNCTION__);<br />

My kernel Version is: 2.6.23.9-rt13 (uname -r)
If I type "cat .config | grep USB_DEV" in my kernel src Dir grep says:
CONFIG_USB_DEVICEFS=y
Is this the config option you meant?

Thanks
Michael

Re: g15daemon with Realtime Kernel

Quote:

libg15: Interface 0 has 2 Endpoints
USB error: could not get bound driver: Inappropriate ioctl for device
USB error: could not set config 1: Inappropriate ioctl for device
libg15: Error setting the configuration, this is fatal

It looks like libg15 found the G11 keyboard, but the kernel doesn't support the linux-specific ioctl IOCTL_USB_GETDRIVER, which is required on Linux for libg15 to control the extra keyboard features. I suspect that the realtime patches have something to do with this, as the stock kernel has no problem as long as USBFS is enabled in the kernel configuration (it is by default on every distro I've seen). You may be able to verify that the realtime patchset has not physically removed support for the IOCTL by running: "grep GETDRIVER drivers/usb/core/devio.c" from your kernel src directory.

It may be helpful to know the kernel version too.

Quote:
During the boot Process I got messages like "the ioctl TIOCGDEV is not known by the kernel".
Is this caused by the vanilla kernel or the realtime patches? Or is there any possibility to change the ioctl manually?

TIOCGDEV is a separate kernel patch that SuSE apply to their kernels. AFAIK it doesn't affect USB devices, and I think it can be ignored for now, or you can try to apply the tiocgdev patch to your realtime kernel.