Skip to main content
Topic: [SOLVED] Udevless printing (Read 1937 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Udevless printing

Hi all!
I have problems trying to use cups without udev running. When i try to print something and see printer state it shows
Code: [Select]
Waiting for printer to become available.
Then i enabled cups debug logging and saw the following lines in error_log:
Code: [Select]
D [29/May/2019:12:11:14 +0300] [Job 45] libusb_get_device_list=7
D [29/May/2019:12:11:14 +0300] [Job 45] Failed to open device, code: -3
D [29/May/2019:12:11:14 +0300] [Job 45] Waiting for printer to become available.
I [29/May/2019:12:11:15 +0300] Expiring subscriptions...
Cups is rebuilt without udev and dbus support.
What could cause this problem and how to fix it without using udev? (it works with udev)
ARMtix

Re: Udevless printing

Reply #1
The solution was just to run:
Code: [Select]
chmod 700 /usr/lib/cups/backend/usb
ARMtix

Re: [SOLVED] Udevless printing

Reply #2
1   does this mean you can only run cups as root now?
2  I've tried living comfortably without dbus (not without udev yet) and although when I first tried it I thought "wow, cups works without dbus ...  who needs it?" then I realized it only printed one page per session, it had to be stopped and restarted to print another single page.  Whether this was to print a 2nd different page or two of the same page.  Even a batch as one print instruction to print 2 pages doesn't work, I think it goes with 1pg instruction then hangs, probably waiting some feedback from dbus that never comes.  This is running a single session of cups manually not cupsd.  So it may need a special service script where it stops and restarts per print instruction.  I don't have a ps printer so lpr is not really able to print, or I don't know how yet.  I am also using a hacked ppd from a different model of the same printer brand.
3  If we had this conversation in arch-fora we would both have been banned by now, so thanks to artix for tolerating us.

Re: [SOLVED] Udevless printing

Reply #3
1   does this mean you can only run cups as root now?
2  I've tried living comfortably without dbus (not without udev yet) and although when I first tried it I thought "wow, cups works without dbus ...  who needs it?" then I realized it only printed one page per session, it had to be stopped and restarted to print another single page.  Whether this was to print a 2nd different page or two of the same page.  Even a batch as one print instruction to print 2 pages doesn't work, I think it goes with 1pg instruction then hangs, probably waiting some feedback from dbus that never comes.  This is running a single session of cups manually not cupsd.  So it may need a special service script where it stops and restarts per print instruction.  I don't have a ps printer so lpr is not really able to print, or I don't know how yet.  I am also using a hacked ppd from a different model of the same printer brand.
3  If we had this conversation in arch-fora we would both have been banned by now, so thanks to artix for tolerating us.
1-no, i can print as user without problems. It seems, these backends are called by daemon when needed and daemon is run as root. Also i have successfully printed from windows tablet accessing printer over network
2-accessing printer from tablet i printed 2 pages in one session. I think, i will provide more info till 10-th of June
3-i think, there is logic behind: if we got rid of systemd why not to move further? :)
ARMtix

Re: [SOLVED] Udevless printing

Reply #4
then I realized it only printed one page per session, it had to be stopped and restarted to print another single page.  Whether this was to print a 2nd different page or two of the same page.  Even a batch as one print instruction to print 2 pages doesn't work, I think it goes with 1pg instruction then hangs, probably waiting some feedback from dbus that never comes.
All works fine for me: i have just printed 12 pages as usual.
Could this be some printer-specific error? I had hp printer which worked this way with most of devices (including some Windows-based)
ARMtix

Re: [SOLVED] Udevless printing

Reply #5
You know I have tried this.  I have an advantage that the printer is a network aware device on my internal network so I can assign it an IP address, load a PS filter for it and run it through CUPS.

If you turn off udev, though, what about your entire /dev/ tree?  Are you using mknode to build it by hand?

For me, I do hate udev, but as a practical matter, in the the Bonjour services that are bigger problems and running cups without it didn't give be happy results.

Re: [SOLVED] Udevless printing

Reply #6
1-no, i can print as user without problems. It seems, these backends are called by daemon when needed and daemon is run as root. Also i have successfully printed from windows tablet accessing printer over network
2-accessing printer from tablet i printed 2 pages in one session. I think, i will provide more info till 10-th of June
3-i think, there is logic behind: if we got rid of systemd why not to move further? :)
Code: [Select]
[ruben@flatbush ~]$ ps -axuw|grep daem
root       879  0.0  0.0  13628  5040 ?        Ss   Jun12   0:14 /usr/bin/udevd --daemon
dbus      1459  0.0  0.0   6488  2580 ?        Ss   Jun12   0:01 /usr/bin/dbus-daemon --system
root      1488  0.0  0.0  10216  3144 ?        S    Jun12   0:01 elogind-daemon
avahi     2457  0.0  0.0   6252  2792 ?        S    Jun12   0:00 avahi-daemon: running [flatbush.local]
avahi     2458  0.0  0.0   6128   244 ?        S    Jun12   0:00 avahi-daemon: chroot helper
root      2682  0.0  0.0   5076   188 ?        S    Jun12   0:00 supervise-daemon agetty.tty1 --start --pidfile /run/agetty.tty1.pid --respawn-period 60 /sbin/agetty -- tty1 38400 linux
root      2709  0.0  0.0   5076   188 ?        S    Jun12   0:00 supervise-daemon agetty.tty2 --start --pidfile /run/agetty.tty2.pid --respawn-period 60 /sbin/agetty -- tty2 38400 linux
root      2736  0.0  0.0   5076   188 ?        S    Jun12   0:00 supervise-daemon agetty.tty3 --start --pidfile /run/agetty.tty3.pid --respawn-period 60 /sbin/agetty -- tty3 38400 linux
root      2763  0.0  0.0   5076   184 ?        S    Jun12   0:00 supervise-daemon agetty.tty4 --start --pidfile /run/agetty.tty4.pid --respawn-period 60 /sbin/agetty -- tty4 38400 linux
root      2790  0.0  0.0   5076   188 ?        S    Jun12   0:00 supervise-daemon agetty.tty5 --start --pidfile /run/agetty.tty5.pid --respawn-period 60 /sbin/agetty -- tty5 38400 linux
root      2817  0.0  0.0   5076   184 ?        S    Jun12   0:00 supervise-daemon agetty.tty6 --start --pidfile /run/agetty.tty6.pid --respawn-period 60 /sbin/agetty -- tty6 38400 linux
ruben     2891  0.0  0.0   6272  2152 ?        Ss   Jun12   0:07 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
ruben    18314  0.0  0.0   6028  2672 ?        S    Jun15   0:02 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
ruben    22208  0.0  0.0   6268  2228 pts/9    S+   15:15   0:00 grep --colour=auto daem



say again?

FWIW that is openrc

Re: [SOLVED] Udevless printing

Reply #7
If you turn off udev, though, what about your entire /dev/ tree?  Are you using mknode to build it by hand?
Nldev+smdev, as you can find in other topic. Works perfect for me on desktop but not as good on laptop
In my case this desktop is also CUPS server for local network and i have made it work properly.
ARMtix

Re: [SOLVED] Udevless printing

Reply #8
Please can we move to a better section?