Share

G15Daemon

Tracker: Bugs

7 Using 100% CPU and syslog output - ID: 1573644
Last Update: Comment added ( mlampard )

Hi,

as described in Gentoo Bugzilla [1], at a certain situation g15daemon can
use up 100% CPU time while writing the a lot of messages to the syslog
saying
usbfs: usb_submit_urb returned -28
The error code 28 means ENOSPC /* No space left on device */ and this
behaviour disappers when the available bandwidth to the usb bus is
increased (by removing a hub).
This is not a singular issue, as can be seen in [2].

g15daemon should catch this error and decrease its send speed. An
example patch on how to do this for Spca5xx can be seen as attachment
to the first post in [3].

Bye,

Robert

[1] http://bugs.gentoo.org/150508
[2] http://ubuntuforums.org/showpost.php?p=1391843&postcount=13
[3] http://ubuntuforums.org/showthread.php?t=247646


Robert Buchholz ( goodpoint ) - 2006-10-09 10:45

7

Closed

None

Mike Lampard

None

None

Public


Comments ( 10 )




Date: 2006-10-29 08:13
Sender: mlampardProject Admin

Logged In: YES
user_id=356931

the changes necessary are in libg15 version 1.0.1,
released yesterday. Feel free to re-open this bug
if the problem recurs.


Date: 2006-10-29 02:20
Sender: sf-robotSourceForge.net Site Admin

Logged In: YES
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2006-10-15 10:32
Sender: mlampardProject Admin

Logged In: YES
user_id=356931

Thanks very much for testing, and everyone for reporting
this issue. I'm glad the patch helped. I'll commit the
changes the patch provides to libg15 svn in the next few
days, and release a new version of libg15 on the g15tools
site shortly after that. I'd like you to test one more
change, if you wouldn't mind, as I'd like to get that error
rate down to zero. I'll post the patch here tomorrow.


Date: 2006-10-15 10:09
Sender: gregoire-linux

Logged In: YES
user_id=822473

I have added the patch in the files dir of libg15 and added :
src_unpack() {
unpack ${A}
cd "${S}"
epatch ${FILESDIR}/libg15-bulk-transfer.diff
}
then ebuilded digest and remerged libg15 :
Oct 15 12:04:34 ar g15daemon[17987]: g15daemon 1.2.1 loaded
Oct 15 12:04:34 ar usb 1-8.1.3.4: usbfs: usb_submit_urb
returned -28
Oct 15 12:04:36 ar usb 1-8.1.3.4: usbfs: usb_submit_urb
returned -28
Oct 15 12:05:37 ar usb 1-8.1.3.4: usbfs: usb_submit_urb
returned -28
Oct 15 12:06:38 ar usb 1-8.1.3.4: usbfs: usb_submit_urb
returned -28
Oct 15 12:07:39 ar usb 1-8.1.3.4: usbfs: usb_submit_urb
returned -28

Which means it's much much better as I only get one error
per minutes which don't use all CPU.

Thank you very much :)


Date: 2006-10-14 20:00
Sender: mlampardProject Admin

Logged In: YES
user_id=356931

Thanks. The patch is at the bottom of this page -
libg15-bulk-transfer.diff, it should be applied against
libg15.c in libg15. It simply changes the transfer type
from interrupt to bulk, which might reduce the load on the
bus if the keyboard can't process the requests fast enough
for some reason (such as other devices on the bus).


Date: 2006-10-14 19:40
Sender: gregoire-linux

Logged In: YES
user_id=822473

As soon as I understand what patch should be taken were I'll
test with great pleasure :-)


Date: 2006-10-14 18:58
Sender: goodpoint

Logged In: YES
user_id=1550003

I just reported the bug here because I took care of it over
at the Gentoo Bugzilla, unfortunately I don't have a G15
myself. Another g15 tester I asked also couldn't get a hub
for him, so I hope gregoire can test the patch and post the
results.


Date: 2006-10-09 20:25
Sender: mlampardProject Admin

Logged In: YES
user_id=356931

I'm unable to reproduce this unfortunately. Is someone
able to try the attached patch against libg15, and report
whether it improves the situation?


Date: 2006-10-09 14:26
Sender: gregoire-linux

Logged In: YES
user_id=822473

I don't think so : if I plug my g15 to one of my usb port on
my usb monitor I get into trouble, and on the monitor there
is only the keyboard and the cards readers (not in use).
I don't think an unused cards reader need lots of usb
traffic, no ?


Date: 2006-10-09 13:25
Sender: mlampardProject Admin

Logged In: YES
user_id=356931

This appears to be a bug in either libg15 or libusb. I'll
try and reproduce this here, and fix it in libg15 if
possible. Thanks for bringing it to my attention.

To clarify, it only appears when there is a lot of usb
traffic on the bus, correct?


Log in to comment.




Attached File ( 1 )

Filename Description Download
libg15-bulk-transfer.diff patch changing libg15 to use bulk transfers for keypress detection Download

Changes ( 7 )

Field Old Value Date By
status_id Pending 2006-10-29 02:20 sf-robot
close_date 2006-10-14 20:00 2006-10-29 02:20 sf-robot
status_id Open 2006-10-14 20:00 mlampard
close_date - 2006-10-14 20:00 mlampard
File Added 197382: libg15-bulk-transfer.diff 2006-10-09 20:25 mlampard
assigned_to nobody 2006-10-09 13:25 mlampard
priority 5 2006-10-09 13:25 mlampard