Skip to main content
Welcome guest. | Register | Login | Post

setup printer over and over

19 replies [Last post]
Offline
Joined: 2006-06-19

To All:

I'm having a wierd printing problem. The printer
works at setup, but fails after a reboot. I keep
having to initiate the printer setup over and over
if I want to print anything.

----- details -----

I used

KDE control center
-> peripherals
-> printers
-> etc (administrator mode, add printer,...)

to setup this antique canon bjc-1000. Everything
works fine whether I am in KWrite, Oo, etc. I
named the new printer "canonbjc1000".

Reboot (I turn the PC off at night - save energy.)

Printer does not work. So I go back to the KDE
control center, setup-ed another printer and named
the new printer "canonbjc1000_2". Everything
works whether I use "canonbjc1000" (note: the old
one) OR "canonbjc1000_2". In other words,
something in the setup of "canonbjc1000_2" enabled
"canonbjc1000" to work (that got losdt while
rebooting).

Reboot

Printer does not work - "canonbjc1000" and
"canonbjc1000_2". I proceed to slowly add another
printer.

-> administrator mode [screen prompts for root password]
"canonbjc1000" does not work
-> [enter root password]
"canonbjc1000" does not work
-> add: add printer/class [welcome screen pops up]
"canonbjc1000" works!

Apparently the last action is triggering something
that ceases everytime I reboot.

Do you have any clue on what is happening? Any
help/tip/comment would be appreciated.

Sheng-Chieh

tbuitenh's picture
Offline
Joined: 2005-12-21
Maybe the CUPS daemon is

Maybe the CUPS daemon is not started at boot time?

Offline
Joined: 2006-06-19
Is there a way to see if

Is there a way to see if cups is running? I did

ps -ef | grep cups

and got

root 3120 1 0 12:07 ? 00:00:00 cupsd

What is cupsd (the difference between cupsd and cups)?

Sheng-Chieh

libervisco's picture
Offline
Joined: 2006-05-04
cupsd is cups daemon and if

cupsd is cups daemon and if it's running then that might not be the problem. I think that cups merely links to or calls on the cupsd, but don't quote me on that.

It might be that your printer requires and additional daemon for your printer though, which might not be started automatically by default. For example my HP printer has hplip driver which also must be started for the printer to work.

What I do to enable printer support is this:

/etc/init.d/cupsd start && /etc/init.d/hplip start

Although on Ubuntu cupsd seems to be cupsys, but it should be doing the same thing. So, you might be missing the equivalent of that hplip driver loading on startup.

Offline
Joined: 2006-06-19
Thank for replying. First,

Thank for replying.

First, it's a Canon BJC-1000, not an HP model. So hplip won't help
(plus I tried it w/o success). I have

/etc/init.d/cups (<- not cupsd)

According to

/etc/init.d/cups status

CUPS is running. I did tried

/etc/init.d/cups restart

w/o any success.

-----

I also tried

ps -ef > before.txt
ps -ef > after.txt

before and after clicking "add a new printer/class ..."
(the command that causes the printer to work) and found
virtually no difference between the 2 text files.

Are there anything else I should look at?

Sheng-Chieh

a thing's picture
Offline
Joined: 2005-12-20
overwriting CUPS configuration

It sounds like something is overwriting CUPS's configuration. If the configuration is on an ext2 or ext3 filesystem (which it probably is), try running (as root) chattr +i /etc/cups/* to make the CUPS configuration immutable. If you ever need to edit it, (as root) you need to run chattr -i /etc/cups/* first.

libervisco's picture
Offline
Joined: 2006-05-04
I know it's Canon. I meant

I know it's Canon. I meant an equivalent to hplip (it would be called something else for Canon).

Might be what a thing suggests. I've no other ideas at the moment.

Offline
Joined: 2006-06-19
libervisco, I don't see

libervisco, I don't see anything that looks like it's vor Canon.

$ ls /etc/init.d
acpi* dm* lisa* ntpd* sound*
acpid* functions mandrake_consmap numlock* sshd*
alsa* haldaemon* mandrake_everytime* oki4daemon* syslog*
anacron* halt* mandrake_firstime* partmon* udev*
apmd* halt.livecd* martian* portmap* ultrabayd*
apmiser* harddrake* mdadm* powernowd* usb*
atd* hplip* messagebus* pppoe* waproamd*
avahi-daemon* iptables* mtink* resolvconf* wltool*
cpufreq* keytable* netfs* saslauthd* xfs*
crond* kheader* netfs.livecd* single* xinetd*
cups* killall* network* slmodemd*
dkms* laptop-mode* network-up* smb*

I even tried greping, i.e.,

$ cd /etc/init.d
$ grep Canon *
$ grep canon *
$
(nothing found with grep)

a thing, I'm looking your chattr command.

Thank guys!

Sheng-Chieh

Offline
Joined: 2006-06-19
Nope, chattr did not work.

Nope, chattr did not work. I tried

chattr +i /etc/cups/*

and

chattr -R +i /etc/cups/* (recursive throughout the directory)

as root without success.

Any other tip? Anything you suggest me to look at?

Sheng-Chieh

a thing's picture
Offline
Joined: 2005-12-20
clarify problem

Is the problem that the printer isn't there after a reboot, or that it doesn't work after a reboot?

Offline
Joined: 2006-06-19
I don't know. Does lspci

I don't know. Does lspci sees the connection?

The Canon BJC is connected via a parallel port
(2"x3/8" connection with needles on one side
and holes on the other side).

I don't understand the lspci outputs. Is it
seeing the printer?

=====

After reboot but before setting up a new printer.

$ lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

=====

-> (KDE) control center
-> per.
-> printers
-> admin. mode
-> [password]

Printer still does not work.

=====

$ lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

(no change as expected)
=====

-> add -> add new printer/class ...

Printer now works.

=====

$ lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

I see no change. Again, is one of the above lines refer to the printer (again, I
don't understand the lspci outputs)?

Sheng-Chieh

a thing's picture
Offline
Joined: 2005-12-20
not lspci

lspci has nothing to do with this. The printer isn't a PCI card.

Offline
Joined: 2006-06-19
> Is the problem that the

> Is the problem that the printer isn't there after a reboot, or that it doesn't work after a reboot?

Then how is I able to find the answer to your question?

The only thing I can think of is the console output from the lp command. I
get

$ lp code.scr
request id is test-20 (1 file(s))
(code.scr is just a short file)

but nothing prints. Just the job shows in the job queue.

"canonbjc1000" has been setup-ed as default local printer in the KDE control center.

Sheng-Chieh

a thing's picture
Offline
Joined: 2005-12-20
print anything

I mean is the printer still in the KDE control center after a reboot?

Offline
Joined: 2006-06-19
Yes, the printer I setup

Yes, the printer I setup long ago still shows up in the KDE control center. It just doesn't
print including the test printing after a reboot. Again, I have to

-> add
-> add printer/class

to initiate something (whatever it is). Then that printer (I setup long ago)
works.

Thank for brain-storming on this problem.

Sheng-Chieh

Offline
Joined: 2006-03-28
If it's a USB-printer lsusb

If it's a USB-printer lsusb should show up some information.

Offline
Joined: 2006-06-19
reptiler, as mentioned

reptiler, as mentioned earlier, it's a parallel port.

I would love to know what scripts are being called when I
click -> add printer/class. Unfortunately, when KDE
control center is called, it executes

/usr/bin/kcontrol

which is a binary file (can't read). Is there a way to
find out what command(s) is being called by the new
printer/class routines?

Update: The printer section of KDE control center is
executing

/usr/bin/kcmshell

which is also a binary file. Again, is there a way to
find out what command(s) is being called by the new
printer/class routines?

Sheng-Chieh

Offline
Joined: 2006-06-19
Update: kcmshell just opens

Update:

kcmshell just opens a single KDE module. In my case, it's
the printer module, i.e.,

/usr/bin/kcmshell printer

Where are the KDE modules? In specific, the printer module?

Sheng-Chieh

Offline
Joined: 2006-06-19
[solved] setup printer over and over

After bouncing around, the 6th forums, linuxquestion,
someone figured out the problem. So I'll answer my
own question in case someone needs to know.

First he suggested to use lsmod (as root) before and after
the printer setup, i.e.,

lsmod > lsmodbefore.txt

[setup printer]

lsmod > lsmodafter.txt

The two files are almost the same except lsmodafter.txt have

parport_pc 27652 1
lp 12584 0
parport 36392 2 parport_pc,lp

Second, he recommended after reboot typing

modprobe parport
modprobe parport_pc
modprobe lp

and see if printer works. It did!

Third, he recommended to add

parport
parport_pc
lp

into /etc/modprobe.preload so the printer will work after reboot.
The modules in this file initialize for RPM distros (I have PCLinuxOS
2007). For debian, one would add to /etc/modules . So now the
printer works after reboot!

-----

Somehow these modules did not get "permament-ize" while setting up
the printer (whether it is in KDE control center or CUPS).

Sheng-Chieh

libervisco's picture