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

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #15 on: October 07, 2010, 06:46:31 PM »
bilyo

1.. The solution seems so tantalisingly close when you start experimenting with those lines  ;D you have confirmed that it does not work for your printer model. We will leave it at that. I do not know the answer to the "how do you get the opposite to rotation" question, I have asked myself too. The reason for quotes around rotated is the coding language used, it is a string variable and true belongs to the group of boolean operators and has been declared, put it this way there is no mistake here.

2.. Yes I thought I understood your login that way. There are various levels of root priviliges, I don't really know how many but when you log in as root/root password or root/system password you are the king you have unlimited access to your system. This represents a security risk when you are connected to the internet, to limit that risk it is always best to login as user/user password and then when root privilige is needed, like going to PPC you are asked for the system password which gives you just enough permissions to do the intended tasks, you appear to have full root access. You should google or ask this as another topic because it is good to be raised now and then.

3.. You have just thrown in another unexpected problem by mentioning raw well at least I know to keep my eyes open, in my opinion that should not have happened.  If duplexing then used to work in the past we have a very interesting situation that by selecting a particular connection method out of 4 or 5 possible you got it to work.  With that printer and its intelligence I do wonder what has happened.

4.. Don't worry about the starting CUPS at the moment, as long as the Gnome or cups web interface is used this is taken care out. If the CUPS webinterface ever gives a failure to connect, then the restart may fix it.

5.. I have sent the ppd file and if you are comfortable installing this by your own method do so.

6.. My suggestion,  add a new "printer" don't delete your existing printer, if you have two or more printer connections or printer ques you can select which one in your application. If you want to maintain say 4 or more ques you can set the most used one as default. You will probably prefer to only have one so in the end delete the unwanted.

7.. If you get a successful installation and operation we may leave it at that.
 
8.. When finished go to konsole and post the result of:

Code: [Select]
lpstat -t
Of curiosity do that for your existing setup as well

Good luck
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: 268
Re: Problem with cups driver
« Reply #16 on: October 08, 2010, 06:57:22 PM »
wedgeling,

1. I figured it was something like that.  I remember reading about when to use quotes but its been too long ago to remember the proper syntax.

2.  I'll leave the log-in question for another day.  It's only pertinent if it was the cause of the initial install failure.

3. The "Raw" selection came about only when I tried to do the install logged in as my user self. When logged in as root, it found the driver automatically.

4. OK

5-7. I got the ppd file and copied it to /etc/cups/ppd directory. Using PCC, I went through the install steps. At the point where it searches for the driver, it provides the option to find a "user supplied driver" (may not be exact words) which I selected and pointed to the driver in the above directory. Once that file was selected, I got a message saying: "ERROR - The ppd file HP Photosmart Premium C309g-m hpijs.ppd does not conform with the PPD specifications. Ignore? yes  no.  I selected yes. When I try to print nothing happens except the printer que says "sending". When print is selected from the file menue a printer selection windows comes up.  Under "status" for the new printer it says: Filter "/usr/lib/cups/filter/foomatic-rip-hplip for printer 309gmhpi not available: No such file or directory".  I do have a file in this directory named "foomatic-rip, but not one with -hplip on the end of the name.  The ijs.ppd makes reference to this file in lines 234 and 235.  Is this, perhaps, and error in the code or is there another file I need?

8. Following is result of lpstat -t:

Code: [Select]
[root@localhost bill]# lpstat -t
scheduler is running
system default destination: HPPPrem309gm
device for EPSONSPR1800: usb://EPSON/Stylus%20Photo%20R1800
device for HPPP309gmhpi: hp:/net/Photosmart_Premium_C309g-m?ip=192.168.2.100
device for HPPPrem309gm: hp:/net/Photosmart_Premium_C309g-m?ip=192.168.2.100
EPSONSPR1800 accepting requests since Mon 03 May 2010 07:44:25 PM CDT
HPPP309gmhpi accepting requests since Fri 08 Oct 2010 02:13:29 PM CDT
HPPPrem309gm accepting requests since Fri 08 Oct 2010 02:24:22 PM CDT
printer EPSONSPR1800 is idle.  enabled since Mon 03 May 2010 07:44:25 PM CDT
printer HPPP309gmhpi is idle.  enabled since Fri 08 Oct 2010 02:13:29 PM CDT
        Filter "/usr/lib/cups/filter/foomatic-rip-hplip" for printer "HPPP309gmhpi" not available: No such file or directory
printer HPPPrem309gm is idle.  enabled since Fri 08 Oct 2010 02:24:22 PM CDT
HPPP309gmhpi-139        root             21504   Fri 08 Oct 2010 02:13:29 PM CDT
HPPP309gmhpi-141        bill           3999744   Fri 08 Oct 2010 07:13:26 PM CDT
[root@localhost bill]#


Thanks
« Last Edit: October 09, 2010, 05:17:57 PM by bilyo »

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #17 on: October 08, 2010, 07:42:05 PM »
bilyo
First can you slip back into your reply #5 and just move the full stop at the end of the links outside the html tags. It is important references you have given there and I think it will catch many unaware and seem to indicate dead site.

When you report output from konsole use the code tags, ie the # key icon above the edit window, another item to make sure readability is better. Also make sure to include the promptline, ie copy and paste enough from console as shown below:

I will remove this later when you have edited your previous post, sorry I am just trying to make sure that the thread will get people in and keep them reading.   ;D

Code: [Select]
[root@localhost gert]$ lpstat -t    < -------------------------- include this line, sometimes give valuable information to user mode without having to ask question

scheduler is running
system default destination: HPPPrem309gm
device for EPSONSPR1800: usb://EPSON/Stylus%20Photo%20R1800
device for HPPP309gmhpi: hp:/net/Photosmart_Premium_C309g-m?ip=192.168.2.100
device for HPPPrem309gm: hp:/net/Photosmart_Premium_C309g-m?ip=192.168.2.100
EPSONSPR1800 accepting requests since Mon 03 May 2010 07:44:25 PM CDT
HPPP309gmhpi accepting requests since Fri 08 Oct 2010 07:13:26 PM CDT
HPPPrem309gm accepting requests since Fri 08 Oct 2010 02:24:22 PM CDT
printer EPSONSPR1800 is idle.  enabled since Mon 03 May 2010 07:44:25 PM CDT
printer HPPP309gmhpi is idle.  enabled since Fri 08 Oct 2010 07:13:26 PM CDT
printer HPPPrem309gm is idle.  enabled since Fri 08 Oct 2010 02:24:22 PM CDT
HPPP309gmhpi-139        root             21504   Fri 08 Oct 2010 02:13:29 PM CDT
HPPP309gmhpi-141        bill           3999744   Fri 08 Oct 2010 07:13:26 PM CDT

[root@localhost gert]$     < ---------------------- include this line to indicate it really is the end

I will pick up where you installed the ppd file. It may pay that you set up your own personal directory for keeping your special ppd files, you might get curious and experiment a lot and dig out your own.

The file I sent you was or we will call it an original ppd file, this is used to generate another ppd file you can call the print que ppd file, this links with the total printing path for the particular printer you have set up. When you use a CUPS ppd install, that special file will be given your printer name and all CUPS ppd print install are kept:

/etc/cups/ppd/xxxx.ppd

You have just added HPPP309gmhpi.ppd to this directory (and the original file), well I have done a bit of guessing here but if you check your directory you will figure it out.

It is of course up to you, if you can manage to remember that you may have two sets of different files in this directory, leave it at that. There is a correct place for the original files but it got too difficult for me to try and keep up with that.

1.. Correct to ignore the ppd check I believe, most ppd files fails this check. The check procedure was tightened up some time ago but with thousands of files to test I think this was just left. If one has trouble with a file it is worth remembering that perhaps the file could be a problem.  I don't know at present if this will be a problem or where it may show. I have checked a number of ppds that I use and all failed but seem to work fine.

2.. Because I have bypassed the big hp installation database, which was problem for me, I have to make a change inside the ppd. Your line number seems to high, I will investigate, but somewhere the -hplip has to go.

Edit:
Ouch, something has changed again. Some database re-write which I should have remembered. In theory should not matter but CUPS foomatic-rip is an ordinary exe file.  Foomatic-rip-hplip is a Perl Script doing the same job I hope. This all belongs to a CUPS/Foomatic upgrade as I understand.

In this file HPPP309gmhpi.ppd if I have picked the right one, make below change and see what happens.

Lines 234/235 approximately:

Quote
*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip-hplip"
*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip-hplip"

Change to this

Quote
*% Following is Bill's special attempting to fix duplex  
*%cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip-hplip"
*%cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip-hplip"

*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip"
*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip"

Edit2:
I have no problem reproducing your error here despite not having your printer model, looking into the validity of above change in ppd.

Edit3:
I should have edited my original file, as described above, truncating the foomatic-rip-hplip string, but I will wait until you confirm that at least the error disappears in the printer management.  I edited the file and saved it again. You will need root access to do that.

Hmmm, I just looked in Gnome, did not have a file editor that I recognise. Sorry I keep forgetting you use Gnome, you are on your own

I edited the proper que ppd in my etc/cups/ppd/ directory.

When you have done that then in a su konsole, do

Code: [Select]
[root@localhost gert]$ service cups restart   < ---- just these three words, the response is what my system gave
Stopping CUPS printing system:                                                                                                                [  OK  ]
Starting CUPS printing system:                                                                                                                [  OK  ]
Re-enabling disabled print queues:
[root@localhost gert]$

If you look in your CUPS management for the offending printer the error should be gone.

If it will print properly that is the interesting question.  
« Last Edit: November 23, 2010, 09:35:40 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: 268
Re: Problem with cups driver
« Reply #18 on: October 09, 2010, 06:56:49 PM »
wedgeling,

Yea! It works! Backside is now right side up! Error is gone from cups management window. Your name goes right to the top of my most favored person list.

Following is "service cups restart" results:

Code: [Select]
[root@localhost bill]# service cups restart
Stopping CUPS printing system:                                  [  OK  ]
Starting CUPS printing system:                                  [  OK  ]
Re-enabling disabled print queues:
[root@localhost bill]#

You're correct, I do have two ppd files in /etc/cups/ppd directory; a copy of the one you emailed to me (original) and one named HPPP309gmhpi.ppd. I also kept a copy of the original in a personal directory.  I'm not 100% clear on everything. Do I correctly understand that the original is not required to be in /etc/cups/ppd?

I hope the other changes to my posts you suggested are OK. It took me a little while to figure out how to do it, but I think I got it.

I assume future system updates will have no effect on the new ppd file. Should I be concerned about reverting back to the very first ppd file should it ever get fixed?  How will I know if/when that ever happens?

Thank you very much for your interest, time, and patience. If you are not a teacher, you should be.

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: Problem with cups driver
« Reply #19 on: October 09, 2010, 07:57:35 PM »
bilyo
Congratulations, when you have a problem like this and you struggle with it for considerable time it is anticlimatic suddenly to have a fine working system. Enjoy it and since it is an unorthodox fix it will not last but may take you into the time when it is no longer a problem.

The day when CUPS foomatic-rip and the HPLIP foomatic-rip-hplip depart common ground then you may experience trouble but just enjoy your system working.

I would not copy/transfer any files to the directory it is a working directory for CUPS to keep it printer que ppd files. The files here /etc/cups/ppd has been customised using the xyz.ppd original you supplied at the time of setting up the printer que.  So if you have placed a copy of the file I sent you here it is of no use any longer.

In case you want to build a new printer que, let us take for example you want to set up your printer que so the customisation is for photo printing you would use the "original" again and customise to you specifications, then in you application select that que and the printer needs no more setup to print your abc whatever photo  (ie you have preset the profile of your printer from outside the application.  Since these days you can generally set up printer profiles inside the applications, you can say why would you bother and fair enough.  I just showing the versatility of CUPS

You have done well with the post changes it makes it easier for anybody else scanning through, they may stick to the end and see it can be solved at least for the time being.

I think you will the right for a while with updates. I do not quite understand the implications of updates at this stage, but remember it is a specific fix for your situation right now. There really should be no reason why it should change we are however dealing with the dynamic computer world so anything can be expected.   I will do a bit more work and see if I can remove the edit option from the user, having to do a bit of editing is the cost to get it to work at the moment.

It could be interesting to see what you get for your printer model if you do in konsole, you can copy and paste this to the command line:

Code: [Select]
lpoptions -p HPPP309gmhpi -l
« Last Edit: November 23, 2010, 09:41:21 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: 268
Re: Problem with cups driver
« Reply #20 on: October 10, 2010, 03:13:09 PM »
wedgeling,

The following is the results of the command you requested:

Code: [Select]
[root@localhost bill]# lpoptions -p HPPP309gmhpi -l
PageSize/Media Size: *Letter A4 Photo Photo5x7 PhotoTearOff 3x5 5x8 A5 A6 A6TearOff B5JIS CDDVD80 CDDVD120 Env10 EnvC5 EnvC6 EnvDL EnvISOB5 EnvMonarch Executive FLSA Hagaki Legal Oufuku w558h774 w612h935 Custom.WIDTHxHEIGHT
PrintoutMode/Printout Mode: Draft Draft.Gray *Normal Normal.Gray High High.Gray Photo
InputSlot/Media Source: *Default PhotoTray Upper Lower CDDVDTray Envelope LargeCapacity Manual MPTray
Duplex/Double-Sided Printing: *DuplexNoTumble DuplexTumble None
DryTime/Additional Dry Time: *Zero Five Ten Fifteen Twenty TwentyFive Thirty
Quality/Resolution, Quality, Ink Type, Media Type: *FromPrintoutMode 300ColorCMYK 300ColorCMYKFullBleed 300DraftColorCMYK 300DraftGrayscaleK 300FastDraftColorCMYK 300FastDraftGrayscaleK 300GrayscaleK 600ColorCMYK 600ColorCMYKFullBleed 600GrayscaleK 600PhotoCMYK 600PhotoCMYKFullBleed
[root@localhost bill]#

For anyone else having a similar problem, would it be helpful to provide a source for the ppd file you sent to me?

Thanks again.

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2469
  • Any Bugs in site?
Re: Problem with cups driver [Solved]
« Reply #21 on: October 10, 2010, 08:25:28 PM »
bilyo
The information here at a glance tells me a lot about what your printer settings are and can be.  The present settings are the ones where you see the * and the named parameters can aslo be set from command line.  We will leave it at that.

Now you have your problem "fixed" I can tell you where I got the file(s) from. For some reason hp has more files in the HPLIP database than what can be accessed via Synaptic pclos. If you go to the HPLIP website:

http://hplipopensource.com/hplip-web/downloads.html

This deals with installing the HPLIP database for Linux printer support, You will get access to hundreds of printers if you do install.  This just overwhelmed me and seemed too complicated for my Linux understanding.

I do like to "take things apart" so I downloaded the tarball about 20-40MB and used Koqueror and Ark, RPM viewer to look inside and discovered that way inside there is two directories hpijs and cups full of compressed files  *.tar.gz these can be decompressed individually via Ark, the file names reflect the specific printer. When a file is decompressed it has the extension *.ppd and can be opened with kwrite or any text editor.

At the bottom of hp webpage there is a section on Manual Installation > Download Tarball I download this file and just fish out the file I am after.  As you can see it is easier for me to fish out the file than try to describe how to do for somebody.

I am guessing that somebody smart enough with programming could take these two directories and just make them acessible to the CUPS system which will read those files. Then I think a symbolic link to handle the foomatic-rip-hplip --> fomatic-rip will top it off ( I cheated I just made a copy of the CUPS foomatic-rip and named it foomtatic-rip-hplip, so it did not matter what call was inside the *.ppd.

However all this is not a neat solution but a solution that can be used in individual cases that become a bit recalcitrant.
« Last Edit: November 23, 2010, 10:08:09 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