3

I've been tweaking my boot speed today. The first step was to remove:

      6.194s NetworkManager-wait-online.service

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:

      5.467s udev-configure-printer@-devices-pci0000:00-0000:00:14.0-usb3-3\x2d3-3\x2d3.1.service

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.

  • Did you figure it out? – x0a Aug 16 '17 at 10:36
  • 1
    @x0a I have four USB ports on the laptop. I think the solution is to make the one connected to the USB 3.0 7 port hub (that has printer attached) off-line during boot phase. Then in cron or /etc/rc.local bring it on-line after log-in. At that stage udev will trigger systemd to initialize CUPS. A few years ago I spent 6 weeks in EnhanceIO to make the laptop boot from 45 seconds to 16 seconds and LibreOffice load from 17 seconds to 4 seconds but what is required here to shave 11 seconds down to 9 seconds doesn't seem worthwhile right now. Sorry :( – WinEunuuchs2Unix Aug 17 '17 at 01:50

0 Answers0