[comp.sys.next] dying lpd

mccalpin@masig1.ocean.fsu.edu (John D. McCalpin) (07/25/89)

I suspect that this has been hashed out before....
We are running 0.9, and our lpd keeps on getting swapped out.  The 
printer utility thinks that it is not running, so nothing gets printed.
Every time I want to print something, I have to 'su', kill the old 'lpd'
(which is still running, but Sleeping and sWapped), and start a new
one.  This works for whatever is in the print queue, but then has to
be re-done for every new document.  Any ideas?
--
John D. McCalpin - mccalpin@masig1.ocean.fsu.edu - mccalpin@nu.cs.fsu.edu
		   mccalpin@delocn.udel.edu

dz@lime.ucsb.edu (Daniel James Zerkle) (07/26/89)

In article <MCCALPIN.89Jul25090604@masig1.ocean.fsu.edu> mccalpin@masig1.ocean.fsu.edu (John D. McCalpin) writes:
>We are running 0.9, and our lpd keeps on getting swapped out.
>Every time I want to print something, I have to 'su', kill the old 'lpd'
>(which is still running, but Sleeping and sWapped), and start a new
>one.

You have just described the most annoying bug with the 0.9 release.
The problem is not that the daemon gets swapped out.  It is *supposed*
to be swapped out when it is not doing anything, and get swapped back
in when it starts doing something.  This is how UNIX preserves memory
for processes that really need it.  Almost any idle process will get
swapped out eventually.

NeXT has prescribed several fixes for the printer refusing to print.
These have been sent out via E-Mail, and not everybody knows about
them (I just got lucky that I heard).

1. The first thing you should do is log in as each and every individual
   user on the console, one at a time.  For each user, start up the
   "preferences" program.  There's a switch there indicating "Public
   Window Server."  Select it so the check mark appears.  For some
   reason, if even one user is not a Public Window Server, bad things
   happen to the printer.  This bug should be fixed in 1.0.

2. If that doesn't work, use either the Printer app or the lpc command
   to make sure the printer is "started" and "enabled", although it
   does not sound like this will help your problem, as lpd is printing
   the queue on startup.

3. If the printer still is not responding, log out and log back in again.

4. If nothing is still continuing to happen, log out (on the console),
   log in as "exit" (no password required).  When the login screen pops.
   back up, log in as yourself.

5. If you still are getting problems, kill the process called
   /usr/lib/NextPrinter/npd (you may need kill -9) and start it again.

6. As you have discovered, killing and restarting the lpd may also do
   the trick, although this is hardly an ideal workaround.

7. If things are really, REALLY being annoying, trying rebooting the
   system.  It only takes a couple minutes if you have a SCSI disk
   (assuming you shut down with a clean file system), and various
   inconsistencies will automatically get cleaned up.

8. Finally, when you are absolutely at the end of your rope, your
   printer is making grown men cry, and even prayers to above are
   not being answered, try opening the printer cover momentarily and
   closing it.  This has solved innumerable problems that even
   made the Printer app crash.  This should not accomplish anything,
   but it does.

Good luck.

						-Dan

gerrit@nova.cc.purdue.edu (Gerrit) (07/28/89)

>NeXT has prescribed several fixes for the printer refusing to print.
>These have been sent out via E-Mail, and not everybody knows about
>them (I just got lucky that I heard).
>
>1. The first thing you should do is log in as each and every individual
>   user on the console, one at a time.  For each user, start up the
>   "preferences" program.  There's a switch there indicating "Public
>   Window Server."  Select it so the check mark appears.  For some
>   reason, if even one user is not a Public Window Server, bad things
>   happen to the printer.  This bug should be fixed in 1.0.

I've got over 95 accounts on some of the NeXT machines here, and the above
method would have been a bit tedious.  For those in the same boat, a Unix
solution can save you a bit of work.  As root, try the following from
a Shell or Terminal:

# foreach i ( `nidump passwd . | awk -F: '{print $1}'` )
> echo "dwrite PublicWindowServer Yes" | su $i
> end

If you want to do it for the parent NetInfo domain, change the "."
in "nidump passwd ." to a "..".

Gerrit Huizenga
NeXT Workstation Support
Purdue University Computing Center
gerrit@mentor.cc.purdue.edu