<div dir="ltr"><div><div>Info for all who are affected that saned stopped working after upgrade to Ubuntu 16.04 with using systemd (which is default in Ubuntu 16.04)<br><br></div>The problem is that saned stopped working after upgrade, cause the saned.service is indicated as "marked" when you try to start it via: <br><br>`sudo service saned start´ or `systemctl start saned.service´.<br><br></div><div>The solution was to modify the related systemd files as the delivered/generated files in the sane-utils package did not the job right.<br><br></div><div>1. Check that the RUN option in file /etc/default/saned is set to RUN=no (As we dont use systemd AND NOT SysV Init!!)<br><br></div><div>2. I deleted the file /lib/systemd/system/saned.service as it was linked to /dev/null (why?)<br><br></div><div>3. The file /lib/systemd/system/saned.socket should have this (unmodified) content:<br><br>[Unit]<br>Description=saned incoming socket<br><br>[Socket]<br>ListenStream=6566<br>Accept=yes<br>MaxConnections=1<br><br>[Install]<br>WantedBy=sockets.target<br><br></div><div>4. The content of the file /lib/systemd/system/saned@.service should be changed to:<br><br>[Unit]<br>Description=Scanner Service<br>Requires=saned.socket<br><br>[Service]<br>ExecStart=/usr/sbin/saned<br>User=saned<br>Group=saned<br>StandardInput=null<br>StandardOutput=syslog<br>StandardError=syslog<br>Environment=SANE_CONFIG_DIR=/etc/sane.d<br># Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255<br><br>[Install]<br>Also=saned.socket<br><br></div><div>Where "StandardInput" should be set to "StandardInput=null"<br><br></div><div>5. To start saned on bootup use the command:<br><br></div><div>`systemctl enable saned@.service´<br><br></div><div>6. Check in /etc/sane.d/net.conf if "connect_timeout=60" is not commented out and localhost / your servers ipadress is listed to check via [simple-scan | xsane | scanimage -L] on the server, that the scanner is available after a REBOOT.<br><br></div><div>7. Check if your client-ipadresses / -FQDN are listed in /etc/sane.d/saned.conf otherwise they are not allowed to connect!<br><br></div><div>8. Check if the appropriate backend is enabled in /etc/sane.d/dll.conf for your scanner-model<br><br></div><div>9. Follow the hints about the permissions you may have to set to the usb-device / inside the udev-file: <span class="">/lib/<em>udev</em>/rules.d/40-libsane.rules .<br><br></span></div><div><span class="">10. If you can scan successfully local on your server / pc  with one of the scanner frontends then press your thumbs and reboot your server / pc<br><br></span></div><div><span class="">11. After reboot, `scanimage -L´ should list the USB-device (usb:usbport:xxx) and the provided network device (net:<ip>:<device_serial_number>) for your scanner<br></span></div><div><br></div><div>Check with `systemctl status saned.socket´ and `systemctl status saned@.service´ if both are active/ready.<br><br><br></div><div>Now you should be able to scan remotly again<br><br></div><div>Hope this little advises help someone.<br><br></div><div>Ingo Weigert<br></div></div>