Bug 114353 - /dev/lp0 not present although needed --> cannot print
Summary: /dev/lp0 not present although needed --> cannot print
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Hotplug (show other bugs)
Version: Beta 3
Hardware: x86 SUSE Other
: P5 - None : Blocker
Target Milestone: ---
Assignee: Kay Sievers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 08:25 UTC by Klaus Wagner
Modified: 2005-09-01 15:46 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Wagner 2005-08-31 08:25:48 UTC
Installation: a fresh vanilla SuSE 10.0 beta3 (i586).

My workstation features a printer connected to 1st parallel interface (lp0).
Access fails, though, because of the device file /dev/lp0 is missing.

Printer and its cups queues work properly if

    -  I mknod the correct /dev/lp0 device node manually, or
    -  I manually execute "modprobe lp" (this creates a good /dev/lp0)

but that's not as it is supposed to be. The device node should be
dynamically generated (i.e., without user interaction) as soon as an
application needs it.
Comment 1 Johannes Meixner 2005-08-31 08:36:23 UTC
On my i386 workstation nelson.suse.de (having beta3 installed)
it worked well to print on parallel port printer after installation.

Today (I did a reboot yesterday) I detected that /dev/lp0 is missing.
But for me "modprobe lp" does not create /dev/lp0.
I must additionally do "mknod /dev/lp0 c 6 0".
Comment 2 Klaus Singvogel 2005-08-31 08:46:37 UTC
On the other side, I noticed the same problem today: after reboot on both 
machines /dev/lp0 vanished. A "modprobe lp" was all I needed to do for 
recreation of /dev/lp0 on both machines. Yes, I've connected a printer on 
parallel port on both machines. :-) 
 
So I fully agree, that we have a problem here, as the device nodes aren't 
present after boot, regardless if such a device (printer) exists or not. 
Comment 3 Johannes Meixner 2005-08-31 08:56:54 UTC
Of course I also have a printer connected to /dev/lp0:

nelson:~ # rmmod lp parport_pc parport

nelson:~ # rm /dev/lp0

nelson:~ # modprobe parport parport_pc lp

nelson:~ # dmesg | grep 'parport' | tail -n 4
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
parport0: Printer, Hewlett-Packard HP LaserJet 1220
lp0: using parport0 (interrupt-driven).

nelson:~ # ls -l /dev/lp0
/bin/ls: /dev/lp0: No such file or directory

nelson:~ # mknod /dev/lp0 c 6 0

nelson:~ # echo -en "\rhello\r\f" >/dev/lp0

=> prints "hello" on my LaserJet 1220
Comment 4 Johannes Meixner 2005-08-31 09:08:19 UTC
Directly after a reboot of nelson.suse.de:

nelson:~ # ls /dev/lp0
/bin/ls: /dev/lp0: No such file or directory

nelson:~ # lsmod | egrep 'lp|parport'
usblp                  17024  0 
usbcore               126848  5 usblp,usb_storage,ehci_hcd,uhci_hcd

I.e. no "lp/parport*" modules are loaded and no device node exists
even if a parport printer is connected.

This leads to the known problem (see bug #64412) when printing:

nelson:~ # echo -en "\rhello\r\f" >/dev/lp0

nelson:~ # ls -l /dev/lp0
-rw-r--r--  1 root root 8 Aug 31 11:05 /dev/lp0

Now /dev/lp0 is created as regular file :-(
Comment 5 Johannes Meixner 2005-08-31 09:18:15 UTC
It seems to be a bit random what happens when:
Now "modprobe" creates /dev/lp0 even on my workstation:

nelson:~ # rm /dev/lp0

nelson:~ # modprobe parport parport_pc lp

nelson:~ # ls -l /dev/lp0
crw-rw----  1 root lp 6, 0 Aug 31 11:14 /dev/lp0

nelson:~ # echo -en "\rhello\r\f" >/dev/lp0

=> prints "hello" on my LaserJet 1220
Comment 6 Christian Zoz 2005-09-01 13:36:26 UTC
Seems to be duplicate of bug 113158. Please confirm.
Comment 7 Klaus Wagner 2005-09-01 14:15:31 UTC
On Zert180 there is /etc/sysconfig/hardware/hwcfg-static-printer . Contents:

STARTMODE='auto'
MODULE='lp'

So this might well be. If I understand bug 113158 correctly, this file should
be effective in SL10.0b4, thus solving the present issue.
Correct?
I've just got a beta4 installation running; stay tuned.
Comment 8 Klaus Wagner 2005-09-01 15:04:07 UTC
Looks indeed like in beta4 most of the problem has gone away:

    -  no /dev/lp0 yet right at the end of the installation (the remaining snag)
    -  after rebooting, I get a message:
       Coldplug: cleaning /events hwup: Loading module 'lp'  for device'printer'
       processing events          done
    -  when the bootup is finished, a new /dev/lp0 exists.

For a further test, rebooted into single-user mode ("S") and rm'ed /dev/lp0.
After re-mounting / ro and executing /etc/init.d/boot (the same coldplug msg
appears again), /dev/lp0 is recreated.
Comment 9 Kay Sievers 2005-09-01 15:46:26 UTC
Maybe it's not needed, but I've added /dev/lp[0-3] to the static device list for
now too, to make sure we don't run into trouble here.