[Bug 596411] New: Scanbuttond can't find usb scanner, problem with libusb compatibility library
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c0 Summary: Scanbuttond can't find usb scanner, problem with libusb compatibility library Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: x86-64 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: gblackman@aanet.com.au QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=354223) --> (http://bugzilla.novell.com/attachment.cgi?id=354223) Extracts from system logs User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.8) Gecko/20100204 SUSE/3.5.8-0.1.1 Firefox/3.5.8 Scanbuttond is a daemon that listens for button presses from a USB scanner and runs a script (buttonpressed.sh) when a press is detected. It uses libusb (not sane) to inter-act with the scanner. I have successfully used scanbuttond with a number of previous versions of openSUSE but it won't work with 11.2. With 11.2, it doesn't respond to button presses and never runs the script. The logs show the daemon starts and loads its required back-ends but that it cannot find the installed USB scanner. I have tried the 2 binary versions of scanbuttond (from the repositories) and also compiled from source. The results are the same in each case; scanner not detected so no response to button presses. I should add that the scanner itself is correctly identified by both scanimage -L and lsusb, and scans perfectly using Skanlite or Xsane. I now find that down-grading from the standard libusb-compat (libusb-0_1-4-0.1.13-2.2.x86_64 I think) to the older libusb-0_1-4-0.1.12-140.1.x86_64 (per bug #559697) fixes the problem. The daemon finds the scanner and properly detects any button presses. It seems very likely that scanbuttond relies on a feature from the original libusb0 that is not properly replicated in the compatibility library for libusb1. Reproducible: Always Steps to Reproduce: 1. Install scanbuttond 2. Press a scanner button 3. Actual Results: Nothing happens - logs show scanner not detected. Expected Results: buttonpressed.sh script should run -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c1 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jsmeix@novell.com Resolution| |DUPLICATE --- Comment #1 from Johannes Meixner <jsmeix@novell.com> 2010-04-14 11:05:47 UTC --- I am not at all an USB expert but just noticed "down-grading ... libusb-compat ... per bug #559697" which makes it really look like a duplicate. *** This bug has been marked as a duplicate of bug 559697 *** http://bugzilla.novell.com/show_bug.cgi?id=559697 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c2 --- Comment #2 from Graeme Blackman <gblackman@aanet.com.au> 2010-04-14 22:06:05 UTC --- Hmmm ... don't think so. I'm no usb expert either, but I had read through bug #559697 fairly carefully before making this bug report. Bug #559697 (and #559724) relate to the inability of the libusb compatibility library to properly handle the transfer of the large blocks of data generated by a scanner during the scan process. The bug I reported (#596411) relates to the inability of a previously working application to even detect the presence of a scanner. It has nothing to do with the transfer of large data blocks. The fact that a work round can be had by using the older library, does not mean they are duplicates. It simple means neither problem was present in the older library. Please re-open this bug. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c3 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |sbrabec@novell.com Resolution|DUPLICATE | --- Comment #3 from Johannes Meixner <jsmeix@novell.com> 2010-04-15 07:48:07 UTC --- O.k. - I think a libusb expert should have a look... -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c4 Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner@novell.com AssignedTo|bnc-team-screening@forge.pr |sbrabec@novell.com |ovo.novell.com | --- Comment #4 from Marcus Meissner <meissner@novell.com> 2010-04-15 08:03:16 UTC --- hmm. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c6 --- Comment #6 from Stanislav Brabec <sbrabec@novell.com> 2010-04-15 18:29:23 CEST --- First try to upgrade of all libusb1 packages from http://download.opensuse.org/repositories/hardware/openSUSE_11.2/ If it works, it is fixed. If not: Please provide debugging data: 1) Install libusb0 library from: http://download.opensuse.org/repositories/hardware:/libusb0:/debug/openSUSE_... Then set USB_DEBUG=255 variable: export USB_DEBUG=255 and run your application, redirecting output to file. 2) Install libusb1 libraries from: http://download.opensuse.org/repositories/hardware:/debug/openSUSE_11.2/ Then set USB_DEBUG=255 variable: export USB_DEBUG=255 and run your application, redirecting output to file. Then provide both outputs. I need to compare them and find what is happening. Note: Bug 559697 was analyzed, but the fix is pretty complex and not yet written. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c7 --- Comment #7 from Graeme Blackman <gblackman@aanet.com.au> 2010-04-15 23:04:21 UTC --- Created an attachment (id=354853) --> (http://bugzilla.novell.com/attachment.cgi?id=354853) Debug output for libusb0 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c8 --- Comment #8 from Graeme Blackman <gblackman@aanet.com.au> 2010-04-15 23:05:45 UTC --- Created an attachment (id=354855) --> (http://bugzilla.novell.com/attachment.cgi?id=354855) Debug output for lobusb1 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=596411 http://bugzilla.novell.com/show_bug.cgi?id=596411#c9 --- Comment #9 from Graeme Blackman <gblackman@aanet.com.au> 2010-04-15 23:08:03 UTC --- (In reply to comment #6) Thanks for that. As requested, I have taken the following steps:- 1. Upgraded the libusb1 packages i.e. libusb1 to 1.0.6-7.2-x86_64 and libusb-compat to 0.1.13-7.1-x86_64. Doesn't work. 2. Installed libusb0 debug library (0.1.12-143.1-x86_64, libusb1 as above). Works. Output attached as libusb0.debug.log 3. Installed libusb1 debug libraries (libusb1 to 1.0.6-10.2-x86_64, libusb-compat to 0.1.13-9.1-x86_64). Doesn't work. Output attached as libusb1.debug.log. There is minimal output from the libusb1 debug run - don't know if that's good or bad. Please let me know if there is anything else I can provide. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c10 T Gergely <kelevel+novell.com@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kelevel+novell.com@gmail.co | |m --- Comment #10 from T Gergely <kelevel+novell.com@gmail.com> 2012-01-28 18:24:24 UTC --- scanbuttond/libusbi.c defines some functions with names that clash with lubusb-compat (libusb_init, libusb_open, libusb_close). Those must be renamed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c11 Graeme Blackman <gblackman01@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gblackman01@gmail.com --- Comment #11 from Graeme Blackman <gblackman01@gmail.com> 2012-01-30 22:07:22 UTC --- (In reply to comment #10)
scanbuttond/libusbi.c defines some functions with names that clash with lubusb-compat (libusb_init, libusb_open, libusb_close). Those must be renamed.
Hey, many thanks for that. I thought it was all dead and forgotten. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c12 --- Comment #12 from T Gergely <kelevel+novell.com@gmail.com> 2012-01-30 23:17:19 UTC ---
Hey, many thanks for that. I thought it was all dead and forgotten.
You're welcome. Yeah, I thought the same, but my father was so furious about the scan/print button not working, I had to waste my day solving this issue. And since I claim I use OSS so I can fix issues, I have to justify that. Now that I solved that, I have to figure out why scanimage is waiting for a minute after scanning a page. :( Anyway, I try to contact the project author to have this project alive again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c13 --- Comment #13 from Graeme Blackman <gblackman01@gmail.com> 2012-01-31 00:33:54 UTC --- (In reply to comment #12) Good luck with your scanimage problem. Let me know if I can add my support to convince the project author that the project is still relevant. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c14 --- Comment #14 from Stanislav Brabec <sbrabec@suse.com> 2012-01-31 16:14:44 CET --- Many thanks for your research. Well, it should have impact on the libusb-compat itself. If libusb-compat hides its symbols, then the clash will not happen. But I am not sure whether it is possible with libusb-1 symbols. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c15 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |aj@suse.com --- Comment #15 from Stanislav Brabec <sbrabec@suse.com> 2012-04-10 21:45:18 CEST --- Andreas, could you advise with this issue? We need to link against libusb-0.1.so.4 that needs symbols from libusb-1.0.so.0. But we need to make symbols from libusb-1.0.so.0 invisible for the application that links to libusb-0.1.so.4. Is something like that easily possible or do we need to play with dlopen("libusb-1.0.so.0", RTLD_LOCAL) and dlsym() wrappers? This partial issue can be worked around by modifying of the application source code. But libusb is a LGPL application and it is used by many proprietary programs. As libusb0 did not define symbol libusb_open, such application could use it for its own function. After migration to libusb-compat, such application stops to work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c16 Andreas Jaeger <aj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED InfoProvider|aj@suse.com | --- Comment #16 from Andreas Jaeger <aj@suse.com> 2012-04-11 09:12:33 UTC --- I have no quick idea. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c17 --- Comment #17 from Marcus Meissner <meissner@suse.com> 2012-04-11 11:33:55 UTC --- easiest way i proably to port it to libusb1 ? i did this for libgphoto2 and libmtp, so if its not too hard here I could try. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c18 --- Comment #18 from Marcus Meissner <meissner@suse.com> 2012-04-11 11:36:18 UTC --- where is the source of this scanbuttond= ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c19 --- Comment #19 from Stanislav Brabec <sbrabec@suse.com> 2012-04-11 15:51:52 CEST --- Marcus Meissner: I agree. But there is many closed source applications using libusb0, that will never be ported to libusb1. It would be nice to emulate libusb0 in libusb-compat as well as possible. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=596411 https://bugzilla.novell.com/show_bug.cgi?id=596411#c20 --- Comment #20 from Graeme Blackman <gblackman01@gmail.com> 2012-04-11 21:52:23 UTC --- Marcus Meisner: Its easy to fix scanbuttond. Simply find and rename all instances of libusb_init, libusb_open and libusb_close in the source code. (Per comment 10 above). I renamed them as sb_libusb_init, sb_libusb_open, sb_libusb_close, recompiled and everything works perfectly again. The source code is on SourceForge but there doesn't seem to be any recent activity. I don't know the knowledge to go any further but can let you have my patched source. It would seem to me that this is just a bandaid though and it would be much cleaner if the original problem could be fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com