Artix Linux Forum

General Category => Off-Topic => Topic started by: phoenix_king_rus on 29 May 2019, 11:33:18

Title: [SOLVED] Udevless printing
Post by: phoenix_king_rus on 29 May 2019, 11:33:18
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)
Title: Re: Udevless printing
Post by: phoenix_king_rus on 29 May 2019, 12:19:53
The solution was just to run:
Code: [Select]
chmod 700 /usr/lib/cups/backend/usb
Title: Re: [SOLVED] Udevless printing
Post by: fungalnet on 29 May 2019, 19:13:10
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.
Title: Re: [SOLVED] Udevless printing
Post by: phoenix_king_rus on 29 May 2019, 20:54:43
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? :)
Title: Re: [SOLVED] Udevless printing
Post by: phoenix_king_rus on 09 June 2019, 21:38:46
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)
Title: Re: [SOLVED] Udevless printing
Post by: mrbrklyn on 16 June 2019, 21:16:29
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.
Title: Re: [SOLVED] Udevless printing
Post by: mrbrklyn on 16 June 2019, 21:18:40
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
Title: Re: [SOLVED] Udevless printing
Post by: phoenix_king_rus on 16 June 2019, 21:26:16
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 (https://forum.artixlinux.org/index.php/topic,530.0.html). 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.
Title: Re: [SOLVED] Udevless printing
Post by: mrbrklyn on 16 June 2019, 21:29:09
Please can we move to a better section?