From bacon@smithers.neuro.mcw.edu  Fri Mar 11 22:42:12 2005
Return-Path: <bacon@smithers.neuro.mcw.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CDEE216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Mar 2005 22:42:12 +0000 (GMT)
Received: from smithers.neuro.mcw.edu (smithers.neuro.mcw.edu [141.106.144.66])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3681E43D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Mar 2005 22:42:12 +0000 (GMT)
	(envelope-from bacon@smithers.neuro.mcw.edu)
Received: from smithers.neuro.mcw.edu (localhost [127.0.0.1])
	by smithers.neuro.mcw.edu (8.13.1/8.13.1) with ESMTP id j2BMgBW2066754
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Mar 2005 16:42:11 -0600 (CST)
	(envelope-from bacon@smithers.neuro.mcw.edu)
Received: (from bacon@localhost)
	by smithers.neuro.mcw.edu (8.13.1/8.13.1/Submit) id j2BMgArp066753;
	Fri, 11 Mar 2005 16:42:10 -0600 (CST)
	(envelope-from bacon)
Message-Id: <200503112242.j2BMgArp066753@smithers.neuro.mcw.edu>
Date: Fri, 11 Mar 2005 16:42:10 -0600 (CST)
From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
Reply-To: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Parallel printer incredibly slow
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         78711
>Category:       kern
>Synopsis:       Parallel printer incredibly slow
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 11 22:50:02 GMT 2005
>Closed-Date:    Sun Apr 03 07:45:38 GMT 2005
>Last-Modified:  Sun Jul  3 00:30:42 GMT 2005
>Originator:     Jason Bacon
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
Medical College of Wisconsin
>Environment:
FreeBSD sculpin.tds.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Dec 19 15:26:36 CST 2004     bacon@sculpin.tds.net:/usr/obj/usr/src/sys/sculpin  i386

ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
ppbus0: IEEE1284 device found /NIBBLE
Probing for PnP devices on ppbus0:
ppbus0: <EPSON Stylus COLOR 640> PRINTER ESCPL2,BDC
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0

>Description:
	The parallel printer runs ridiculously slow.  It prints normally
	for about 30 seconds, then prints one line every 5 or 10 minutes.
	One photo from an iBook client to a Stylus 640 took about 12 hours
	using lpd server to a raw printer queue.  A page from konqueror
	using stc_h driver with apsfilter took over an hour.
	
>How-To-Repeat:
	Print any lengthy document to the parallel printer.
	
>Fix:
	lptcontrol -s resolves the problem.  This looks to me much
	like a timing issue that plagued some googlers in the late 1990s.
	Running in polled mode on this system does not impact the system
	(ASUS P5A, K6-2 500Mhz) significantly,
	
66 processes:  1 running, 65 sleeping
CPU states:  1.6% user,  0.0% nice,  7.0% system,  0.0% interrupt, 91.4% idle

	although it might on a faster, higher volume parallel printer.
	For this reason, forcing the mode to something other than COMPATIBLE
	via /boot/device.hints might be a better alternative for some 
	people.  Check your BIOS to see what modes are supported for the 
	parallel port, and "man ppc" for details on port settings in 
	device.hints.
>Release-Note:
>Audit-Trail:

From: Suporte Matik <asstec@matik.com.br>
To: freebsd-bugs@freebsd.org,
	Jason Bacon <bacon@smithers.neuro.mcw.edu>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Fri, 11 Mar 2005 20:27:37 -0300

 --nextPart1410204.RuImmmuZp0
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 On Friday 11 March 2005 19:42, Jason Bacon wrote:
 > >Number:         78711
 > >Category:       kern
 > >Synopsis:       Parallel printer incredibly slow
 > >Confidential:   no
 > >Severity:       serious
 > >Release:        FreeBSD 5.3-RELEASE i386
 > FreeBSD sculpin.tds.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Dec 19
 > 15:26:36 CST 2004     bacon@sculpin.tds.net:/usr/obj/usr/src/sys/sculpin=
 =20
 > i386
 >
 > >Description:
 >
 > 	The parallel printer runs ridiculously slow.  It prints normally
 > 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 > 	One photo from an iBook client to a Stylus 640 took about 12 hours
 > 	using lpd server to a raw printer queue.  A page from konqueror
 > 	using stc_h driver with apsfilter took over an hour.
 >
 > >How-To-Repeat:
 >
 > 	Print any lengthy document to the parallel printer.
 >
 
 any two lines text file needs 15 minutes to be printed
 
 > >Fix:
 >
 > 	lptcontrol -s resolves the problem.  This looks to me much
 > 	like a timing issue that plagued some googlers in the late 1990s.
 > 	Running in polled mode on this system does not impact the system
 > 	(ASUS P5A, K6-2 500Mhz) significantly,
 >
 
 does not fix, the problem is as well with lpr and cups local/remote
 
 the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, a=
 ny=20
 gray or color mode is slow
 
 > 	although it might on a faster, higher volume parallel printer.
 > 	For this reason, forcing the mode to something other than COMPATIBLE
 > 	via /boot/device.hints might be a better alternative for some
 > 	people.  Check your BIOS to see what modes are supported for the
 > 	parallel port, and "man ppc" for details on port settings in
 > 	device.hints.
 
 doesn't matter what you set in the BIOS or whatever, any gray or colormode =
 on=20
 5.3 is that inacceptable slow
 
 using the exactly same printer and port settings on 5.2.1 or 4.11 brings yo=
 u=20
 back to the expected printing speed
 
 you even can use the exact same clean ports tree and compiling cupsd +=20
 foomatic and 5.3 is slow and 5.2.1 and 4.11 is normal speed
 
 But printing to a remote cups tree from 5.3 is giving the normal performanc=
 e.
 
 
 Hans
 
 
 >
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 >
 > _______________________________________________
 > freebsd-bugs@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 > To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 
 =2D-=20
 
 
 Infomatik
  implementamos asas na sua rede.
   (18)3551.3591 (18)8112.7007
 _______________________________________________________
 Participe! FreeBSD - Security - Wireless e outras
 Entre em http://listas.matik.com.br e inscreva-se!
 _______________________________________________________
 Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 Messages without GPG signature are not from us.
 _______________________________________________________
 
 --nextPart1410204.RuImmmuZp0
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQBCMils22x1wvvbslkRAmGQAJ0U6rqvc3uLVK4I78pLdHIlqS8T1gCg2PxT
 2b/32YtscJlMpBX9Zqcv0Rg=
 =RKrX
 -----END PGP SIGNATURE-----
 
 --nextPart1410204.RuImmmuZp0--

From: Bruce Evans <bde@zeta.org.au>
To: Suporte Matik <asstec@matik.com.br>
Cc: freebsd-bugs@freebsd.org,
	Jason Bacon <bacon@smithers.neuro.mcw.edu>,
	FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Sat, 12 Mar 2005 13:11:09 +1100 (EST)

 On Fri, 11 Mar 2005, Suporte Matik wrote:
 
 > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>> Description:
 >>
 >> 	The parallel printer runs ridiculously slow.  It prints normally
 >> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>...
 >
 > any two lines text file needs 15 minutes to be printed
 >
 >>> Fix:
 >>
 >> 	lptcontrol -s resolves the problem.  This looks to me much
 >>...
 >
 > does not fix, the problem is as well with lpr and cups local/remote
 >
 > the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, any
 > gray or color mode is slow
 
 Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 storm detection that misdetects the very high interrupt rates that can
 be caused by printers (combined with low quality interrupt handling in
 the lpt driver) as interrupt storms.
 
 > doesn't matter what you set in the BIOS or whatever, any gray or colormode on
 > 5.3 is that inacceptable slow
 >
 > using the exactly same printer and port settings on 5.2.1 or 4.11 brings you
 > back to the expected printing speed
 
 FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 detection and handling.  In at least some versions, the bugs make printers
 go even slower if an interrupt storm is misdetected for them, but
 misdetection is apparently rarer.
 
 FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 printer speed are local to the driver.
 
 Bruce

From: Suporte Matik <asstec@matik.com.br>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-bugs@freebsd.org,
	Jason Bacon <bacon@smithers.neuro.mcw.edu>,
	FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Sat, 12 Mar 2005 12:00:05 -0300

 --nextPart3242423.gev1DMieO2
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 On Friday 11 March 2005 23:11, Bruce Evans wrote:
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 > > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 > >>> Description:
 > >>
 > >> 	The parallel printer runs ridiculously slow.  It prints
 > >> normally for about 30 seconds, then prints one line every 5 or
 > >> 10 minutes. ...
 > >
 >
 > Try changing the interrupt storm threshold
 > (hw.intr_storm_threshold) to something larger than the printer can
 > generate.  FreeBSD-5.3 has interrupt storm detection that
 > misdetects the very high interrupt rates that can be caused by
 > printers (combined with low quality interrupt handling in the lpt
 > driver) as interrupt storms.
 >
 
 I increased it in 500er steps to 2500 (500 was default) and nothing=20
 changed in printing speed but the stray irq7 events do not appear=20
 anymore.=20
 
 
 Hans
 
 
 =2D-=20
 
 
 Infomatik
  implementamos asas na sua rede.
  http://info.matik.com.br    (18)8112.7007
 Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 Messages without GPG signature are not from us.
 _______________________________________________________
 
 --nextPart3242423.gev1DMieO2
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQBCMwP722x1wvvbslkRAvs8AJ9TR6L+gd38swTL/S0/Z82KJcdozwCePc12
 rxuJxTqlIs/FGej0lyRaca8=
 =G7o9
 -----END PGP SIGNATURE-----
 
 --nextPart3242423.gev1DMieO2--

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Suporte Matik <asstec@matik.com.br>
Cc: freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 11:11:03 -0600 (CST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --0-421382599-1110820263=:76255
 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
 Content-Transfer-Encoding: QUOTED-PRINTABLE
 
 
 There was a mistake in my fix: The real solution is lptcontrol -p (not=20
 lptcontrol -s).  "lptcontrol -s" restored functionality at one point after=
 =20
 several other tweaks, but by itself, after a fresh reboot, does not solve=
 =20
 the problem, while "lptcontrol -p" does.
 
 I also tried forcing the mode to ECP with
 
 loader.conf
 -----------
 hint.ppc.0.flags=3D"0xC8"
 
 dmesg.boot
 ----------
 ppc0: <ECP parallel printer port> port 0x778-0x77b,0x378-0x37b irq 7 drq 3=
 =20
 flags
   0xc8 on acpi0
 ppc0: SMC-like chipset (ECP-only) in ECP mode
 ppbus0: <Parallel port bus> on ppc0
 ppbus0: IEEE1284 device found /NIBBLE
 Probing for PnP devices on ppbus0:
 ppbus0: <EPSON Stylus COLOR 640> PRINTER ESCPL2,BDC
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 
 This did NOT help - I still had to use "lptcontrol -p" to get the printer=
 =20
 running at normal speed.
 
 I also found that polling puts a pretty heavy load on the system under=20
 some circumstances, like printing a high-quality photo from my iBook lpd=20
 client, although for most printing (e.g. printing WEB pages and OpenOffice=
 =20
 docs through the stc_h filter) the load is negligible.
 
 The iBook client prints through a raw queue:
 
 stc_raw:\
      :lp=3D/dev/lpt0:\
      :sd=3D/var/spool/lpd/stc_raw:\
      :lf=3D/var/spool/lpd/stc_raw/log:\
      :af=3D/var/spool/lpd/stc_raw/acct:\
      :mx#0:\
      :sh:
 
 so it's definitely due to polling, and not filtering of any sort.  Top=20
 also showed that most of the load was system time, whereas print filtering=
 =20
 usually shows up as user time, more specifically "gs".
 
  =09Jason
 
 On Fri, 11 Mar 2005, Suporte Matik wrote:
 
 > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>> Number:         78711
 >>> Category:       kern
 >>> Synopsis:       Parallel printer incredibly slow
 >>> Confidential:   no
 >>> Severity:       serious
 >>> Release:        FreeBSD 5.3-RELEASE i386
 >> FreeBSD sculpin.tds.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Dec 19
 >> 15:26:36 CST 2004     bacon@sculpin.tds.net:/usr/obj/usr/src/sys/sculpin
 >> i386
 >>
 >>> Description:
 >>
 >> =09The parallel printer runs ridiculously slow.  It prints normally
 >> =09for about 30 seconds, then prints one line every 5 or 10 minutes.
 >> =09One photo from an iBook client to a Stylus 640 took about 12 hours
 >> =09using lpd server to a raw printer queue.  A page from konqueror
 >> =09using stc_h driver with apsfilter took over an hour.
 >>
 >>> How-To-Repeat:
 >>
 >> =09Print any lengthy document to the parallel printer.
 >>
 >
 > any two lines text file needs 15 minutes to be printed
 >
 >>> Fix:
 >>
 >> =09lptcontrol -s resolves the problem.  This looks to me much
 >> =09like a timing issue that plagued some googlers in the late 1990s.
 >> =09Running in polled mode on this system does not impact the system
 >> =09(ASUS P5A, K6-2 500Mhz) significantly,
 >>
 >
 > does not fix, the problem is as well with lpr and cups local/remote
 >
 > the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ,=
  any
 > gray or color mode is slow
 >
 >> =09although it might on a faster, higher volume parallel printer.
 >> =09For this reason, forcing the mode to something other than COMPATIBLE
 >> =09via /boot/device.hints might be a better alternative for some
 >> =09people.  Check your BIOS to see what modes are supported for the
 >> =09parallel port, and "man ppc" for details on port settings in
 >> =09device.hints.
 >
 > doesn't matter what you set in the BIOS or whatever, any gray or colormod=
 e on
 > 5.3 is that inacceptable slow
 >
 > using the exactly same printer and port settings on 5.2.1 or 4.11 brings =
 you
 > back to the expected printing speed
 >
 > you even can use the exact same clean ports tree and compiling cupsd +
 > foomatic and 5.3 is slow and 5.2.1 and 4.11 is normal speed
 >
 > But printing to a remote cups tree from 5.3 is giving the normal performa=
 nce.
 >
 >
 > Hans
 >
 >
 >>
 >>> Release-Note:
 >>> Audit-Trail:
 >>> Unformatted:
 >>
 >> _______________________________________________
 >> freebsd-bugs@freebsd.org mailing list
 >> http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 >> To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 >
 > --=20
 >
 >
 > Infomatik
 > implementamos asas na sua rede.
 >  (18)3551.3591 (18)8112.7007
 > _______________________________________________________
 > Participe! FreeBSD - Security - Wireless e outras
 > Entre em http://listas.matik.com.br e inscreva-se!
 > _______________________________________________________
 > Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 > Messages without GPG signature are not from us.
 > _______________________________________________________
 >
 --0-421382599-1110820263=:76255--

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Bruce Evans <bde@zeta.org.au>
Cc: Suporte Matik <asstec@matik.com.br>, freebsd-bugs@freebsd.org,
	FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 17:55:19 -0600 (CST)

 Mark another one resolved...
 
 sysctl hw.intr_storm_threshold=2500 seems to have done the trick.
 
 I printed a high quality photo from my iBook, and the job ran just fine. 
 Top showed the CPU usage split between system and interrupt, whereas it 
 was all system in polling mode as one might expect.
 
 I went back and checked my /var/log/messages from before the change, and 
 noticed:
 
 Interrupt storm detected on "irq7: lpt0"; throttling interrupt source
 stray irq7
 
 I also repeated the experiment for confidence:
 
 sysctl hw.intr_storm_threshold=500
 re-ran same print job and watched it stall
 sysctl hw.intr_storm_threshold=2500
 re-ran same print job and watched it complete
 
 If you're interested in collecting some data on the topic, I can play with 
 the threshold values and look for a working minimum for my needs.
 
 Let me know,
 
  	Jason
 
 
 On Sat, 12 Mar 2005, Bruce Evans wrote:
 
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 >
 >> On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>>> Description:
 >>> 
 >>> 	The parallel printer runs ridiculously slow.  It prints normally
 >>> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>> ...
 >> 
 >> any two lines text file needs 15 minutes to be printed
 >> 
 >>>> Fix:
 >>> 
 >>> 	lptcontrol -s resolves the problem.  This looks to me much
 >>> ...
 >> 
 >> does not fix, the problem is as well with lpr and cups local/remote
 >> 
 >> the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, 
 >> any
 >> gray or color mode is slow
 >
 > Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 > something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 > storm detection that misdetects the very high interrupt rates that can
 > be caused by printers (combined with low quality interrupt handling in
 > the lpt driver) as interrupt storms.
 >
 >> doesn't matter what you set in the BIOS or whatever, any gray or colormode 
 >> on
 >> 5.3 is that inacceptable slow
 >> 
 >> using the exactly same printer and port settings on 5.2.1 or 4.11 brings 
 >> you
 >> back to the expected printing speed
 >
 > FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 > detection and handling.  In at least some versions, the bugs make printers
 > go even slower if an interrupt storm is misdetected for them, but
 > misdetection is apparently rarer.
 >
 > FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 > printer speed are local to the driver.
 >
 > Bruce
 >

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Bruce Evans <bde@zeta.org.au>
Cc: Suporte Matik <asstec@matik.com.br>, freebsd-bugs@freebsd.org,
	FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 17:55:42 -0600 (CST)

 Almost forgot...  Thanks!
 
 On Sat, 12 Mar 2005, Bruce Evans wrote:
 
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 >
 >> On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>>> Description:
 >>> 
 >>> 	The parallel printer runs ridiculously slow.  It prints normally
 >>> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>> ...
 >> 
 >> any two lines text file needs 15 minutes to be printed
 >> 
 >>>> Fix:
 >>> 
 >>> 	lptcontrol -s resolves the problem.  This looks to me much
 >>> ...
 >> 
 >> does not fix, the problem is as well with lpr and cups local/remote
 >> 
 >> the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, 
 >> any
 >> gray or color mode is slow
 >
 > Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 > something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 > storm detection that misdetects the very high interrupt rates that can
 > be caused by printers (combined with low quality interrupt handling in
 > the lpt driver) as interrupt storms.
 >
 >> doesn't matter what you set in the BIOS or whatever, any gray or colormode 
 >> on
 >> 5.3 is that inacceptable slow
 >> 
 >> using the exactly same printer and port settings on 5.2.1 or 4.11 brings 
 >> you
 >> back to the expected printing speed
 >
 > FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 > detection and handling.  In at least some versions, the bugs make printers
 > go even slower if an interrupt storm is misdetected for them, but
 > misdetection is apparently rarer.
 >
 > FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 > printer speed are local to the driver.
 >
 > Bruce
 >
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Apr 3 07:44:37 GMT 2005 
State-Changed-Why:  
Apparently resolved by changing the interrupt storm threshhold. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78711 

From: Bruce Evans <bde@zeta.org.au>
To: Suporte Matik <asstec@matik.com.br>
Cc: Jason Bacon <bacon@smithers.neuro.mcw.edu>
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Sat, 12 Mar 2005 13:11:09 +1100 (EST)

 On Fri, 11 Mar 2005, Suporte Matik wrote:
 
 > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>> Description:
 >>
 >> 	The parallel printer runs ridiculously slow.  It prints normally
 >> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>...
 >
 > any two lines text file needs 15 minutes to be printed
 >
 >>> Fix:
 >>
 >> 	lptcontrol -s resolves the problem.  This looks to me much
 >>...
 >
 > does not fix, the problem is as well with lpr and cups local/remote
 >
 > the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, any
 > gray or color mode is slow
 
 Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 storm detection that misdetects the very high interrupt rates that can
 be caused by printers (combined with low quality interrupt handling in
 the lpt driver) as interrupt storms.
 
 > doesn't matter what you set in the BIOS or whatever, any gray or colormode on
 > 5.3 is that inacceptable slow
 >
 > using the exactly same printer and port settings on 5.2.1 or 4.11 brings you
 > back to the expected printing speed
 
 FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 detection and handling.  In at least some versions, the bugs make printers
 go even slower if an interrupt storm is misdetected for them, but
 misdetection is apparently rarer.
 
 FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 printer speed are local to the driver.
 
 Bruce
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 

From: Suporte Matik <asstec@matik.com.br>
To: Bruce Evans <bde@zeta.org.au>
Cc: Jason Bacon <bacon@smithers.neuro.mcw.edu>
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Sat, 12 Mar 2005 12:00:05 -0300

 --nextPart3242423.gev1DMieO2
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 On Friday 11 March 2005 23:11, Bruce Evans wrote:
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 > > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 > >>> Description:
 > >>
 > >> 	The parallel printer runs ridiculously slow.  It prints
 > >> normally for about 30 seconds, then prints one line every 5 or
 > >> 10 minutes. ...
 > >
 >
 > Try changing the interrupt storm threshold
 > (hw.intr_storm_threshold) to something larger than the printer can
 > generate.  FreeBSD-5.3 has interrupt storm detection that
 > misdetects the very high interrupt rates that can be caused by
 > printers (combined with low quality interrupt handling in the lpt
 > driver) as interrupt storms.
 >
 
 I increased it in 500er steps to 2500 (500 was default) and nothing=20
 changed in printing speed but the stray irq7 events do not appear=20
 anymore.=20
 
 
 Hans
 
 
 =2D-=20
 
 
 Infomatik
  implementamos asas na sua rede.
  http://info.matik.com.br    (18)8112.7007
 Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 Messages without GPG signature are not from us.
 _______________________________________________________
 
 --nextPart3242423.gev1DMieO2
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQBCMwP722x1wvvbslkRAvs8AJ9TR6L+gd38swTL/S0/Z82KJcdozwCePc12
 rxuJxTqlIs/FGej0lyRaca8=
 =G7o9
 -----END PGP SIGNATURE-----
 
 --nextPart3242423.gev1DMieO2--
 

From: Suporte Matik <asstec@matik.com.br>
To: freebsd-bugs@freebsd.org,
	Jason Bacon <bacon@smithers.neuro.mcw.edu>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Fri, 11 Mar 2005 20:27:37 -0300

 --nextPart1410204.RuImmmuZp0
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 On Friday 11 March 2005 19:42, Jason Bacon wrote:
 > >Number:         78711
 > >Category:       kern
 > >Synopsis:       Parallel printer incredibly slow
 > >Confidential:   no
 > >Severity:       serious
 > >Release:        FreeBSD 5.3-RELEASE i386
 > FreeBSD sculpin.tds.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Dec 19
 > 15:26:36 CST 2004     bacon@sculpin.tds.net:/usr/obj/usr/src/sys/sculpin=
 =20
 > i386
 >
 > >Description:
 >
 > 	The parallel printer runs ridiculously slow.  It prints normally
 > 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 > 	One photo from an iBook client to a Stylus 640 took about 12 hours
 > 	using lpd server to a raw printer queue.  A page from konqueror
 > 	using stc_h driver with apsfilter took over an hour.
 >
 > >How-To-Repeat:
 >
 > 	Print any lengthy document to the parallel printer.
 >
 
 any two lines text file needs 15 minutes to be printed
 
 > >Fix:
 >
 > 	lptcontrol -s resolves the problem.  This looks to me much
 > 	like a timing issue that plagued some googlers in the late 1990s.
 > 	Running in polled mode on this system does not impact the system
 > 	(ASUS P5A, K6-2 500Mhz) significantly,
 >
 
 does not fix, the problem is as well with lpr and cups local/remote
 
 the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, a=
 ny=20
 gray or color mode is slow
 
 > 	although it might on a faster, higher volume parallel printer.
 > 	For this reason, forcing the mode to something other than COMPATIBLE
 > 	via /boot/device.hints might be a better alternative for some
 > 	people.  Check your BIOS to see what modes are supported for the
 > 	parallel port, and "man ppc" for details on port settings in
 > 	device.hints.
 
 doesn't matter what you set in the BIOS or whatever, any gray or colormode =
 on=20
 5.3 is that inacceptable slow
 
 using the exactly same printer and port settings on 5.2.1 or 4.11 brings yo=
 u=20
 back to the expected printing speed
 
 you even can use the exact same clean ports tree and compiling cupsd +=20
 foomatic and 5.3 is slow and 5.2.1 and 4.11 is normal speed
 
 But printing to a remote cups tree from 5.3 is giving the normal performanc=
 e.
 
 
 Hans
 
 
 >
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 >
 > _______________________________________________
 > freebsd-bugs@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 > To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 
 =2D-=20
 
 
 Infomatik
  implementamos asas na sua rede.
   (18)3551.3591 (18)8112.7007
 _______________________________________________________
 Participe! FreeBSD - Security - Wireless e outras
 Entre em http://listas.matik.com.br e inscreva-se!
 _______________________________________________________
 Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 Messages without GPG signature are not from us.
 _______________________________________________________
 
 --nextPart1410204.RuImmmuZp0
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQBCMils22x1wvvbslkRAmGQAJ0U6rqvc3uLVK4I78pLdHIlqS8T1gCg2PxT
 2b/32YtscJlMpBX9Zqcv0Rg=
 =RKrX
 -----END PGP SIGNATURE-----
 
 --nextPart1410204.RuImmmuZp0--
 

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-bugs@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 17:55:19 -0600 (CST)

 Mark another one resolved...
 
 sysctl hw.intr_storm_threshold=2500 seems to have done the trick.
 
 I printed a high quality photo from my iBook, and the job ran just fine. 
 Top showed the CPU usage split between system and interrupt, whereas it 
 was all system in polling mode as one might expect.
 
 I went back and checked my /var/log/messages from before the change, and 
 noticed:
 
 Interrupt storm detected on "irq7: lpt0"; throttling interrupt source
 stray irq7
 
 I also repeated the experiment for confidence:
 
 sysctl hw.intr_storm_threshold=500
 re-ran same print job and watched it stall
 sysctl hw.intr_storm_threshold=2500
 re-ran same print job and watched it complete
 
 If you're interested in collecting some data on the topic, I can play with 
 the threshold values and look for a working minimum for my needs.
 
 Let me know,
 
  	Jason
 
 
 On Sat, 12 Mar 2005, Bruce Evans wrote:
 
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 >
 >> On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>>> Description:
 >>> 
 >>> 	The parallel printer runs ridiculously slow.  It prints normally
 >>> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>> ...
 >> 
 >> any two lines text file needs 15 minutes to be printed
 >> 
 >>>> Fix:
 >>> 
 >>> 	lptcontrol -s resolves the problem.  This looks to me much
 >>> ...
 >> 
 >> does not fix, the problem is as well with lpr and cups local/remote
 >> 
 >> the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, 
 >> any
 >> gray or color mode is slow
 >
 > Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 > something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 > storm detection that misdetects the very high interrupt rates that can
 > be caused by printers (combined with low quality interrupt handling in
 > the lpt driver) as interrupt storms.
 >
 >> doesn't matter what you set in the BIOS or whatever, any gray or colormode 
 >> on
 >> 5.3 is that inacceptable slow
 >> 
 >> using the exactly same printer and port settings on 5.2.1 or 4.11 brings 
 >> you
 >> back to the expected printing speed
 >
 > FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 > detection and handling.  In at least some versions, the bugs make printers
 > go even slower if an interrupt storm is misdetected for them, but
 > misdetection is apparently rarer.
 >
 > FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 > printer speed are local to the driver.
 >
 > Bruce
 >
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Suporte Matik <asstec@matik.com.br>
Cc: freebsd-bugs@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 11:11:03 -0600 (CST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --0-421382599-1110820263=:76255
 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
 Content-Transfer-Encoding: QUOTED-PRINTABLE
 
 
 There was a mistake in my fix: The real solution is lptcontrol -p (not=20
 lptcontrol -s).  "lptcontrol -s" restored functionality at one point after=
 =20
 several other tweaks, but by itself, after a fresh reboot, does not solve=
 =20
 the problem, while "lptcontrol -p" does.
 
 I also tried forcing the mode to ECP with
 
 loader.conf
 -----------
 hint.ppc.0.flags=3D"0xC8"
 
 dmesg.boot
 ----------
 ppc0: <ECP parallel printer port> port 0x778-0x77b,0x378-0x37b irq 7 drq 3=
 =20
 flags
   0xc8 on acpi0
 ppc0: SMC-like chipset (ECP-only) in ECP mode
 ppbus0: <Parallel port bus> on ppc0
 ppbus0: IEEE1284 device found /NIBBLE
 Probing for PnP devices on ppbus0:
 ppbus0: <EPSON Stylus COLOR 640> PRINTER ESCPL2,BDC
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 
 This did NOT help - I still had to use "lptcontrol -p" to get the printer=
 =20
 running at normal speed.
 
 I also found that polling puts a pretty heavy load on the system under=20
 some circumstances, like printing a high-quality photo from my iBook lpd=20
 client, although for most printing (e.g. printing WEB pages and OpenOffice=
 =20
 docs through the stc_h filter) the load is negligible.
 
 The iBook client prints through a raw queue:
 
 stc_raw:\
      :lp=3D/dev/lpt0:\
      :sd=3D/var/spool/lpd/stc_raw:\
      :lf=3D/var/spool/lpd/stc_raw/log:\
      :af=3D/var/spool/lpd/stc_raw/acct:\
      :mx#0:\
      :sh:
 
 so it's definitely due to polling, and not filtering of any sort.  Top=20
 also showed that most of the load was system time, whereas print filtering=
 =20
 usually shows up as user time, more specifically "gs".
 
  =09Jason
 
 On Fri, 11 Mar 2005, Suporte Matik wrote:
 
 > On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>> Number:         78711
 >>> Category:       kern
 >>> Synopsis:       Parallel printer incredibly slow
 >>> Confidential:   no
 >>> Severity:       serious
 >>> Release:        FreeBSD 5.3-RELEASE i386
 >> FreeBSD sculpin.tds.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Dec 19
 >> 15:26:36 CST 2004     bacon@sculpin.tds.net:/usr/obj/usr/src/sys/sculpin
 >> i386
 >>
 >>> Description:
 >>
 >> =09The parallel printer runs ridiculously slow.  It prints normally
 >> =09for about 30 seconds, then prints one line every 5 or 10 minutes.
 >> =09One photo from an iBook client to a Stylus 640 took about 12 hours
 >> =09using lpd server to a raw printer queue.  A page from konqueror
 >> =09using stc_h driver with apsfilter took over an hour.
 >>
 >>> How-To-Repeat:
 >>
 >> =09Print any lengthy document to the parallel printer.
 >>
 >
 > any two lines text file needs 15 minutes to be printed
 >
 >>> Fix:
 >>
 >> =09lptcontrol -s resolves the problem.  This looks to me much
 >> =09like a timing issue that plagued some googlers in the late 1990s.
 >> =09Running in polled mode on this system does not impact the system
 >> =09(ASUS P5A, K6-2 500Mhz) significantly,
 >>
 >
 > does not fix, the problem is as well with lpr and cups local/remote
 >
 > the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ,=
  any
 > gray or color mode is slow
 >
 >> =09although it might on a faster, higher volume parallel printer.
 >> =09For this reason, forcing the mode to something other than COMPATIBLE
 >> =09via /boot/device.hints might be a better alternative for some
 >> =09people.  Check your BIOS to see what modes are supported for the
 >> =09parallel port, and "man ppc" for details on port settings in
 >> =09device.hints.
 >
 > doesn't matter what you set in the BIOS or whatever, any gray or colormod=
 e on
 > 5.3 is that inacceptable slow
 >
 > using the exactly same printer and port settings on 5.2.1 or 4.11 brings =
 you
 > back to the expected printing speed
 >
 > you even can use the exact same clean ports tree and compiling cupsd +
 > foomatic and 5.3 is slow and 5.2.1 and 4.11 is normal speed
 >
 > But printing to a remote cups tree from 5.3 is giving the normal performa=
 nce.
 >
 >
 > Hans
 >
 >
 >>
 >>> Release-Note:
 >>> Audit-Trail:
 >>> Unformatted:
 >>
 >> _______________________________________________
 >> freebsd-bugs@freebsd.org mailing list
 >> http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 >> To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 >
 > --=20
 >
 >
 > Infomatik
 > implementamos asas na sua rede.
 >  (18)3551.3591 (18)8112.7007
 > _______________________________________________________
 > Participe! FreeBSD - Security - Wireless e outras
 > Entre em http://listas.matik.com.br e inscreva-se!
 > _______________________________________________________
 > Mensagens sem assinatura GPG n=E3o s=E3o nossas.
 > Messages without GPG signature are not from us.
 > _______________________________________________________
 >
 --0-421382599-1110820263=:76255
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 
 --0-421382599-1110820263=:76255--
 

From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-bugs@freebsd.org
Subject: Re: kern/78711: Parallel printer incredibly slow
Date: Mon, 14 Mar 2005 17:55:42 -0600 (CST)

 Almost forgot...  Thanks!
 
 On Sat, 12 Mar 2005, Bruce Evans wrote:
 
 > On Fri, 11 Mar 2005, Suporte Matik wrote:
 >
 >> On Friday 11 March 2005 19:42, Jason Bacon wrote:
 >>>> Description:
 >>> 
 >>> 	The parallel printer runs ridiculously slow.  It prints normally
 >>> 	for about 30 seconds, then prints one line every 5 or 10 minutes.
 >>> ...
 >> 
 >> any two lines text file needs 15 minutes to be printed
 >> 
 >>>> Fix:
 >>> 
 >>> 	lptcontrol -s resolves the problem.  This looks to me much
 >>> ...
 >> 
 >> does not fix, the problem is as well with lpr and cups local/remote
 >> 
 >> the only way to get "some more speed" is using b/w and 150 dpi on a HPDJ, 
 >> any
 >> gray or color mode is slow
 >
 > Try changing the interrupt storm threshold (hw.intr_storm_threshold) to
 > something larger than the printer can generate.  FreeBSD-5.3 has interrupt
 > storm detection that misdetects the very high interrupt rates that can
 > be caused by printers (combined with low quality interrupt handling in
 > the lpt driver) as interrupt storms.
 >
 >> doesn't matter what you set in the BIOS or whatever, any gray or colormode 
 >> on
 >> 5.3 is that inacceptable slow
 >> 
 >> using the exactly same printer and port settings on 5.2.1 or 4.11 brings 
 >> you
 >> back to the expected printing speed
 >
 > FreeBSD-5.2 and FreeBSD-current have different bugs in interrupt storm
 > detection and handling.  In at least some versions, the bugs make printers
 > go even slower if an interrupt storm is misdetected for them, but
 > misdetection is apparently rarer.
 >
 > FreeBSD-4 doesn't have interrupt storm detection, so any problems with
 > printer speed are local to the driver.
 >
 > Bruce
 >
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 
>Unformatted:
