lp : drivers loaded but no devices found - [re-opened]

Problems and successes with specific brands/models of printers
Message
Author
xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

lp : drivers loaded but no devices found - [re-opened]

#1 Post by xav795 »

Hi,

Recently, my printer stopped working, but i did not found yet how.

In the dmesg, i have noticed the line :
lp : drivers loaded but no devices found.

When i go to localhost:631, with the root i can start and stop my printer, but i get still the same message :
Unable to open USB device "usb:/dev/usb/lp0": No such device"
Matériel URI: usb:/dev/usb/lp0

The queue is growing but nothing comes out.

Is anybody have an idea?

Configuration:
Puppy 4.12
It seems that i'm still using cups v1.1.23 since the first line in etc/cups/printers.conf is "# Printer configuration file for CUPS v1.1.23"
Last edited by xav795 on Mon 09 Nov 2009, 13:20, edited 4 times in total.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

Re: lp : drivers loaded but no devices found

#2 Post by Patriot »

Hmmm .....

Assuming that you're using puppy412, to confirm the CUPS version:

1. Open your browser and go to http://localhost:631/
2. You will see the version number displayed on the top of the page

If you're using puppy412 with cups1.1.23 and do not wish to upgrade your cups package, try using /dev/lp0 for your printer.

Using /dev/lp0 override works for cups usb backend (usb:/dev/lp0) but may bork out with other printer driver backend. Some printer driver is hardcoded to look for usb printers at /dev/usb/lp# and if this is the case, you have two options:

1. Upgrade to latest cups 1.3.11 (you can find them on my cups thread). The pet upgrade implements the /dev/usb fix in number 2 below.

2. Copy over the new udev rules from puppy430. Puppy430 has incorporated the /dev/usb fixes. It is /etc/udev/rules.d/55-cups.rules. If you do not have a copy of puppy430, you can get the attached file below (put it into /etc/udev/rules.d/). It is suitable for puppy 412 and below. Reboot or restart udevd to enforce the rules.


Rgds
Attachments
55-cups.rules.tar.gz
(266 Bytes) Downloaded 766 times

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#3 Post by xav795 »

Thank you Patriot for your so detailed response.

So i have upgraded my cups to 1.3.11, and after rebooting i launched a new job.
In the new screen of cups, i could see that message :
"Unable to open file "/var/spool/cups/d00012-001" - Permission denied"

my document is not printed, and the job is still in the queue

the old message concerning the problem signaled before is removed from dmesg.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#4 Post by Patriot »

Hmmm .....
xav795 wrote:.....
"Unable to open file "/var/spool/cups/d00012-001" - Permission denied"
Something borks? Cups spool folder permission changed?

Open a terminal:

# /etc/init.d/cups stop

# rm -fr /var/spool/cups

# deluser lp

# delgroup lp

# /etc/init.d/cups start

See if that makes any difference when doing a test print ...

And now we come to the next question, what's your printer model and the driver that you're using .... ?

I have a feeling this is going to be hplip or something .... borks ...


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#5 Post by xav795 »

Hi,

I have executed the command lines you indicated to me
# /etc/init.d/cups stop
# rm -fr /var/spool/cups

# deluser lp
=>there was no user lp in etc/passwd, shadow, group

# delgroup lp
> there was no group lp in group, gshadow

# /etc/init.d/cups start

I tried to print the cups test page but nothing came out.
A message appeared in the printer management tab: "printer not connected, next try in 30 sec..."
The old error message "Unable to open file "/var/spool/cups/xxx" - Permission denied" did not appear.

My printer is connected with usb cable, this is an epson c62, which has been working some time ago with puppy.
The driver information i found in /etc/cups/ppd/EPSON_Stylus_C62_USB_1.ppd is
driver : *StpDriverName: "escp2-c62"

Regards

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#6 Post by Patriot »

Hmmm .....
xav795 wrote:........ A message appeared in the printer management tab: "printer not connected, next try in 30 sec..." ........
It could be a hardware issue (maybe)... check your cable and make sure its still good. Also, check your printer uri in cups, is it "usb:/dev/usb/lp0" ?

Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#7 Post by xav795 »

Hi Patriot
Shame on me! I did it... It was the cable (i will hang me with it!)

Thank you so much for your help, and sorry for that issue
Regards

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#8 Post by Patriot »

Hmmm .....
xav795 wrote:........ It was the cable (i will hang me with it!)
:lol:

Don't fret ..... occasionally something like this happens .... :wink:

If you have resolved the issue, kindly edit the title of your first post to [solved] ...


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#9 Post by xav795 »

HI,

i am re-opening this issue, because i have got an error message when i am submitting a job.

I get the error lines in the log in 'info' mode.

I started with a new install of CUPS, using the pet in manager (1.33), which gave me a new cupsd.conf).
I just had a look to the /var/spool/cups directory which is in group nobody, i dont know if this is normal.
I tried before, stopping, then deleting all the files inside this directory then i restarted the server, but it had never let me print.
After my re-installation, i added my epson c62 without any problem, so the cable is plugged, this time.

Here is the log
I [15/Oct/2009:10:30:36 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=6635)
I [15/Oct/2009:10:30:38 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=6659)
I [15/Oct/2009:10:30:40 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=6663)
I [15/Oct/2009:10:30:40 +0200] [Job 60] Adding start banner page "none".
I [15/Oct/2009:10:30:40 +0200] [Job 60] Adding job file of type application/postscript.
I [15/Oct/2009:10:30:40 +0200] [Job 60] Adding end banner page "none".
I [15/Oct/2009:10:30:40 +0200] [Job 60] Queued on "epson" by "root".
I [15/Oct/2009:10:30:40 +0200] [Job 60] Started filter /usr/lib/cups/filter/pstops (PID 6664)
I [15/Oct/2009:10:30:40 +0200] [Job 60] Started filter /usr/lib/cups/filter/pstoraster (PID 6665)
I [15/Oct/2009:10:30:40 +0200] [Job 60] Started filter /usr/lib/cups/filter/rastertogutenprint.5.0 (PID 6666)
I [15/Oct/2009:10:30:40 +0200] [Job 60] Started backend /usr/lib/cups/backend/usb (PID 6667)
E [15/Oct/2009:10:30:40 +0200] PID 6664 (/usr/lib/cups/filter/pstops) stopped with status 1!
I [15/Oct/2009:10:30:40 +0200] Hint: Try setting the LogLevel to "debug" to find out more.
E [15/Oct/2009:10:30:40 +0200] [Job 60] Unable to open file "/var/spool/cups/d00060-001" - Permission denied
E [15/Oct/2009:10:30:41 +0200] [Job 60] Job stopped due to filter errors.
I [15/Oct/2009:10:30:42 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=6691)
E [15/Oct/2009:10:30:42 +0200] [Job 59] Unable to open job control file "/var/spool/cups/c00059" - No such file or directory!
I [15/Oct/2009:10:30:53 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=6747)

Here are the group in /etc/group
root:x:0:
daemon:x:1:
tty:x:2:
ppp:x:200:
users:x:500:
nobody:x:65534:
guest:x:501:
spot:x:502:spot
bin::2:root,bin,daemon
audio::17:
503:x:503:messagebus
ftp:x:1000:
dip:x:30:

and the users in /etc/passwd
root:x:0:0:root:/root:/bin/sh
daemon:x:1:1::/:
nobody:x:65534:65534::/tmp:
spot:x:502:502:Linux User,,,:/root/spot:/bin/sh
bin:x:2:2:bin:/bin:
messagebus:x:503:503:Linux User,,,:/tmp:/bin/sh
ftp:x:1000:1000:Linux User,,,:/root/ftpd:/bin/sh

xavier

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#10 Post by Patriot »

Hmmm .....
xav795 wrote:..........
I started with a new install of CUPS, using the pet in manager (1.33), which gave me a new cupsd.conf). ..........
I'm sorry, but I couldn't find my old notes on cups 1.3.3 pet ..... I couldn't remember the exact steps that I took (many moons ago) to make it work. The cups 1.3.3 package from the official repository have several permissions issues and requires patching several config files, the cups init.d and additional rc.d files ...

Off hand, I recall something about mismatched user id and mismatched folder permissions. Every time cups scheduler restarts (on boot-up or manual restarts), it will repair folder permissions according to internal defaults and will usually bork the printing process. As this is hard coded during compile time, a complete rebuild from source was found to be necessary.

To upgrade cups on puppy412, I would first recommend cups-1.3.11 (or 1.3.10 or 1.3.9). I have made a quick simulation with a fresh puppy412 (pfix=ram) with cups-1.3.11 and the epson c62 simulation appears to be working ok ..... (the epson c62 simulation was tested with cups internal epson ppd v1.3 and gutenprint 5.01)

If you recently downloaded cups-1.3.11 and found the installation borked, then please re-download the updated cups-1.3.11 package. I have already posted a note on my cups thread regarding this.


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#11 Post by xav795 »

Hi,

Finally i removed the 1.3.3 and went on your thread to get the 1.3.11 pet and i launched it.
I then rebooted the pc.
I went into the cups manager to add my printer and i tried a test page.
I get the permission denied message you will see in the log error file.

Here are the permissions on the /var/spool/cups/ files generated after i submit a 'print test page'
drwxrwx--T 2 root nobody 60 2009-10-15 21:49 tmp
-rw-r----- 1 root nobody 17365 2009-10-15 21:49 d00062-001
-rw------- 1 root nobody 767 2009-10-15 21:49 c00062

and the error log.
I added the cupsd.conf

If i try to modify the server parameter using the localhost:631, when i click on validate, i get : "permission denied"

Is there something wrong with the user that executes the binary when running cups?
For the moment i did not modify anything for my printer in "Define authorization" tab.

To be honnest i must say that i could some times(before i re-install the 1.3.11) ago print, but i really dont know how i make it possible. I know that i tried to define authorization on tab printer, i played with the cupsd.conf file with the policy statement.
At least i must say that i have not enough knowledge on linux to feel the problem, i guess it will come.

Thank by advance if you have an idea
Rgds.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#12 Post by Patriot »

Hmmm .....
xav795 wrote: ........
I added the cupsd.conf
........
Did you overwrite cupsd.conf with a different one or just edit it ?

You also need to cancel all jobs and restart cups (ie. /etc/init.d/cups restart). The folder permissions are ok ... no problems there ... probably a filter borks somewhere ...

I'll have to find an epson somewhere to properly test this .....


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#13 Post by xav795 »

Hi,

In fact this is the new cupsd.conf that came with the last install (1.3.11), which is in /etc/cups/ .So i just edited it but never i overwrited it.

I tried to cancel the job via the manager or manually, then restart cups the error message "Permission denied" does not appear.
But if i launch a new job, the error message is going back.

Here are the permissions of the directory /etc/cups/
-rw-r--r-- 1 root root 1215 2007-10-18 14:47 command.types
-rw-r--r-- 1 root root 946 2007-10-18 14:58 pstoraster.convs
-rw-r--r-- 1 root root 2737 2007-11-24 23:03 printers.conf-ORIG
-rw-r--r-- 1 root root 21828 2007-11-24 23:03 cupsd.conf-ORIG
-rw-r--r-- 1 root root 2328 2007-11-24 23:03 client.conf
-rw-r----- 1 root root 427 2009-07-01 14:47 printers.conf.O
-rw------- 1 root nobody 427 2009-07-01 14:47 printers.conf
drwx------ 2 root nobody 4096 2009-07-20 02:08 ssl
-rw-r----- 1 root root 186 2009-07-20 02:08 snmp.conf
drwxr-xr-x 2 root nobody 4096 2009-07-20 02:08 ppd
-rw-r--r-- 1 root root 6298 2009-07-20 02:08 mime.types
-rw-r--r-- 1 root root 4542 2009-07-20 02:08 mime.convs
drwxr-xr-x 2 root root 4096 2009-07-20 02:08 interfaces
-rw-r----- 1 root root 2470 2009-07-20 02:08 cupsd.conf.default
-rw-r----- 1 root nobody 1180 2009-07-20 02:08 cupsd.conf
-rw-r--r-- 1 root root 545136 2009-09-27 14:57 ppds.dat
-rw------- 1 root nobody 83 2009-09-30 10:12 classes.conf.O
-rw------- 1 root nobody 83 2009-10-05 21:17 classes.conf
drwx--x--x 2 root root 4096 2009-10-15 10:27 certs


Rgds

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#14 Post by Patriot »

Hmmm .....

I got myself an epson C63 today for the cost of free .... It's borked at the feeder/roller ... I had to disassemble and make some repairs ... It's done after a couple of hours ... The electronics are fine but the inks are gone, well, it's still good enough for running some CUPS tests ...

I booted into a fresh puppy412 and install CUPS-1.3.11 ... after several retries, I found a working setup for the epson C63 .... try this for your C62 with CUPS 1.3.11:

(Don't worry about CUPS-1.3.11 folder permissions. As far as I know, I've already taken care of it for puppy use .....)


1. Generate the ppd. Open a terminal and do this:
# cups-genppd.5.0 'Epson Stylus C62'

2. Start cups web interface (ie. http://localhost:631/)

3. Printer should be on and connected by now.

4. Add printer, CUPS should show two (2) detected epson printer (it's actually pointing to the same printer). One pointed by usb backend and another by gutenprint backend. You can use either one. I tested both and they both works.

5. Add your epson model. Use the "Epson Stylus C62 - CUPS+Gutenprint v5.0.1" driver.

6. Set the paper size to A4 and set the error policy to abort-printer or retry-job.

7. Make a test print.

8. Done.

I used the same procedure for the C63 and it printed out the test page just fine ...


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#15 Post by xav795 »

Hi,

I have followed the step by step, but i get the same error message concerning the permission.

I can see that i still have an old cups directory named cups-old. Can it interact with the active one?
A solution could be to delete manually all my last cups installation and peharps restarting with a new one on good conditions (that is a window 's reflex)

I had a look to puppy 4.3 to verify that i could print without problem.

I tried to print directly from command line with one printer set as default.
I wrote
lp /root/myfile

and i verified with lpstat -p -d what was going on.
Here is the result
# lpstat -d -p
system default destination: epson
printer CUPS-PDF is idle. enabled since dim 18 oct 2009 23:20:21 CEST
printer epson is idle. enabled since lun 19 oct 2009 00:14:23 CEST
Empty print file!

I then went to the web manager localhost:631, and i could see my job in state 'stopped', owned by root.

If i retry the job from the job list, in the web manager, the message is the same : 'Empty print file!'.

But if i launch a 'Test page' as i ever do from the beguining, i get the 'permission denied' message.
The job got an 'anonymous' owner.

Rgds.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#16 Post by Patriot »

Hmmm .....
xav795 wrote:Hi,

I have followed the step by step, but i get the same error message concerning the permission.

I can see that i still have an old cups directory named cups-old. Can it interact with the active one?
........
No, it doesn't use (or even look into) cups-old folder. It's only a backup reference. You can delete it if you don't need it anymore.

Based on your description above so far, the last thing that came to mind is filesystem corruption. Yes, a borked filesystem can prevent CUPS from printing .....

I've seen this happened mostly on full hdd installs (I had this problem twice myself many months ago. I don't use hdd installs anymore), seldom occurs on frugal installs but it can still happen. Since you mentioned that you can print from puppy430, then I suggest doing a fresh boot from puppy with pfix=ram and fsck your partition or savefile. If it's a minor thing then it should be fixable. If the corruption is beyond repair then you will need to rebuild your partition or savefile.


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#17 Post by xav795 »

Hi,

You are right, my pupsave is corrupted.
I dont know how i did it, but, even fsck can't read my pupsave.
In fact i have a problem with many files of my usb flash.
I was regularly using a dd command to backup my flash disk (in fat32) to a backupfile.dd on another partition in ext3 format, because i wanted to be able to copy more that 4Go.
Is there something wrong doing this way?
when i wanted to restore my backup i was doing a
dd if=/mnt/sdx/mybackup.dd of=/dev/sdy

But i could see recently that i was not able to mount my dd file.
I was getting this message when doing
mount -t vfat /mnt/sdd1/sauv_puppy2.dd /mnt/testfs -o loop
ount: wrong fs type, bad option, bad superblock on /dev/loop2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

and dmesg
FAT: invalid media value (0x06)
VFS: Can't find a valid FAT filesystem on dev loop2.


Here is the result of fsck on my pupsave, saved on a ext3 partition.
# fsck /mnt/+mnt+sdd1+pup_save-xav.2fs
fsck 1.41.9 (22-Aug-2009)
e2fsck 1.41.9 (22-Aug-2009)
fsck.ext2: Is a directory while trying to open /mnt/+mnt+sdd1+pup_save-xav.2fs

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Is there a way to rebuild my pupsave?

Rgds

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#18 Post by Patriot »

Hmmm .....
xav795 wrote:Hi,

You are right, my pupsave is corrupted. ........
It looks pretty bad ... but it's not really your fault ... The worst that I had was a full hdd install that got corrupted in less than two weeks ... The shutdown process didn't do it real "gracefully" and tend to do it "quick-n-dirty" ...

I don't think directly fixing and re-using the pupsave is possible now ..... I suggest trying to copy out your important data (if you have any) and create a new save file .... and do fsck at least once a month ... once a week if you frequently boot up puppy ...

On my own systems, I love the simplicity of FAT32 partitions and ext2 pup_saves ... NTFS partitions is only used to store files larger than 4GB ... I've never had any unrecoverable corruption ever since ...

To make pup_save backups, the easiest way to preserve the settings would be to boot pfix=ram or use a different pup_save and copy the pup_save you want to somewhere else ...


Rgds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#19 Post by xav795 »

Hi,

I have restarted with a new puppy 4.12 (i am using a french version i am waiting for the french 4.3).

Thank you a lot, patriot for all the time you spent with my problems, i will save my pupsave more carefully with the options you told me about.

All my data are not losen, i could save most of all.
I will try to have a better strategy for saving my data.
I must improve my level of knowledge in how puppy works to understand what is inside a pupsave.2fs, a puppy412.sfs.
In fact, a technical book on puppy should be a nice present for christmas. I will search the forum and Barry's blog to get it.

Rds

xav795
Posts: 26
Joined: Sat 18 Jul 2009, 11:03
Location: France, Paris

#20 Post by xav795 »

Hi,

After my new start with a fresh french 4.12, i have noticed that after the installation of cups 1.3.11, i get a problem of permission, discussed above.

For the moment, the only thing that works is to first apply the commands you gave to me.

rm -fr /var/spool/cups
/etc/init.d/cups restart

then i can print something without problem until my next reboot.
Each time a boot, i can't start printing someting without executing these two lines.

Rgds

Post Reply