Printer problem, timing perhaps?

Paul Colclough (paulc@squiznet.demon.co.uk)
Sat, 29 Mar 1997 22:59:50 +0000 (GMT)


I've just changed my motherboard, but everything else is still the same.
However, now when I try to print with Linux, it misses characters :(

Eg:

squiznet:~$ su
Password:
squiznet:~# echo >/dev/lp1 "Three little pigs went to market"
squiznet:~# echo >/dev/lp1 "Three little pigs went to market"
squiznet:~# echo >/dev/lp1 "Three little pigs went to market"

It comes out on the printer exactly this:

Three ittle pg wnt o akt
Tree itepg wn omre
Treltl iswn omarket

Anyone know what the problem is? Exactly the same happens with using the
'lpr' command. My printer is setup in BIOS as SPP (Standard), 0x378
IRQ 7. Nothing else is using IRQ 7 and linux states it is using the
polling mode anyway.

Under MS-DOS the printer works fine. It is not a "Plug'n'Play" printer
and no drivers are loaded or are neccessary for the printer. Printer
model is a Star-LC-10. I have considered upgrading the printer, but I do
not want to do this until I can solve the problem.

If I define the 'DEBUG' in drivers/char/lp.c I get the following written
to /var/log/debug:

Mar 29 12:39:41 squiznet kernel: lp1 ioctl, cmd: 0x5401, arg: 0xbffff5b8
Mar 29 12:39:41 squiznet kernel: lp1 success after 1 counts.
Mar 29 12:39:41 squiznet kernel: lp1 success after 48 counts.
Mar 29 12:39:41 squiznet kernel: lp1 success after 191 counts.

With longer files, the output is slightly different:

Mar 29 13:15:08 squiznet kernel: lp1 success after 1 counts.
Mar 29 13:15:08 squiznet kernel: lp1 success after 2 counts.
Mar 29 13:15:08 squiznet kernel: lp1 success after 89 counts.
Mar 29 13:15:08 squiznet kernel: lp1 success after 137 counts.
Mar 29 13:15:08 squiznet kernel: lp1 success after 144 counts.
Mar 29 13:15:08 squiznet kernel: lp1 sleeping at 23 characters for 5 jiffies
Mar 29 13:15:08 squiznet kernel: lp1 sleeping at 0 characters for 5 jiffies
Mar 29 13:15:08 squiznet kernel: lp1 sleeping at 0 characters for 5 jiffies
Mar 29 13:15:08 squiznet kernel: lp1 success after 358 counts.
Mar 29 13:15:08 squiznet kernel: lp1 success after 362 counts.

I've incremented the wait times in include/linux/lp.h and
recompiled/rebooted but it results in exactly the same problem. tunelp does
not seem to help either.

I have tried three different versions of the kernel: 1.2.13, 2.0.29, 2.1.2

NB: If there's a better list to send to post to, then please correct me with
the appropriate address (if possible).

paulc@squiznet.demon.co.uk (U.K) http://www.squiznet.demon.co.uk
paulc@sunsite.unc.edu (U.S) http://sunsite.unc.edu/paulc