🔍 See Original Question on Ask Ubuntu 🔗
Move slow `udev-configure-printer` from systemd boot to after login prompt
July 29, 2017
Edited: June 12, 2020
November 24, 2022
Copy to clipboard: false
I’ve been tweaking my boot speed today. The first step was to remove:
To remove it I used:
systemctl disable NetworkManager-wait-online.service
And now my boot time shows:
$ systemd-analyze Startup finished in 3.407s (kernel) + 8.356s (userspace) = 11.764s
The network still works ok so it appears no harm has come from the change.
Next on the
systemd-analyze blame list is:
I only use my printer a couple times a month and I certainly don’t need it during the boot up phase. My question is; how do I move CUPS initialization out of the boot sequence into a post boot environment like Startup Applications or
/etc/rc.local or whatever place makes sense?
Or can systemd be told to load the service after login screen appears? Or told to simply wait 15 seconds before loading the service?
What I tried
Using the instructions here I set the target to be after the login prompt. I did this by editing
/lib/systemd/system/udev-configure-printer.service to look like this:
[Unit] Description=Automatic USB/Bluetooth printer setup (%i) # July 29, 2017 - Move from startup (5 seconds time) to after login screen After=lightdm.service [Service] #Type=simple Type=forking GuessMainPID=true ExecStart=/lib/udev/udev-configure-printer add %I # This ExecStop would be useful to disable the print queue when ippusbxd # crashes or gets killed, but in the case that ippusbxd does not get started # at all during the process run by ExecStart (printer does not support # IPP-over-USB) ExecStop gets run immediately making a printer getting # disabled again right after it getting enabled or set up # ExecStop=/lib/udev/udev-configure-printer remove %I
Even after rebooting twice to confirm speeds, the boot time went from 11 seconds to 16 seconds.