2

I am using CentOS 7.4 and a HP LaserJet M402dne printer.

Whether the printer is on or off, the printer's state is always "idle" and I would like to know why.

Commands I use to get the printer's state :

lpstat -t

or in Python

import cups
c = cups.Connection()
l = c.getPrinters()
l

EDIT :

I had some error in the logs concerning the avahi-daemon that would not run properly. I reinstalled the avahi-daemon and now this problem seems to be fixed.

However, I still got this error, whenever I try to restart the cups service :

CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ColorManager was not provided by any .service files.

Does anyone know where this is coming from ?

EDIT : I solved this error message by installing colord. However the printer's state I am getting is still wrong. I guess I have to check if I have installed the printer correctly since I have done it manually.

  • 1
    This will depend on what Python is querying. Have you read up on what idle state means? – music2myear Mar 26 at 17:18
  • Isn't the problem concerning cups and not Python ? I did a little bit of research and I found that a printer can be in three different state and each state has a number. The printer is either "idle" (number 3), "printing" (number 4) and "stopped" (number 5). I noticed that when one job is waiting my printer is in state 4, even if it's off. However, it's never in state 5 and I need to discover why. Also, looking at /var/log/cups/error_log I found that the avahi-daemon wasn't running. I don't know if it's linked. – M.Brbr Mar 27 at 14:16
  • I also tried to install the printer on another machine and it worked, I get the right state. I guess I am missing a daemon or a configuration file on the machine that can't get the right state. – M.Brbr Apr 1 at 9:12
  • Reisntalling cups and avahi-daemon got rid of the avahi error. Nethertheless I still have one error to fix : org.freedesktop.DBus.error.serviceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files – M.Brbr Apr 1 at 15:35
  • Your question has changed since you posted it. Please EDIT the question you've posted so that your current question can be answered/fixed. – music2myear Apr 1 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.