[sane-devel] Scanner Button Daemon [scanbd]: high CPU utilization

Wilhelm wilhelm.meier at fh-kl.de
Fri Nov 25 06:45:58 UTC 2011


Hi David,

Am 24.11.2011 21:49, schrieb Rastislav David:
> Hello all,
>
> I've succesfully compiled scanbd for my Canon CanoScan LiDE 110 on my
> ARM powered NAS Linksys DNS-323 running Debian Wheezy.
>
> It works :) however there are few issues.
> 1) scanbd is using 100% of CPU load and thus misses some button presses

looks like a config problem: please post your scanbd.conf

> 2) does not react on Pdf button (nothing logged into console when
> pressed) There are 4 buttons. [Pdf Auto-Scan Copy Email]

we must check the log-file to find out the name of the pdf-button

>
> If I start daemon with: ./scanbd -df -c scanbd.conf
>
> I see:
>
> ./scanbd: debug on: level: 7
> ./scanbd: dropping privs to uid saned
> ./scanbd: dropping privs to uid scanner
> ./scanbd: group scanner has member:
> ./scanbd: saned
> ./scanbd: drop privileges to gid: 104
> ./scanbd: Running as effective gid 104
> ./scanbd: drop privileges to uid: 110
> ./scanbd: Running as effective uid 110
> ./scanbd: dbus_init
> ./scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
> ./scanbd: sane version 1.0
> ./scanbd: Scanning for local-only devices
> ./scanbd: found device: genesys:libusb:001:011 Canon LiDE 110 flatbed
> scanner
> ./scanbd: start_sane_threads
> ./scanbd: Starting poll thread for genesys:libusb:001:011
> ./scanbd: Thread started for device genesys:libusb:001:011
> ./scanbd: sane_poll
> ./scanbd: start udev thread
> ./scanbd: timeout: 400 ms
> ./scanbd: udev thread started
> ./scanbd: Iteration on dbus call
> ./scanbd: no device from udev
> ./scanbd: no device from udev
> ....
> 300x / second
> ./scanbd: no device from udev
> ./scanbd: no device from udev
> ./scanbd: no device from udev
> ./scanbd: no device from udev
> ./scanbd: no device from udev
> ./scanbd: found 41 options for device genesys:libusb:001:011
> ./scanbd: sane_find_matching_options
> ./scanbd: found 5 actions in section (null)
> ./scanbd: checking action scan with filter: ^scan.*
> ./scanbd: found active option[2] mode (type: 3) for device
> genesys:libusb:001:01
> 1
> ./scanbd: found active option[4] preview (type: 0) for device
> genesys:libusb:001
> :011
> ./scanbd: found active option[5] depth (type: 1) for device
> genesys:libusb:001:0
> 11
> ./scanbd: found active option[6] resolution (type: 1) for device
> genesys:libusb:
> 001:011
> ./scanbd: found active option[8] tl-x (type: 2) for device
> genesys:libusb:001:01
> 1
> ./scanbd: found active option[9] tl-y (type: 2) for device
> genesys:libusb:001:01
> 1
> ./scanbd: found active option[10] br-x (type: 2) for device
> genesys:libusb:001:011
> ./scanbd: found active option[11] br-y (type: 2) for device
> genesys:libusb:001:011
>
>
> these "no device from udev" messages are generated about 300/s which I
> think is causing high CPU utilization.

That's strange: did not see this before :-(

>
> in scandb.conf I left all devices as they were and for actions scan
> email and copy I've changed script to /etc/scanbd/action.script.
> This script works fine for said 3 buttons.
>
> Can You help where could be the issue with High CPU utilization?
> Is there some problem with configuration?

I think this has to to with the libudev. You can disable libudev at 
compile-time (and using hald if you want) loosing the capability to 
dynamically add scanners. Can you give this a try, please?

>
> Rastislav
>
> P.S: for scanbd to compile I had to change
> -I/usr/local/include/dbus-1.0/include to
> -I/usr/lib/arm-linux-gnueabi/dbus-1.0/include
>
>
>


-- 
Wilhelm




More information about the sane-devel mailing list