# HP DeskJet 5150: only prints one document! [RESOLVED!]

## LMCBoy

Hello,

Sorry to post about my printer again, but this is just totally bizarre, and I am hoping someone can help.  I posted earlier that I couldn't get my HP DeskJet 5150 to print, and that I solved it by selecting the "HP Deskjet series" driver instead of the "HP New Deskjet series" driver.  Well, it turns out that wasn't the problem after all.

I can make it print with either driver, but it will only print one document!  After that, the power switch LED blinks, and any jobs I try to add later are marked as "Processing..." in the KDE Print Jobs tool, but the printer never prints them.  The Cups web interface "Printers" page says:

```

Description: HP DeskJet 5150

 Location: 

 Printer State: processing, accepting jobs. 

"Printing page 1, 26% complete..." 

Device URI: usb:/dev/usb/lp0 

```

The power LED eventually stops blinking, but the printer will not print the job.  I can get it to print by Stopping the printer in the Cups web tool, cycling the printer power, and then Starting the printer in the Cups tool.  Either of those steps on its own (cycling power on printer / Stopping and Starting in the webtool) does nothing.

Here's one interesting thing: when I send the second Job that doesn't print, my /var/log/cups/error_log shows the message:

```

[Job 21] Media tray empty!

```

21 is the ID of the non-printing job.  My media tray is *not* empty!  How can I inform the printer of this without doing the Stop/powercyle/Start dance between every Job?

Gah, what a PITA this is...thanks for any help!

Edit: I resolved this by upgrading my kernel.  The priinter is working perfectly with kernel 2.6.7-rc3-love2.

----------

## LMCBoy

I followed the instructions in this thread, which seemed to fix a similar problem for other people:

```

 1) /etc/init.d/cupsd stop 

 2) emerge unmerge cups foomatic hpijs ghostscript 

 3) USE="cups foomaticdb" emerge cups foomatic hpijs ghostscript 

 (according to the web page, this order is important  ) 

 4) etc-update 

 5) /etc/init.d/cupsd start 

```

After doing this, I see a driver listed for my specific model ("HP DeskJet 5150"), rather than a generic "HP Deskjet series" driver I saw before.  I am also getting much better quality printing now.  However, I am still getting the incorrect "Media tray empty!" messages, and I am still only able to print one Job successfully.  This is getting really frustrating...

----------

## adastra1982

I've had it (hpdj5150) working for me some time ago, but I've screw up something since then...

(through doing 'emerge -U world' thoughtlessly  :Embarassed:   - DON'T do that at home ...to often!   :Rolling Eyes: )

...I've also had problem with printing only one doc., "media not ready" or something similiar - like you! - so I followed *your* guide!

I've done the following:

Include the following in my USE flags: cups foomatic foomaticdb.

```
/etc/init.d/cupsd stop

emerge -C cups foomatic hpijs ghostscript
```

But i've did the following with ACCEPT_KEYWORDS="~x86":

```
emerge -av cups  foomatic hpijs ghostscript
```

..of course it really emerged ghostscript *before* hpijs due to some dependency  :Razz: ...

Actually it emerged cups-1.1.20, foomatic-3.0.1, hpijs-1.5 & ghostscript-7.07.1-r1. Write it down prehaps - it may be one of the really-not-so-many working combinations!.

All that was left to following the guide was:

```
/etc/init.d/cupsd start
```

Then I opened http://localhost:631/ in my browser -> manage printer -> add printer -> name: "hpds5150" (!!! it can actually matter what you type here!  :Shocked:  ...don't ask me why, but I've read it somewhere in *official* cups-FAQ!), the rest - whatever -> usb printer #1 (5150) ->  HP (*not* "HEWLETT-PACKARD"!) -> first - I have *double*, exactly the same positions here! - "HP DeskJet 5150 Foomatic/hpijs (recommender) (en)" - finito!

It' just works perfecty from now on!  :Very Happy: 

(Sorry for writing all this trivial stuff  :Rolling Eyes:  - allthough I think *you* have already managed too make it work for you, but I believe there are many *forums-searchers* out there seeking help with their dj5150... ...well, at I was one until two hours ago!   :Cool: )

EDIT:

I actually've done something more: added myself & my root-me to the "lp" group, changed rights to /dev/usb/lp0 to 660 and changed its owner to root:lp ...and perhaps something else I can't remember right now (but I think that's all).

EDIT:

Added USE flags note.

----------

## LMCBoy

Hey adastra,

Thanks for posting a more complete guide; hopefully it will be useful for other 5150 users.

I repeated the installation, following your guide.  The only differences, AFAICT, are the "~x86" keyword, and naming my printer "hpds5150".  I verified that the versions of each package match what you posted.

Unfortunately I am still having the same problem.  It will print one job almost all the way through.  Right before the job is finished, printing stops.  The print queue is empty, but the light on my printer is blinking.  This continues for at least 5 full minutes before it *finally* prints the last 2 lines of the job.

After that, any subsequent jobs are completely ignored by the printer, and remain in the queue with the status label "Processing...".  And of course, I get the dreaded "Media Tray Empty!" message in the printers tab of the CUPS web interface.

In short:    :Crying or Very sad: 

Out of curiosity, what kernel are you using, and what version of libusb?

----------

## silverfix

have you solved your trouble?

i've too   :Crying or Very sad: 

----------

## adastra1982

 *LMCBoy wrote:*   

> Hey adastra,
> 
> (...)
> 
> In short:   
> ...

 

Arghhh, me too!!! I've got the same problem again!  :Evil or Very Mad:  What the heck have I broken this time?

 *LMCBoy wrote:*   

> 
> 
> Out of curiosity, what kernel are you using (...)
> 
> 

 

I've been using some 2.6.5-love release then. Now I switched to (probably) more stable development-sources (2.6.4). I've got pure udev system now, but IMHO the problem isn't connected to that.

 *LMCBoy wrote:*   

> 
> 
> (...) and what version of libusb?
> 
> 

 

Strange... I haven't had it earier and I still don't have it merged now:

```

bet-pc adastra # etcat -v libusb

[ Results for search key           : libusb ]

[ Candidate applications found : 3 ]

 Only printing found installed programs.

*  dev-libs/libusb :

        [   ] 0.1.7 (0)

        [   ] 0.1.7-r1 (0)

        [M~ ] 0.1.8 (0)

```

...should I?  :Embarassed: 

----------

## silverfix

hey hey hey... i've solved now   :Cool: 

install vanilla-sources-2.6.1 and enjoy !!   :Razz: 

----------

## adastra1982

 *silverfix wrote:*   

> hey hey hey... i've solved now  
> 
> install vanilla-sources-2.6.1 and enjoy !!  

 

How about 2.6.3?

Have you tried it previously?

Can you post your '.config' file?

I was about to reboot my box -> 2.6.3, when you wrote this...  :Rolling Eyes: 

I don't want to downgrade from 2.6.5 to much...  :Embarassed: 

----------

## Smoothhound

I've stumbled accross this thread and it has reminded me of having the same problems with my 5150 - However I thought the problem was intermittent and this was probably because I was following love sources and upgrading my kernel almost daily.

I'm running 2.6.4-rc1-love2 at the moment and everything is working perfectly. I have tried later loves but suffer nforce2 related lockups on those so I can't say if the problem continues to be fixed in the love series

I am not at my machine so I can't give you an extract of my config at the moment but IIRC I didn't have to do anything out of the ordinary - just enabled usb printer support.

When it's working it's a damn fine printer for the price!

----------

## adastra1982

 *Smoothhound wrote:*   

> I've stumbled accross this thread and it has reminded me of having the same problems with my 5150 - However I thought the problem was intermittent and this was probably because I was following love sources and upgrading my kernel almost daily. (...)
> 
> 

 

 :Exclamation:  I've been doing the same thing and (as I wrote few post earier) dj5150 actally worked ok for some time.

...but I also recompiled half of my system in the meantime and, until now, never even thought' that my dj5150 problems were connected to the kernel...  :Rolling Eyes: 

 *Smoothhound wrote:*   

> 
> 
> (...)
> 
> I'm running 2.6.4-rc1-love2 at the moment and everything is working perfectly. I have tried later loves but suffer nforce2 related lockups on those so I can't say if the problem continues to be fixed in the love series (...)
> ...

 

So you're saying that my must-compile-kernel-every-day sickness can  be cured by buying nforce2?   :Wink:   :Laughing: 

Seriously, I'll try 2.6.4-rc1-love2 before 2.6.1 (haven't finished downloading yet..  :Rolling Eyes: ) - thanks for the tip!   :Smile: 

 *Smoothhound wrote:*   

> 
> 
> (...)
> 
> [cut]
> ...

 

I agree ...but I have this nasty feeling, that Windows drivers provide better quality of prints...  :Confused: 

[EDIT] Compiling 2.6.4-rc1-love2....

I think it would be Good Thing (tm) to put all this info into a comrehensive "deskjet 5150 (and other dj's, probably) + devfs/udev HOW-TO". I'll post a link here, when I'm done.

[EDIT] Aaaarrrgh!!!  :Evil or Very Mad:   It doesn't work!!!

Forget about the HOW-TO stuff.

I'll try newest love-sources now.

----------

## LMCBoy

My HP Deskjet 5150 now prints multiple jobs without a hitch!  The only thing I changed was upgrading the kernel to 2.6.7-rc3-love2 (was 2.6.3-mm2).

Woohoo!   :Smile: 

----------

## adastra1982

Great! My dj5150 works flawlessly too now with love-sources-2.6.7-rc3-love1.  :Smile: 

(I switched recently from love-2.6.5-<something> with some fear that my dj5150 will stop working correctly, but it didn't.

...So, yeah: it actually worked for me with an older kernel than 2.6.7 but I kinda forgot to post info about it here...  :Rolling Eyes: ).

----------

## Sanderfox

adastra1982: On the point I have to select my driver I can't see "HP DeskJet 5150 Foomatic/hpijs (recommender) (en)" in the list, any clue on what I could have forgotten to do ?

Sanderfox

----------

## adastra1982

 *Sanderfox wrote:*   

> adastra1982: On the point I have to select my driver I can't see "HP DeskJet 5150 Foomatic/hpijs (recommender) (en)" in the list, any clue on what I could have forgotten to do ?

 

To set your USE flags ('cups', 'foomatic' and 'foomaticdb', IIRC), perhaps?

I'll add it to my mini-how-to.

----------

## Sanderfox

Thanks, it worked  :Very Happy: 

----------

## Kwatoko

 *Quote:*   

> (Sorry for writing all this trivial stuff Rolling Eyes - allthough I think *you* have already managed too make it work for you, but I believe there are many *forums-searchers* out there seeking help with their dj5150... ...well, at I was one until two hours ago! Cool)
> 
> 

 

thank you for doing that  :Smile: 

worked out lovely.

had to enable ohci support in kernel first though, otherwise the printer wasn't recognised.

----------

