After doing some research I believe this is not a bug, but a
misunderstanding. With systemd in use in 16.04 saned is started only "on
demand", when a program calls for it.

The solution from the manpage I described above is actually realised
with the sane-utils package, the files are part of that package, only
difference is that the are placed in /lib/systemd/system instead of
/etc/systemd/system.

sane.socket listens on port 6566 for incoming saned-requests, 
`sudo systemtctl status saned.socked` results in 

● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: 
enabled)
   Active: active (listening) since Mi 2016-05-25 16:46:07 CEST; 2h 17min ago
   Listen: [::]:6566 (Stream)
 Accepted: 0; Connected: 0

If saned is configured correctly and a program like xsane calls for it,
it is started accordingly.

`sudo systemtctl status saned@*.service`  (mark the * !) then will
result in something like

● [email protected]:6566-192.168.xxx.xx:38046.service - Scanner Service 
(192.168.xxx.xx:38046)
   Loaded: loaded (/lib/systemd/system/[email protected]; indirect; vendor preset: 
enabled)
   Active: active (running) since Mi 2016-05-25 18:47:01 CEST; 6min ago
 Main PID: 2181 (saned)
   CGroup: 
/system.slice/system-saned.slice/[email protected]:6566-192.168.xxx.xx:38046.service
           └─2181 /usr/sbin/saned

Mai 25 18:47:01 computer-name systemd[1]: Started Scanner Service 
(192.168.xxx.xx:38046).
Mai 25 18:47:01 computer-name saned[2181]: saned (AF-indep+IPv6+systemd) from 
sane-backends 1.0.25git starting up
Mai 25 18:47:01 computername saned[2181]: check_host: access by remote host: 
::ffff:192.168.xxx.xx
Mai 25 18:47:01 computername saned[2181]: init: access granted to 
saned-user@::ffff:192.168.xxx.xx

sane is loaded by /lib/systemd/system/[email protected], which starts
/usr/bin/saned as requested by xsane.

The service cannot be started manually by something like `sudo systemctl
start saned`, because it is only started by incoming requests.
`scanimage -L` will also start saned, but it will stop as soon as the
process is completed.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to sane-backends in Ubuntu.
https://bugs.launchpad.net/bugs/1577137

Title:
  sane service masked and cannot be unmasked

Status in sane-backends package in Ubuntu:
  Confirmed

Bug description:
  After upgrading to 16.04 (from 14.04) I noticed the sane daemon (sane-
  utils 1.0.25+git20150528-1ubuntu2) was no longer running. Attempting
  to manually start it results in systems complaining that the service
  is masked:

  kjetil at lucien in ~> sudo systemctl start saned
  Failed to start saned.service: Unit saned.service is masked.

  Unmasking it does not work:

  kjetil at lucien in ~> sudo systemctl unmask saned
  kjetil at lucien in ~> sudo systemctl start saned
  Failed to start saned.service: Unit saned.service is masked.

  kjetil at lucien in ~> ps u -C saned
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  kjetil at lucien in ~>

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: sane-utils 1.0.25+git20150528-1ubuntu2
  ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
  Uname: Linux 4.4.0-21-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2
  Architecture: amd64
  Date: Sun May  1 13:10:31 2016
  InstallationDate: Installed on 2012-08-01 (1368 days ago)
  InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 
(20120424.1)
  SourcePackage: sane-backends
  UpgradeStatus: Upgraded to xenial on 2016-04-24 (6 days ago)
  mtime.conffile..etc.default.saned: 2016-05-01T12:51:02.879807
  mtime.conffile..etc.sane.d.saned.conf: 2016-01-10T13:57:20.785810

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1577137/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to