CONFIG_PARPORT_PC_FIFO=y causes slow/stuttering printing through parallel port

Bug #339752 reported by wczimmerman
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Leann Ogasawara
Precise
Won't Fix
High
Unassigned
Quantal
Won't Fix
High
Unassigned
Raring
Fix Released
High
Leann Ogasawara

Bug Description

Running current patch level 8.10. Printer is a HP 540 on the parallel port. In CUPS, when selecting the auto detected printer I only have the LPT printer available. Printing to this device using any PPD (HPIJS, PL3, etc) results in slow printing output or, sometimes, even a complete error state on the printer. Booting the same machine up on a LiveCD of Jaunty (Alpha 4) CUPS shows 2 available printers: the first on the LPT port, the second on parport0. Selecting the parport printer (using the hp URI in CUPS) while in the LiveCD allows all printing to function normally. I have verified that all the parport, lp, and ppdev modules are installed.

Related branches

CVE References

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

I am experiencing the same behaviour as wczimmerman described under Ubuntu 12.04. My printer is dot matrix printer (POS printer) Star SP742. If I am trying to print through /dev/parport0 printer is fast and works without any hassles. Otherwise through /dev/lp0 it's very slow and not smooth.

Tested also under openSUSE 12.2 (kernel 3.4.6; doesn't work too) and CentOS 6.3 (kernel 2.6.32 -

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Sorry for previous post - it was sent earlier than I want it to be sent. So here it continues:

Under CentOS 6.3 printer works well and printing is smooth. Another useful info can be found here in ubuntu forums: http://ubuntuforums.org/showthread.php?p=12294802 (they describe the same issue).

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

It is not a CUPS issue because printing from command line without CUPS assistance (e.g. echo "some longer text here" > /dev/lp0) is slow too.

affects: cups (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Confirmed
summary: - (Intrepid) Missing parport printer in CUPS
+ Slow/stuttering printing through parallel port
Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Re: Slow/stuttering printing through parallel port

The device special files, like /dev/lp0 are provided by the kernel, so the problem must be a kernel bug, assigning to the kernel ...

affects: ubuntu → linux (Ubuntu)
Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Tested today under the newest Ubuntu 12.10 and still no change :-/

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Tested under Fedora 17 (kernel 3.3.4) and prints well without any problems. Seems printing via parallel port under Redhat based system works okay but openSuse and Ubuntu cannot handle this well.

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Seems I am very close to resolving this bug. I've done some deep testing today under following OSes (all are in the newest version):
1) CentOS 6.3
2) Fedora 17
3) openSUSE 12.2
4) Ubuntu 12.04

Under all 4, there is the same ownership of /dev/lp0 and /dev/parport0 (owner root/group lp, permissions 660), BUT I have found the difference between Red Hat based systems (where the parallel printer works well) and the others (Ubuntu and openSUSE - where id doesn't work well). The output of "dmesg|grep parport" for Red Hat based is:

[ 7.522714] parport_pc 00:06: reported by Plug and Play ACPI
[ 7.522769] parport0: PC-style at 0x278 (0x678), irq 5 [PCSPP,TRISTATE]
[ 45.177790] lp0: using parport0 (interrupt-driven).

however Ubuntu and openSUSE dmesg "dmesg|grep parport" says this:

[ 21.205326] parport_pc 00:06: reported by Plug and Play ACPI
[ 21.205380] parport0: PC-style at 0x278 (0x678), irq 5, using FIFO [PCSPP,TRISTATE,COMPAT,ECP]
[ 21.326415] lp0: using parport0 (interrupt-driven).

So the diffrence between those two seems to be between enabling and disabling FIFO. I've also looked at kernel configure files for Fedora 17 and Ubuntu 12.04 and I am posting the important section here:

Ubuntu 12.04 kernel configuration file (section PARPORT):
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
CONFIG_PARPORT_PC_FIFO=y
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_PC_PCMCIA=m
# CONFIG_PARPORT_GSC is not set
CONFIG_PARPORT_AX88796=m
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y

Fedora 17 kernel configuration file (section PARPORT):
# Parallel port support
#
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_PC_PCMCIA=m
CONFIG_PARPORT_1284=y
# CONFIG_PARPORT_AX88796 is not set

CONFIG_ACPI_PCI_SLOT=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI_IBM=m

I am not so experienced to recompile the kernel with option CONFIG_PARPORT_PC_FIFO=n on my own so by this post I would like to please someone to do this for us. Or please post here a guide how to quickly recompile the kernel with changed parameter CONFIG_PARPORT_PC_FIFO. Many thanks to kernel team!

summary: - Slow/stuttering printing through parallel port
+ CONFIG_PARPORT_PC_FIFO=y causes slow/stuttering printing through
+ parallel port
tags: added: patch
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This is a small patch which fixes and important functionality and also has no regression potential as this configuration is used for years in other distributions. Therefore I suggest to roll an SRU for Quantal and for Precise LTS of it.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
milestone: none → quantal-updates
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Pavel, thank you very much for the investigations and the patch.

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Till, thanks for your quick cooperation. It was a joy for me to get this fixed ASAP and now I'm waiting for a Precise update :-)

Changed in linux (Ubuntu Precise):
status: New → Triaged
Changed in linux (Ubuntu Quantal):
status: New → Triaged
Changed in linux (Ubuntu Precise):
importance: Undecided → High
Changed in linux (Ubuntu Quantal):
importance: Undecided → High
Changed in linux (Ubuntu Quantal):
milestone: none → quantal-updates
Changed in linux (Ubuntu Precise):
milestone: none → precise-updates
Changed in linux (Ubuntu Raring):
milestone: quantal-updates → none
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I'll build Precise, Quantal and Raring test kernels with this patch. I'll post a link to them shortly.

tags: added: raring
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Fixes this bug" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

I am sorry I've hidden my comment 8 by mistake (it contains the patch). Is there any way how to show it again?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Precise, Quantal and Raring test kernels are available for testing. Can you download each of the kernels and confirm that this bug is resolved? The kernels can be downloaded from:

Precise: http://people.canonical.com/~jsalisbury/lp339752/precise
Quantal: http://people.canonical.com/~jsalisbury/lp339752/quantal
Raring: http://people.canonical.com/~jsalisbury/lp339752/raring

These are 64 bit kernels. I can also build 32 bit kernels if needed.

Thanks in advance!

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Joseph I actually don't know what to test. I've already recompiled the newest original Ubuntu 12.04 kernel (3.2.0-32-generic-pae) with ONLY ONE change (CONFIG_PARPORT_PC_FIFO is not set) and everything works as expected (like under Red Hat based systems).

My box (Ubuntu 12.04):
$ uname -a
Linux parizek 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 i686 i686 i386 GNU/Linux

But if you really want me to test each release I can download and test them via Live-CD. In this case please provide 32bit kernels.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I uploaded 32 bit test kernels.

It would be helpful if you could test the raring test kernel:
Raring: http://people.canonical.com/~jsalisbury/lp339752/raring

It would be good to confirm the patch fixes this bug with this test kernel.

It would also help if the Quantal and Precise test kernels could be tested as well. If they fix this bug, an SRU request can be submitted for the patch in those stable releases.

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Joseph: All 32bit kernels tested and works as expected. Printer works great. You can push them as regular updates.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

There may be an alternative to changing the kernel config option. You may be able to pass some parameters to the parport_pc module to disable FIFO.

Can you try loading the module with the following parameters:
parport_pc io=0x378 irq=7 dma=3

Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Joseph, I have tried what you advised and kernel says this:

[ 784.474354] parport 0x378 (WARNING): CTR: wrote 0x0c, read 0xff
[ 784.474360] parport 0x378 (WARNING): DATA: wrote 0xaa, read 0xff
[ 784.474362] parport 0x378: You gave this address, but there is probably no parallel port there!
[ 784.474382] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]

In addition I cannot print through parallel port (/dev/lp0) at all. If I type something like echo "abc" > /dev/lp0 the printer does nothing.

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Hey, any change here? I've already provided a patch, tested it - everything worked fine. So what's the problem? Thanks

tags: added: precise quantal
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can someone of the kernel developers please apply this little patch? It would be very helpful for many users and I do not get bug reports for something for which the fix is already available. Thanks.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Applied to Raring.

Changed in linux (Ubuntu Raring):
assignee: nobody → Leann Ogasawara (leannogasawara)
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.5 KiB)

This bug was fixed in the package linux - 3.8.0-18.28

---------------
linux (3.8.0-18.28) raring; urgency=low

  [ Andy Whitcroft ]

  * (debian) fix internal linkage for separated header packages
    - LP: #1165259

  [ Gavin Guo ]

  * SAUCE: Bluetooth: Add support for Broadcom 413c:8143
    - LP: #1166113

  [ John Johansen ]

  * SAUCE: (no-up) apparmor: Fix quieting of audit messages for network
    mediation
    - LP: #1163259

  [ Kamal Mostafa ]

  * SAUCE: (no-up) drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13
    backlight
    - LP: #1162026, #1163720

  [ Leann Ogasawara ]

  * [Config] Disable CONFIG_PARPORT_PC_FIFO
    - LP: #339752

  [ Martin Pitt ]

  * SAUCE: (no-up) mac80211_hwsim: Register and bind to driver
    - LP: #1166250

  [ Paolo Pisati ]

  * [Config] RTC_DRV_PL031=y

  [ Stefan Bader ]

  * (debian) Abort build on unresolved symbols
    - LP: #1166197

  [ Tim Gardner ]

  * [Config] Add libceph to inclusion list
  * [Config] Drop all inclusion list modules with unsatisfied dependencies
  * SAUCE: (no-up) Remove emi62 files duplicated in linux-firmware
  * SAUCE: (no-up) Remove emi26 files duplicated in linux-firmware
  * SAUCE: (no-up) Remove whiteheat files duplicated in linux-firmware
  * Release Tracking Bug
    - LP: #1168040

  [ Upstream Kernel Changes ]

  * TTY: do not update atime/mtime on read/write
    - LP: #1097680
    - CVE-2013-0160
  * KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions
    (CVE-2013-1797)
    - LP: #1158258
    - CVE-2013-1797
  * KVM: Fix bounds checking in ioapic indirect register reads
    (CVE-2013-1798)
    - LP: #1158262
    - CVE-2013-1798
  * drm/i915: HDMI/DP - ELD info refresh support for Haswell
    - LP: #1011438
  * ALSA - HDA: New PCI ID for Haswell ULT
    - LP: #1011438
  * ALSA: hda - Support rereading widgets under the function group
    - LP: #1011438
  * ALSA: hda - Add fixup for Haswell to enable all pin and convertor
    widgets
    - LP: #1011438
  * libata: fix DMA to stack in reading devslp_timing parameters
    - LP: #1031173
  * dmaengine: dw_dmac: remove CLK dependency
    - LP: #1031163
  * dmaengine: dw_dmac: Enhance device tree support
    - LP: #1031163
  * dmaengine: dw_dmac: amend description and indentation
    - LP: #1031163
  * dw_dmac: change dev_printk() to corresponding macros
    - LP: #1031163
  * dw_dmac: don't call platform_get_drvdata twice
    - LP: #1031163
  * dw_dmac: change dev_crit to dev_WARN in dwc_handle_error
    - LP: #1031163
  * dw_dmac: introduce to_dw_desc() macro
    - LP: #1031163
  * dw_dmac: absence of pdata isn't critical when autocfg is set
    - LP: #1031163
  * dw_dmac: check for mapping errors
    - LP: #1031163
  * dw_dmac: remove redundant check
    - LP: #1031163
  * dw_dmac: update tx_node_active in dwc_do_single_block
    - LP: #1031163
  * dma: dw_dmac: add dwc_chan_pause and dwc_chan_resume
    - LP: #1031163
  * dmaengine: introduce is_slave_direction function
    - LP: #1031163
  * dmaengine: add possibility for cyclic transfers
    - LP: #1031163
  * dma: dw_dmac: check direction properly in dw_dma_cyclic_prep
    - LP: #1031163
  * dma: ep93xx_dma: reuse is_slave_direction helpe...

Read more...

Changed in linux (Ubuntu Raring):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Tomi Leppänen (tomin) wrote :

Will this be fixed in Precise (12.04)? In which version? I'm using Ubuntu 12.04 LTS at work and we are using HP LaserJet 2100. We are going to use LTS version and therefore we need this to be fixed in the 3.2 kernel.

Currently 3.2.0-45 configs don't seem to have the patch:
$ grep PARPORT_PC_FIFO /boot/config-3.2.0-45-generic
CONFIG_PARPORT_PC_FIFO=y

Thank you.

Revision history for this message
Pavel Šefránek (pavelsefranek) wrote :

Tomin: It's actually a kernel bug - if you manually turn DMA on in your BIOS then printer will work seamlessly. So there's need to be automatic kernel decision when to turn FIFO on/off (depending on your BIOS DMA option). I've filled an upstream bug here: https://bugzilla.kernel.org/show_bug.cgi?id=56721

Tomin please try to turn DMA on for you parallel port and tell us if this solved your issue.

Revision history for this message
Tomi Leppänen (tomin) wrote :

BIOS settings for internal parallel port are:
Parallel Port Address 378
Parallel Port Mode ECP
ECP Mode DMA Channel DMA3

But I'm using an external card because there is no physical port on the motherboard.
$ lspci |grep -i parallel
03:00.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)

The printer works fine on Windows XP.

Revision history for this message
Tomi Leppänen (tomin) wrote :

I got it working.
$ cat /etc/modprobe.d/hp_laserjet_2100.conf
options parport_pc io=0xec00 irq=19 dma=3

Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Closing unsupported series nomination.

This bug was nominated against a series that is no longer supported, ie quantal. The bug task representing the quantal nomination is being closed as Won't Fix.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu Quantal):
status: Triaged → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in linux (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.