Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Scanner only works for root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tkzv
n00b
n00b


Joined: 22 Aug 2014
Posts: 69

PostPosted: Sun Nov 01, 2015 8:05 pm    Post subject: [solved] Scanner only works for root Reply with quote

Hello. I'm having troubles with a newly bought scanner (Canon LiDE 110).

I emerged media-gfx/sane-frontends and media-gfx/sane-backends. Scanner is correctly detected by root and works for root, but as an unprivileged user the programs don't see it. What should I check?

I did add the user to scanner and usb groups. saned is started.

Code:

$ eix sane-
[I] media-gfx/sane-backends
. . .
     Installed versions:  1.0.25_pre20150628(22:00:53 01.11.2015)(ipv6 nls threads usb -avahi -doc -gphoto2 -snmp -systemd -v4l -xinetd ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" SANE_BACKENDS="genesys -abaton -agfafocus -apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u -canon_dr -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210 -dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -epson2 -fujitsu -gt68xx -hp -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s -hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark -ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp -mustek_usb -mustek_usb2 -nec -net -niash -p5 -pie -pixma -plustek -plustek_pp -pnm -qcam -ricoh -rts8891 -s9036 -sceptre -sharp -sm3600 -sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3 -test -u12 -umax -umax1220u -umax_pp -xerox_mfp")                             
     Homepage:            http://www.sane-project.org/                   
     Description:         Scanner Access Now Easy - Backends             
                                                                         
[I] media-gfx/sane-frontends                                             
     Available versions:  1.0.14 {gimp}                                   
     Installed versions:  1.0.14(21:10:38 01.11.2015)(gimp)               
     Homepage:            http://www.sane-project.org                     
     Description:         Scanner Access Now Easy     

Code:

# scanimage -L
device `genesys:libusb:001:006' is a Canon LiDE 110 flatbed scanner

The non-root user does see the scanner via lsusb:
Code:

Bus 001 Device 008: ID 04a9:1909 Canon, Inc. CanoScan LiDE 110

and usb-devices:
Code:

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04a9 ProdID=1909 Rev=07.01
S:  Manufacturer=Canon
S:  Product=CanoScan
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)


UPDATE: After the reboot (local blackout) everything started to work as non-root too.


Last edited by tkzv on Sat Nov 14, 2015 11:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44166
Location: 56N 3W

PostPosted: Sun Nov 01, 2015 8:49 pm    Post subject: Reply with quote

tkzv,

Check the normal users groups.

Its changed a lot over the years. From memory, you need to be in either or both of plugdev and usb.
Only if they exist on your system already.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tkzv
n00b
n00b


Joined: 22 Aug 2014
Posts: 69

PostPosted: Sun Nov 01, 2015 9:12 pm    Post subject: Reply with quote

NeddySeagoon wrote:
tkzv,

Check the normal users groups.

Its changed a lot over the years. From memory, you need to be in either or both of plugdev and usb.
Only if they exist on your system already.

I already was both in plugdev and usb. I also added "scanner".
Back to top
View user's profile Send private message
tkzv
n00b
n00b


Joined: 22 Aug 2014
Posts: 69

PostPosted: Sun Nov 01, 2015 11:02 pm    Post subject: Reply with quote

UPDATE: I noticed an odd thing. When I give a command "groups username", it displays the group scanner, but for just "groups" it does not:
Code:

$ groups
bin disk wheel floppy audio tape video games usb cdemu vboxusers portage plugdev android tkzv
$ groups tkzv
bin disk wheel floppy uucp audio tape video usb portage tkzv vboxusers games cdemu android plugdev scanner

Do I have to activate a newly created group somehow? (Haven't created new groups for years and forgot how I did it before.)
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1774
Location: United Kingdom

PostPosted: Mon Nov 02, 2015 6:54 am    Post subject: Reply with quote

Scanners can be a major pain in Linux, especially because of udev/eudev (the rules are a quagmire). If you're connecting via USB, does the Canon LiDE 110 also have some internal memory that is accessed by the usb-storage driver in Linux? That can cause all sorts of problems. With my Canon MFP (PIXMA MP560) I had to do the following in order to be able to scan (almost-reliably!) via USB (I have found scanning via a network much easier):

1. Stop the kernel from binding the usb-storage driver to the device.

2. Create a UDEV rule to modify the ACL (access control list) of the device to give both the ‘lp‘ and ‘scanner‘ groups Read-Write access to the device.

3. Create a UDEV rule to: a) change the owner of the device from ‘root‘ to my user account (fitzcarraldo); b) change the device’s group to ‘scanner‘ instead of ‘lp‘; c) give all users Read-Write access to the device.

4. Disable the SANE backend from accessing the MP560 via the network.

In case it's of any help to you, I explained how to do all the above in a blog post: The problem of scanning using USB multi-function printers in Linux (success at last). Although your device is not a MFP, some of the above could still be applicable in your case (the parts of the UDEV rules to give the 'scanner' group Read-Write access to the device and changing the owner from 'root' to your user account, etc.).
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 204
Location: Bavaria

PostPosted: Mon Nov 02, 2015 7:15 pm    Post subject: Reply with quote

The difference between "groups" and "groups <name>" is the fact that "groups <name>" reads the group memberships from /etc/group while "groups" reads the groups memberships for the current login session.
You have to log out and log in again to take the changes of /etc/group into effect.
Back to top
View user's profile Send private message
tkzv
n00b
n00b


Joined: 22 Aug 2014
Posts: 69

PostPosted: Sat Nov 14, 2015 11:39 pm    Post subject: Reply with quote

tomtom69 wrote:
The difference between "groups" and "groups <name>" is the fact that "groups <name>" reads the group memberships from /etc/group while "groups" reads the groups memberships for the current login session.
You have to log out and log in again to take the changes of /etc/group into effect.

Thanks. Is there any way to do it without restarting the X session?
Back to top
View user's profile Send private message
tkzv
n00b
n00b


Joined: 22 Aug 2014
Posts: 69

PostPosted: Sat Nov 14, 2015 11:42 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
If you're connecting via USB, does the Canon LiDE 110 also have some internal memory that is accessed by the usb-storage driver in Linux?

No, it doesn't. As far as I can tell, this scanner is as simple as they get.

The problem seems to have been in some permissions that only applied after a reboot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum