Author Topic: Problem with cups driver [Solved]  (Read 3181 times)

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Problem with cups driver [Solved]
« on: September 30, 2010, 05:46:54 PM »
I just installed a new HP aio printer model C309g-m. Installation through the Control Center went smoothly. It installed the cups driver and offered a list of printers to choose from that included only the C309a. The C309a seems to be a similar printer with similar features including duplexing (two sided printing).  However, when printing, if you check printer settings, it shows that duplex printing is "off" with the only other option being "ignore". Somewhere during the installation process, there was a note suggesting that the ppd file for the printer may be needed in order to get all printer features.  However, I found that there is a ppd file for the C309a in the /etc/cups/ppd folder (see below). There are several lines in that file referring to "duplex". However, I'm not sure how to interpret what they are saying or how to change them if needed.

I've included only the lines of the ppd file pertaining to duplexing. Otherwise, its too big. As you can see, all the lines in the ppd file begin with *. Doesn't that make what follows a comment only?  Or, am I confusing that with something else?

Edit 10/7/10:
Removed .ppd file excerpt because it was not useful to anyone.  By request, the first 30 lines of .ppd file is included further down the thread.

Thanks
« Last Edit: October 10, 2010, 03:14:10 PM by bilyo »

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Re: Problem with cups driver
« Reply #1 on: October 02, 2010, 09:29:03 PM »
Now I'm really confused. After coming back to this the next day I turned everything back on and the printer would not do anything.  All print jobs got stuck in the que.  I carefully went through all settings and couldn't find anything that stood out wrong. Finally deleted the printer and reinstalled.  This time I found the correct driver, went through all the settings and successfully printed a test. I next tried to use the duplex printing and it worked fine.  Oops! The back side is printed upside down and backwards. Checked settings there (choices are: long side vs short side, one side only, duplex on or off) and that looked OK. I got tired and quit then came back later, turned everything back on, and again printer won't print. Am I missing something or do I need to contact HP?

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #2 on: October 04, 2010, 05:37:14 PM »
bilyo
When it goes wrong it goes wrong with printers.
The * is standard line start in ppd files, and I find it hard to read.

In summary, the *UI... lines are the constraints that is place on the printer so you can only do the right thing. Probably the worst place to start trouble shooting.

Have your tried to use the web interface to control your printer? http://127.0.0.1:631 or http://localhost:631 it is sort of the same? Try that and report what you find, familiarise yourself with it.  If you are asked for login details this should be root/root password despite it looking like user/user password

 ;D
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Re: Problem with cups driver
« Reply #3 on: October 04, 2010, 06:06:48 PM »
wedgeling,
I think I solved the major "not printing" problem.  I'll try it for a few days of on's and off's and see if it remains as it is now.  It appears that it wasn't working properly because I wasn't logged in as "root" when I started. I thought that because you have to give the root password when starting the Control Center that that would be OK. I guess not because I deleted the printer installation and started over logged in as root and it now "seems" to be OK. The upside down mirrored printing in duplex mode is still with me.  I may have to contact HP for that one. I'll let you know.
Thanks

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #4 on: October 04, 2010, 06:16:04 PM »
bilyo
If your printing is sorted that is good.  I do not understand you having to be logged in as root to print, that is bad I think. The only root should be for setting up printer not to use it.  When you are using it that should be as normal user.

About contacting hp just a bit of pre-warning that may be a total wast of time especially when you mention Linux. I have searched a lot on the internet working on why so many inkjet printers seemed to have the problem with duplexing. Only few had success with hp.  This is not meant to put you off contacting them as you may be lucky talking to somebody that knows about your exact printer.

I was just scanning through some messages when I saw CUPS mentioned. I can help but only through Web interface and command line.  I don't know your printer model that could be a new problem.   :)
« Last Edit: October 04, 2010, 06:18:03 PM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Re: Problem with cups driver
« Reply #5 on: October 05, 2010, 05:00:28 PM »
Wedgeling,
I wasn't very clear when I said that I wasn't logged on as root when I started. I should have said "when I installed the printer". I don't know why that should matter but it seems to have worked better logged on as root even though one must provide the root password to start the Control Center. I can now print and scan as user or root. Hope it stays that way.  Sometimes the printer powers up with a different IP address, but I can correct that by rebooting the router. I'll address that issue later.

In searching around for a duplex printing solution, I was directed to:
http://launchpad.net/hplip/
From there I found bug report:
http://launchpad.net/hplip/+bug/484928
This seems to address the same or similar problem with duplex printing.  I wonder if you might help me decipher this information and determine if there is anything there that I might do.

Also, on the right side of the launchpad.net/hplip page is an announcement that hplip version 3.10.9 was released Oct 4. I am using version 3.10.6 which is in the current Synaptic list. Can't help but wonder if the later driver might solve the problem.

My printer is an HP Photosmart Premium model C309g-m.  I have tried to make telephone contact with HP. The main support number answered surprisingly quick, but they had to direct me to their Linux support department and, after waiting and waiting some more, I gave up. May try again later.

Thanks
« Last Edit: October 09, 2010, 05:01:52 PM by bilyo »

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #6 on: October 05, 2010, 06:03:59 PM »
bilyo
1.. Your printer is no doubt pretty intelligent, I guess you connect via USB cable?  The changing IP address is probably because you have dynamic IP allocations, ie the router dishes out IP as required if asked for one. Keep it in mind to be looked at when printing sorted

2.. hp lip 3.10.9 worth remembering I will download and check your file against the 3.10.6 version you have now.

Edit:
I have looked at the two sets of files that you may have used for the C-309g-m, there is no difference they are almost byte for byte identical. Only the version number listed inside has been changed from 3.10.6.xx to 3.10.9.yy which is just house keeping. Sorry this is not your solution but at least you know.   :)  The C-309g-m is the right driver for your printer.

Forgot that you were using the C-309a driver so I have made a quick compare of the the two ppd files, the only difference being that the:

The C-309a ppd seems to do printing on 80/120 mm CD/DVD media where as the C-309g-m driver is not doing anything here. The duplex code is the same for both ppd files.

Edit:Removed what I was saying about the 'right file' not really relevant.

3.. For some reason I can not connect to the bug report, says in a very polite way it does not exist. I will keep trying.

4.. Can you post the first 20 lines of your ppd file. I am interested as none of my 4 installs of your ppds give all the options you mention.

I would suggest you modify the post with the ppd file extract, and put the 20 lines in it stead, in my opinion this is not of any practical use here. The coice of course is yours but I have a feeling it puts people off really trying to read your thread.   ;D

5.. Are you familiar with working in konsole/terminal? In case it comes to that.


« Last Edit: November 23, 2010, 09:10:10 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bitzbox

  • Full Member
  • ***
  • Posts: 197
  • Bradford, England
Re: Problem with cups driver
« Reply #7 on: October 06, 2010, 04:41:08 AM »
Now I'm really confused. After coming back to this the next day I turned everything back on and the printer would not do anything.  All print jobs got stuck in the que.  I carefully went through all settings and couldn't find anything that stood out wrong. Finally deleted the printer and reinstalled.  This time I found the correct driver, went through all the settings and successfully printed a test. I next tried to use the duplex printing and it worked fine.  Oops! The back side is printed upside down and backwards. Checked settings there (choices are: long side vs short side, one side only, duplex on or off) and that looked OK. I got tired and quit then came back later, turned everything back on, and again printer won't print. Am I missing something or do I need to contact HP?
No, you're not missing anything and you certainly don't need to contact HP about it. The mirrored/upside down duplex printing problem with HP printers is a PCLOS problem and it's been thrashed to death in several other topics without a resolution.

Regards .....
Martin
#357086

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #8 on: October 06, 2010, 06:28:04 AM »
bilyo / bitzbox
Finally got to the bug you are listing. I am having a lot of trouble getting there but well worth it.  I have saved the page. This may be of special interest to bitzbox too as the hp 8000 is mentioned. He may know the page too.

Till Kamppeter is a real heavyweight in the Linux Printing ppd area, in the bug he claims this particular problem is fixed in GhostScipt version 8.71 and a number of distros confirmed that. GS 8.71 was in Synaptic for a little while but the fix seemed to cause other problems, so PCLOS is still using GS 8.64.

However this fix for some reason has not been a universal fix as far as I can see.  The problem is still in some versions of GhostScript 8.64 Till K makes the comment that his fix is only in 8.71.  There are some other tech details about the filter stream which also comes into play but this is beyond us. Also the problem does not seem to affect laserjets. So there is a problem using CUPS ppds.  May not show up in Foomatic ppds.

There is one possible fix for individual case by case or perhaps model by model. A bit of simple testing if one is game enough, this may fix the mirror printing for a particular selection of printing, what you can call normal printing on both sides.

Open your ppd file, found here /etc/cups/ppd, and comment out these 3 lines or sometimes 2 lines. Try combinations:

Quote
*cupsEvenDuplex: True
*cupsBackSide: "Rotated"
*cupsFlipDuplex: True

Commenting is done via the % sign as character 2 in each line, the example shown is valid for bilyo/ hp photosmart C-309g-m and likely for whole series of inkjet printers. Generally I will expect the lines will be found at the beginning of the ppd file, around line 30 but will vary.

Code: [Select]
*%cupsEvenDuplex: True
*%cupsBackSide: "Rotated"
*%cupsFlipDuplex: True

To the best of my knowledge this will do no harm to your printer, but since I can not test it myself first I will issue a warning. You are on your own.
If it works keep in mind that it is only for that particular situation but this may be acceptable for your purpose.  Good luck.   ;D
« Last Edit: November 23, 2010, 09:58:58 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bitzbox

  • Full Member
  • ***
  • Posts: 197
  • Bradford, England
Re: Problem with cups driver
« Reply #9 on: October 06, 2010, 06:56:15 AM »
bilyo3.. For some reason I can not connect to the bug report, says in a very polite way it does not exist. I will keep trying.
Try removing the (dot) from the end of the URL  :)

Regards .....
Martin
#357086

Offline bitzbox

  • Full Member
  • ***
  • Posts: 197
  • Bradford, England
Re: Problem with cups driver
« Reply #10 on: October 06, 2010, 07:02:02 AM »
bilyo / bitzbox
Finally got to the bug you are listing. I am having a lot of trouble getting there but well worth it.  I have saved the page. This may be of special interest to bitzbox too as the hp 8000 is mentioned. He may know the page too.
Yes, I know the page well and, in fact, I brought it to everyone's attention over two months ago:
http://www.pclinuxos.com/forum/index.php/topic,76160.msg635219.html#msg635219

Since then, I've requested ghostscript 9.00 in the hope that it might fix the problem whilst not breaking printing for others.

Regards .....
Martin
#357086

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #11 on: October 06, 2010, 08:05:54 AM »
bitzbox
Thanks, the little . was the problem, now Opera connects right away to the bug site, bilyo must have included the dot in the url and on my screen colour that was the end. I run with too small a font. Yes I thought you had an order in for version GS 9.0, that would be very interesting. Pity I don't have a printer that will cause trouble. Have to keep my eyes open.

Now it is starting to fall into place why some people may have luck using the hpijs ppd for their model printer, sunnyday fixed his hp 8000 that way.  I am prepared to send bilyo his model hpijs in version 3.10.9 too if he is willing to test it. Might be better than the code change above though I would love to see the result of that too. 
« Last Edit: October 06, 2010, 08:07:49 AM by wedgeling »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Re: Problem with cups driver
« Reply #12 on: October 06, 2010, 07:28:18 PM »
wedgeling,
I appreciate you taking an interest in this.
1. The problems I'm having are with a laptop (pclos) with a wireless connection. The printer is pretty nice. I does lots of stuff from a touch screen without the computer being on.

When the printer (or router) decides to use a different IP address, it is always 169.254.156.125 which is, so far as I know, way outside the range of auto assignments. The auto assignment works properly most of the time and strangely (to me) they are always the same for each computer/device regardless of turn-on sequence.  But, I can deal with all that for the time being.

2. The first time I installed the printer, I could not find a driver for the C309g. Next closest was C309a. Subsequent re-installs have found the C309g driver. This is what I'm using now. I'm not surprised that there is not much, if any, difference.

4. Below is the first 31 lines of HPPPremium309gm.ppd which includes the 3 lines you suggested changing.  I also included lines 395 thru 401. I wonder if any of them might be relevant in some way.

Sorry about very large initial post.  I thought that stuff might be useful, but can see how it might be a put-off.  Since I included the pertinent lines you requested here, I'll delete the other from the initial

I tried modifying different combinations of those 3 lines. The first two have no effect. Commenting out the last, cupsFlipDuplex: true, removes the mirroring of the backside page, but it is still upside down as if I had used the shortside duplex setting.

5. I used Unix in the distant past. So, I'm familiar with using the command line, but I remember very few commands and syntax. I know Linux is not exactly the same. I can follow explicit directions, however.

BTW, I'm using the gnome GUI, if that makes any difference to anything. I have KDE loaded and can switch if needed.

Sorry about the .  It was the end of a sentence.

When doing something like installing a printer using the Control Center or using Synaptic for updates where you must use the root password to start the app, is it important to otherwise be logged in as root?

Hope I've answered everything.

Thanks again

*PPD-Adobe: "4.3"
*% PPD file for HP Photosmart Premium c309g-m with CUPS.
*% Created by the CUPS PPD Compiler v1.2.3.
*% (c) 2008 Copyright Hewlett-Packard Development Company, LP
*FormatVersion: "4.3"
*FileVersion: "hpcups 3.10.6.15"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "hp-photosmart_premium_c309g-m.ppd"
*Product: "(HP Photosmart Premium All-in-one Printer Series - c309g)"
*Product: "(HP Photosmart Premium All-in-one Printer Series - c309h)"
*Manufacturer: "HP"
*ModelName: "HP Photosmart Premium c309g-m"
*ShortNickName: "HP Photosmart Premium c309g-m"
*NickName: "HP Photosmart Premium c309g-m, hpcups 3.10.6.15"
*PSVersion: "(3010.000) 705"
*PSVersion: "(3010.000) 707"
*PSVersion: "(3010.000) 815"
*PSVersion: "(3010.000) 853"
*LanguageLevel: "3"
*ColorDevice: True
*DefaultColorSpace: RGB
*FileSystem: False
*Throughput: "1"
*LandscapeOrientation: Plus90
*TTRasterizer: Type42
*% Driver-defined attributes...
*RequiresPageRegion All: True
*cupsEvenDuplex: True
*cupsBackSide:   "Rotated"
*%cupsFlipDuplex: True

Lines 395 -401
*OpenUI *Duplex/Double-Sided Printing: PickOne
*OrderDependency: 10.0 AnySetup *Duplex
*DefaultDuplex: DuplexNoTumble
*Duplex DuplexNoTumble/Long Edge (Standard): "<</Duplex true/Tumble false>>setpagedevice"
*Duplex DuplexTumble/Short Edge (Flip): "<</Duplex true/Tumble true>>setpagedevice"
*Duplex None/Off: "<</Duplex false/Tumble false>>setpagedevice"
*CloseUI: *Duplex
*%cupsFlipDuplex: True
« Last Edit: October 07, 2010, 01:08:43 PM by bilyo »

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2424
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #13 on: October 06, 2010, 08:32:56 PM »
bilyo

1.. The IP problem we will leave aside I think, this perhaps also could go in another thread too there will be plenty of others who can help you there, I would think.

2.. The use of the C-309a in my opinion has absolute no influence on the behaviour, as I mentioned you may like to go back and use this if you want to print on CD DVD media.

3.. No need to apologise for your posting, I was just hinting that the better the 'bait' looks the more likely you get a catch, in this case having showed some ppd code you caught me, I was very tempted just to leave it alone, I am starting to get a phobia over ppd internals  ;D  and I would not be surprised if bitzbox has a good laugh reading this.

4.. If you now have got rid of the mirroring, it seems to me that the backside is either rotated 180 degrees when it should not or it is not rotated when it should. Just to clarify have you tried combinations of only the two, ie flip and rotate. If it does not work, I am not surprised, this is the wrong location to fix it. It is an emergency fix for an individual user but if it fixes such a problem the user is not going to complain too much (until he makes a change and forgets the patching).

5.. No the extra code you have listed I don't think has any influence on the duplex problem, but I will say I am only 95% confident because of something I read in the bug report. If it has an influence we are barking up the wrong tree here. I will ignore the code at the moment. I can later show you where this shows up and if you like to play you can customise your own web interface with your own 'signature' when dealing with CUPS scheduler (not very practical though, but looks good perhaps). I will leave this at present.

6.. Great if you have used Unix, you are a perfect victim   ;D,  Gnome could throw me out but I don't think so on account of the CUPS but good you mentioned it as I can run my Gnome version to check things. I can basically install any printer driver via CUPS but the last step printing is not possible this is where the victim is needed.  Presently I have 4 instances of your C-309 installed (left out any extra letters) and they only took a few minutes to install via Web Interface.  I had to get the 3.10.9 but again I don't think the version plays any role, it is an insidious code piece somewhere that is a problem for Linux.

7.. I am concerned about you keep mentioning running as root. You mean you log in as root at the login process? You are not just asking for root priviliges like su (like when PCC asks for system password?) We need to look at that later but let us fix the printing problem first.  Don't let me forget, though this does not have my interest like the printing.

---
When using CUPS this location is very important: /etc/cups/ppd/xxxx.ppd I am just brainwashing any readers here.  In your case you have already found your "printer que configurations" don't worry about my terminology at this tage.

/etc/cups/ppd/HPPPremium309gm.ppd

In your preferred web browser in the address line: http://localhost:631 does that bring up the CUPS management system?  If so have a look around and then try to put PCC aside for the time being as we will look at printing from web CUPS and command line aspect, you can always go back to PCC.

Edit:
Something vaguely stirred about Gnome. I don't think Gnome auto starts CUPS, when I checked with a liveCD it did not, so to get the correct page up I do once in root konsole:

Code: [Select]
service cups status
Followed by
Code: [Select]
service cups restart
Mostly I just employ the last one, if cupsd was not started a failure message will show with the restart, if it was already running I see two OK markers instead.  I am sure there is a GUI equivalent but I have not chased that up because of the simplicity of using the konsole. I am sure there is a way to start CUPS when the pc is turned on.
 
To attack your duplex problem I will email you a HP hpijs ppd file for your printer and this should only take 30 seconds to install, I will send it if you want to go ahead, this is far easier than explaining how to get the ppd in the first place. (I did not want 40MB on my machine just to get one 20kB file  8)    Sounds odd but the file is/does the same as the ppd file you have installed but internally coded very differently to handle the variables/parameters for the printer (this is why it may be a fix).

Well it is up to you to decide.  You will be the second person only, that I know for 100% this bleeding problem was fixed by using the hpijs.

« Last Edit: November 23, 2010, 09:27:57 PM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline bilyo

  • Sr. Member
  • ****
  • Posts: 267
Re: Problem with cups driver
« Reply #14 on: October 07, 2010, 02:20:28 PM »
wedgeling,
4. I tried commenting out all three lines and all pairing combinations and the only one that has an effect is cupsFlipDuplex. As long as that line is included in any of the groupings mirroring is corrected. So, I currently have only that line commented out. I agree that it appears the page is either rotated or not rotated. My question is: how do you get it to do the opposite of what the line now commands?  What is the opposite syntax of "rotated"? "not rotated"?  I guess I could try something like that, but if correcting the problem was that simple it seems it would have been done by the experts. BTW, why is "rotated" in quotes and the word true in the other lines not in quotes?

7.  My system has two log-ins; root and my user name.  My habit is to log in under my user name and, if I have to do something in PCC, synaptic, or use the command line, I just give the root password and do what is needed thinking that this is the same as being logged-in as root initially. I guess that is what you mean by "asking for root privilege". I'm not an adept command line user and don't change settings often, and, so far, I'm not aware that this has caused any problems.  I followed the same procedure when first installing this printer.  At first, it seemed to go smoothly and I didn't give much thought to the fact that the printer driver was not found initially. It selected "raw" somethingoranother and told me to select the proper driver from the list. After several re-installs I finally tried it again after logging into the system as root.  This time, the correct driver was selected automatically and printing problems (except duplex) went away.  This makes me wonder if my habit is a bad habit.

Yes. http://localhost:631 gets me to the cups webpage.  In gnome, I get there through the system menu: System/Administration/Manage Printing.

Sorry. I don't understand the "starting cups" portion of your edit. Can you explain what you are doing and why.

I'll watch for your email. I'll probably have some questions when I get it.

Thanks