FS#41726 - [xsane] hangs on start-up scanning for devices, cannot be killed, locks-up the terminal, hangs gimp
Attached to Project:
Arch Linux
Opened by James (thx1138) - Wednesday, 27 August 2014, 21:32 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 15 October 2017, 16:52 GMT
Opened by James (thx1138) - Wednesday, 27 August 2014, 21:32 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 15 October 2017, 16:52 GMT
|
Details
xsane 0.999-1
On start-up, xsane hangs with the "scanning for devices" window. The process remains in state "uninterruptible sleep" and cannot be killed. The terminal from which xsane was started also hangs. "gimp" also will not start, hanging with "Querying new Plug-ins - xsane" and creating another hung xsane process. This all seems pretty harsh. Searching Google, it also seems to have been a problem, off and on, for many years, and still not fixed. See, for instance, https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/1242092 Alas, running "saned", as described there, does not have any effect. Any thoughts? I've sent also a bug report to the "sane-devel" mailing list. This seems to be some kind of fundamental design problem here, without so much as at least a time-out function in the background, to put xsane back on the run-queue. James |
This task depends upon
A RedHat bug asks to bundle systemd service files with xsane package. I think Arch should do that.
I recall better behavior under linux-lts kernel. Maybe the issue is in kernel changes from -lts to mainline.
Anyway, here are the files for current mainline kernel without a reboot. I made very minor changes from samples to match Arch. Copy the files to your sys and do
systemctl daemon-reload
systemctl enable saned.socket
And if you don't reboot, then also do
systemctl start saned.socket
Cheers
# (File A) /etc/tmpfiles.d/sane.conf
d /run/lock/sane 0775 root scanner - -
# (File B) /etc/systemd/system/saned.socket
[Unit]
Description=saned incoming socket
[Socket]
ListenStream=6566
Accept=yes
MaxConnections=1
[Install]
WantedBy=sockets.target
# (File C) /etc/systemd/system/saned@.service
[Unit]
Description=Scanner Service
Requires=saned.socket
[Service]
ExecStart=/usr/bin/saned
User=scanner
Group=scanner
StandardInput=null
StandardOutput=syslog
StandardError=syslog
Environment=SANE_CONFIG_DIR=/etc/sane.d
But I also wonder why I produced different service files following (x)sane online help for systemd.
Independent of the fix, and before, the 'simple-scan' app ran the hardware without a hitch. So the bug is XSane specific. GIMP has no plugin for simple-scan, just xsane, so it remains important.