Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Samsung M2070 Scanner permissions issue

Need help with peripherals or devices?
Post Reply
Message
Author
Qkley
Posts: 2
Joined: 2018-05-08 17:08

Samsung M2070 Scanner permissions issue

#1 Post by Qkley »

Hi,

I have a fully up-to-date Debian Stretch on my ThinkPad X230. I have the latest Samsung Unified Linux Driver (V1.00.39) installed on the machine. The printer works fine. However, the scanner is very temperamental and only scans 1-6 pages before simple-scan gives errors being unable to start a scan.

The scanner uses smfp-samsung backend and I've commented out all other backends from sane.d/dll.conf.

Code: Select all

  $:sane-find-scanner
  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not open USB device 0x8087/0x0024 at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x04f2/0xb2ea at 001:005: Access denied (insufficient permissions)
could not open USB device 0x147e/0x2020 at 001:003: Access denied (insufficient permissions)
could not open USB device 0x8087/0x0024 at 001:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient permissions)
found USB scanner (vendor=0x04e8 [Samsung Electronics Co., Ltd.], product=0x3469 [M2070 Series]) at libusb:003:003
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient permissions)
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.
scanimage -L recognizes the scanner.

Code: Select all

$:scanimage -L
device `smfp:usb;04e8;3469;[redacted s/n]' is a Samsung M2070 Series on USB Scanner

If I try to scan a few pages of a document, simple-scan ends up stopping in a buffer on a random page eventually giving "unable to start scan" error. If I then try:

Code: Select all

$:scanimage --format=png > test.png
scanimage: open of device smfp:usb;04e8;3469;[redacted s/n] failed: Error during device I/O
I have tried the tips given in https://wiki.debian.org/Scanner#Permissions (I have libpam-systemd and appropriate vendor rules in the correct folder) and some interesting things happen:

Code: Select all

$:ls -l /dev/sg*
crw-rw---- 1 root disk 21, 0 May  8 19:26 /dev/sg0
crw-rw---- 1 root disk 21, 1 May  8 19:26 /dev/sg1
Note that there is no '+' indicating an Access Control List.

Code: Select all

$:ls -l /dev/bus/usb/*/*
crw-rw-r--  1 root root    189,   0 May  8 19:26 /dev/bus/usb/001/001
crw-rw-r--  1 root root    189,   1 May  8 19:26 /dev/bus/usb/001/002
crw-rw-r--  1 root root    189,   2 May  8 19:26 /dev/bus/usb/001/003
crw-rw-r--  1 root root    189,   4 May  8 19:26 /dev/bus/usb/001/005
crw-rw-r--  1 root root    189, 128 May  8 19:26 /dev/bus/usb/002/001
crw-rw-r--  1 root root    189, 129 May  8 19:26 /dev/bus/usb/002/002
crw-rw-r--  1 root root    189, 256 May  8 19:26 /dev/bus/usb/003/001
crw-rw-r--+ 1 root scanner 189, 257 May  8 19:27 /dev/bus/usb/003/002
crw-rw-r--  1 root root    189, 384 May  8 19:26 /dev/bus/usb/004/001

Code: Select all

$:getfacl /dev/bus/usb/003/002
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/003/002
# owner: root
# group: scanner
user::rw-
user:myuser:rw-
group::rw-
group:scanner:rw-
mask::rw-
other::r--
So I have USB bus permissions, but not the scanner device file permissions. Could you please suggest how can I solve this?
Last edited by Qkley on 2018-05-08 20:01, edited 1 time in total.

Qkley
Posts: 2
Joined: 2018-05-08 17:08

Re: Samsung M2070 Scanner permissions issue

#2 Post by Qkley »

Upon the simple-scan giving me the "Failed to scan. Unable to start scan" error, if I unplug the scanner's usb cable and plug it back in, simple-scan closes. As soon as I open simple-scan again (with the sequence of scanned pages available), I can continue to scan for 1-2 pages. Rinse repeat and I can stretch it to 10 page document.

Thinking it might be usb autosuspend problem I've tried:

Code: Select all

$:echo 2 | sudo tee /sys/bus/usb/devices/*/power/autosuspend >/dev/null
and

Code: Select all

$:echo on | sudo tee /sys/bus/usb/devices/*/power/level >/dev/null
However, it does not seem to help. Are there any other options I could look at? It could be a low-level permission or an usb autosuspend problem.

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Samsung M2070 Scanner permissions issue

#3 Post by shep »

It seems unusual for permissions to change in the middle of a task. Some scans with high resolution/color can be very, very large - could you be running out of /tmp or /opt space? It may be worth running
DF(1) User Commands DF(1)

NAME
df - report file system disk space usage
after each page.

Post Reply