# [solved] Printer stopped working

## thom_raindog

Howdie,

I am stumped here. My canon IP 4300 was working just fine for the longest while. Now as off mid last week it went into hibernation. Nothing I do can make it print anything. As far as I know I changed nothing, did nothing.

I booted into a Kubuntu 8.10 live CD and the printer works like a charm. Good thing, as that means it's not broken. Bad thing as that means the bug is somewhere in my system.

I removed the printer, went through the cups page on gentoo-wiki.org. Cups automatically recognized the printer, I added it, all dandy. But still no printouts. All the jobs are on "queued" as soon as I start them.

Where else can I start looking?Last edited by thom_raindog on Sun Dec 28, 2008 10:14 am; edited 1 time in total

----------

## pappy_mcfae

Look at /var/log/cups/*.log to see what's failing and when. 

Have you done any recent updates? Is the printer local or networked? Have you tried printing with all apps, or just certain ones?

Blessed be!

Pappy

----------

## thom_raindog

/var/log/cups/error_log shows:

```

I [04/Dec/2008:08:24:03 +0100] [Job ???] Request file type is application/postscript.

I [04/Dec/2008:08:24:03 +0100] [Job 127] Adding start banner page "none".

I [04/Dec/2008:08:24:03 +0100] [Job 127] Adding end banner page "none".

I [04/Dec/2008:08:24:03 +0100] [Job 127] File of type application/postscript queued by "thom".

```

access_log only shows a long line of "OK"s.

and thats it...

I update system and world about once a week on this maching. I am not sure if any cups-related updates came in. I tried the test page from kde control center, an odt file and a pdf, no luck. I printed pdf and odt just fine from the live system

----------

## pappy_mcfae

The only thing I recall in the last week that could have anything to do with that would be samba. But that would only be a problem if the printer is non-local. My print server still works after that update.

To enable troubleshooting, in /etc/cups/cupsd.conf, change LogLevel to debug, and try again.

Blessed be!

Pappy

----------

## thom_raindog

No further messages seem to appear..

But I just noticed that when I bring up localhost:631 and click on printers my printer is listed, but next to its name it says;

```

"Filter "pstocanonij" for printer "Canon_iP4300_USB_1" not available: No such file or directory"
```

That's bad, isn't it?

What do I do about that?

Edit: I inserted a new printer using a ppd-file that i KNOW worked before, no luck, still the same message, btw.. strange?

----------

## pappy_mcfae

 *thom_raindog wrote:*   

> No further messages seem to appear..
> 
> But I just noticed that when I bring up localhost:631 and click on printers my printer is listed, but next to its name it says;
> 
> ```
> ...

 

Yes, that definitely dwells outside the realm of good.  :Smile: 

 *Quote:*   

> What do I do about that?

 

Add, or make sure you have the following USE flags set up in your /etc/make.conf file: cups foomatic foomaticdb ppds samba. Recompile all the foomatic packages (emerge -av foomatic-db foomatic-db-engine foomatic-db-ppds foomatic-filters foomatic-filters-ppds), then emerge -av cups, and retry.

 *Quote:*   

> Edit: I inserted a new printer using a ppd-file that i KNOW worked before, no luck, still the same message, btw.. strange?

 

Strange? No. Not at all

Somehow, one or more of the files (at least the filter file listed in the above error) have become corrupted. The only way to get said files back is to install its package again. You might not need all those foomatic goodies, but for sure you need the ones with filters. Unless you absolutely don't have the real estate on your hard drive, they're good files to have lying about.

Blessed be!

Pappy

----------

## thom_raindog

Thanks for your help.

I shall try that as soon as I get a chance.. 

Will report back after that..

----------

## thom_raindog

.....aaaaaaand:nothing. Still the very same situation...

----------

## pappy_mcfae

Doing a bit more research, it seems that those drivers aren't supported in portage. It looks as if you're going to have to do some googling to get things in a working state. Googling for "pstocanonij" turned up some interesting items you might want to check.

Blessed be!

Pappy

----------

## thom_raindog

Very strange, seeing that everything worked no more then 3 weeks ago.. no googeling needed back in the days..

----------

## pappy_mcfae

Here is a link to an old ebuild. Set it up as /usr/local/portage/net-print/cnijfilter-2.60.ebuild. Copy all the files, and give it a shot. 

Blessed be!

Pappy

----------

## jcat

Maybe...

Re-emerge cups

```
emerge -1av cups
```

After you upgrade cups, you're supposed to re-emerge the associated packages as well, so you might as well do that

```
FEATURES=-collision-protect emerge -va1 $(qfile -qC /usr/lib/cups /etc/cups | sed "s:net-print/cups$::")
```

Then restart cups

```
/etc/init.d/cupsd restart
```

Then try a test print, as root, from the command line, for example

```
lp /etc/hosts
```

Check the queue status with

```
lpstat -t
```

If cups still isn't working, cancel an pending jobs, then put it in debug mode by changing /etc/cups/cupsd.conf line

```
LogLevel info
```

to

```
LogLevel debug
```

restart cups again, then submit another job and check the log again for more info.

Hope that helps  :Smile: 

Post back and let us know..

Cheers,

jcat

----------

## thom_raindog

I am sorry to say, it did nothing.

Using lp to print /etc/hosts I noticed that there is no default location set, so I had to add the name of my printer to the command to make it work. Is that some pointer? I had already set the debug level since pappy_mcfae mentioned that earlier, but nothing shows up that wasn't there before..

----------

## jcat

What version of net-print/cnijfilter are you using?

And can we see the output of 

```
lpstat -t
```

 with some jobs in the queue?

Cheers,

jcat

----------

## pappy_mcfae

Have you tried the ebuild I posted or not?

Blessed be!

Pappy

----------

## overkll

I ran into a similar problem problem - no file found, but slightly different.

There was an update a while back that removed `gnutls` from the desktop profile use flags.  I didn't have gnutls in my /etc/make.conf, but cups was orignally built with gnutls.

After a cups update with -gnutls, the damn thing wouldn't print.  Adding gnutls as a cups use flag in /etc/portage/package.use

```
echo "net-print/cups gnutls" >> /etc/portage/package.use
```

and recompiling solved the problem.  It was that or rebuild everything with -gnutls and revdep-rebuild.  I didn't want to have to recompile "kdelibs", since it's a slow computer.

Don't know if it'll help you though, since you have a canon and those things are notorious for not working right unless one BUYS the binary driver.

----------

## thom_raindog

 *jcat wrote:*   

> What version of net-print/cnijfilter are you using?
> 
> 

 

None. no package with that name can be found by portage.

 *Quote:*   

> 
> 
> And can we see the output of 
> 
> ```
> ...

 

As per your wish  :Wink: 

```

scheduler is running

no system default destination

device for Canon_iP4300_USB_1: usb://Canon/iP4300

Canon_iP4300_USB_1 accepting requests since Fri Dec  5 12:44:48 2008

printer Canon_iP4300_USB_1 disabled since Fri Dec  5 12:44:48 2008 -

        Filter "pstocanonij" for printer "Canon_iP4300_USB_1" not available: Nosuch file or directory

Canon_iP4300_USB_1-139  teri-belle      126976   Wed Dec 10 22:14:19 2008

Canon_iP4300_USB_1-140  root              2048   Thu Dec 11 23:18:49 2008

```

 *pappy_mcfae wrote:*   

> Have you tried the ebuild I posted or not?
> 
> 

 

I will admit that I have not. I am both a busy and a lazy person, not a good combination, I know  :Wink:  With the appearance of two more stalwart fighters for the Greater Good - aka my printer working again - I had simply dared to hope I might get around that task. Especially since it once worked just fine without that. I WILL resort to that should it come down to that..  :Smile: 

 *overkll wrote:*   

> 
> 
> Don't know if it'll help you though, since you have a canon and those things are notorious for not working right unless one BUYS the binary driver.

 

Well, thank you for trying, overkll, but adding gnutls and reemerging did nothing...

It just feels very wrong to have each and every job I sent to my printer be queued...

----------

## jcat

 *thom_raindog wrote:*   

> 
> 
> None. no package with that name can be found by portage.
> 
> 

 

I just realised it's from my local overlay, but the cnijfilter ebuilds can be downloaded from Bugzilla should you choose that route.

I presume then, since you're not using that driver, you're using custom printer driver, or maybe a generic one?

 *thom_raindog wrote:*   

> 
> 
> As per your wish 
> 
> Code:
> ...

 

This indicates that your printer is disabled.  Not sure whether that's a symptom or the cause, but it's worth doing

```
cupsenable Canon_iP4300_USB_1

/etc/init.d/cupsd restart
```

If not, then we can try and get you going with the cnijfilter option  :Smile: 

Cheers,

jcat

----------

## jcat

Sorry, I just noticed the part that said

```
Filter "pstocanonij" for printer "Canon_iP4300_USB_1" not available: Nosuch file or directory
```

Can you actually find this file?  does it look ok?  Are the permissions correct?

It seems that is the source of your problems.

Cheers,

jcat

----------

## thom_raindog

The printer won't be enabled. No error, but also no effect.

slocate won't find that file anywhere (ran updatedb just before it to make sure)

Edit: Just to make sure I did nothing wrong I also used find, nothing came up..

----------

## jcat

Can we see the output of 

```
cat /etc/cups/printers.conf
```

and

```
cat /etc/cups/printers.conf.O 
```

Cheers,

jcat

----------

## thom_raindog

 *jcat wrote:*   

> Can we see the output of 
> 
> ```
> cat /etc/cups/printers.conf
> ```
> ...

 

```

# Printer configuration file for CUPS v1.3.9

# Written by cupsd on 2008-12-12 08:57

<Printer Canon_iP4300_USB_1>

Info Canon iP4300

Location Local Printer

DeviceURI usb://Canon/iP4300

State Idle

StateTime 1229068670

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>

```

 *Quote:*   

> 
> 
> ```
> cat /etc/cups/printers.conf.O 
> ```
> ...

 

```

# Printer configuration file for CUPS v1.3.8

# Written by cupsd on 2008-12-05 12:44

<Printer Canon_iP4300_USB_1>

Info Canon iP4300

Location Local Printer

DeviceURI usb://Canon/iP4300

State Stopped

StateMessage Filter "pstocanonij" for printer "Canon_iP4300_USB_1" not available: No such file or directory

StateTime 1228477488

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>

```

I also noticed that kword or kspread won't start.

output for kword on the console:

```

kword: error while loading shared libraries: libkdeprint.so.4: cannot open shared object file: No such file or directory

```

which again points to a printer file missing.. wth is going on here?

----------

## jcat

Hmmm, have you tried a 

```
revdev-rebuild
```

 lately?

Cheers,

jcat

----------

## thom_raindog

Did one just now, no packages came up... I did several emerge --sync && update system && update world by now as well (which I pretty much always follow up with a revdep-rebuild), none of that helped..

----------

## thom_raindog

Now, since the printer works just fine under the LiveDVD, is it possible to just copy the settings and drivers needed from there to my Gentoo system? I certainly could use a USB-stick to transport files between the systems.

Is that possible? What files would I like to copy? Any ideas?

----------

## jcat

Hmm, well the error message is concerning a missing filter file.  Have you tried searching for that file on the live CD.

There seem to be some filter files in 

```
/usr/libexec/cups/filter
```

BTW  You don't need a USB stick.  Just mount one of your system partitions, and copy the files directly if you like,

Cheers,

jcat

----------

## thom_raindog

Yes, I thought of that mounting thing after I posted, thanks  :Wink: 

There is no /usr... to be found when I just mount the DVD. (It's the latest Kubuntu 8.10 btw)

So I booted into it, and there are filters in /usr/lib/cups/filters, but not the one my system is missing.

I did a 

```

find / pstocanonij

```

which came up empty..

What am I missing here?

----------

## thom_raindog

Thank the Light for quiet sunday mornings!

I uninstalled the printer, went through the Gentoo Printing Guide (again!), added the printer and voila! It works again, like a charm.

I can't say what exactly did the trick, that's a bit of a bummer. I mostly REMOVED stuff from my kernel setup, and I used the printer driver that was recommended on linuxprinting (gutenprint) but I feel like I tried all of that before. Well, anyhow, things are fine again here, and that's what count's for now  :Smile: 

----------

## jcat

Hey, that's excellent news.  Sometimes it's best to just scrap it all and start again!    :Smile: 

Even if you don't find out why it's wasn't working, at least it's working now.

Cheers,

jcat

----------

