HP Laserjet printer, copy, fax, scan frequently becomes "disabled" as seen in Yast.

I have a HP-ColorLaserjet-MFP-M278-M281 installed for about 4 years now. It is on a usb cord directly to the back of the computer. Printer runs on hplip software from repos. No network install of printer. Generally works fine, i.e., print, copy, scan. I am not a big print user and printing is very standard stuff. Never use fax. Scan very infrequently.

Quite often it just stops working. Print jobs are seen in the print queue but just sit as “pending”; never print. Diagnosis in Yast -> Printer says that the printer is not enabled. The enable printer box in the dialogue is now, inexplicably, unchecked. Enabling that box is not sufficient to restart the print functioning.

Sometime a power off from the front panel button will start it working. Most often not.

Pulling the electrical plug from the back of the machine (not a very accessible location) and reinstalling works most often but then the “enable” box in Yast -> Printer needs to be rechecked to see that it is enabled and very often needs to be checked to the enable position.

Annoying problem. Would like to fix it.

What could be making the printer to become un-enabled?
Could this be a CUPS problem? I really don’t understand how cups really works.
Not new issue so I don’t suspect hardware deterioration.

thanks, tom kodvic

Have you tried the old command line to enable it?

sudo enable "name of printer"

The command sudo enable “name of printer”

does not run and says:

sudo: enable: command not found

I see no options in enable man that gives me any clues as to what to do. I think an enable option is missing from suggested command.

As an alternative, if root if I run: enable “name of printer”

gives a further error:

bash: enable: HP-ColorLaserJet-MFP-M278-M281: not a shell builtin

Got me interested in enable command. Any suggestions? thanks, tom kosvic

While your report is a bit confusing, (please, copy/paste from the terminal the unchanged text from the prompt/command line inclusing the output and up to and including the next prompt line between CODE tags, the # button in the post editor tool bar), I tried myself

boven:~ # enable printer
-bash: enable: printer: not a shell builtin
boven:~ # 

Which brought me into:

boven:~ # type enable
enable is a shell builtin
boven:~ # 

Then. consulting the bash man page:

enable -a] -dnps] -f filename] [name …]
Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, even though the shell normally searches for builtins before disk commands. If -n is used, each name is disabled; otherwise, names are enabled. For example, to use the test binary found via the PATH instead of the shell builtin version, run ``enable -n test’'. The -f option means to load the new builtin command name from shared object filename, on systems that support dynamic loading. The -d option will delete a builtin previously loaded with -f. If no name arguments are given, or if the -p option is supplied, a list of shell builtins is printed. With no other option arguments, the list consists of all enabled shell builtins. If -n is supplied, only disabled builtins are printed. If -a is supplied, the list printed includes all builtins, with an indication of whether or not each is enabled. If -s is supplied, the output is restricted to the POSIX special builtins. The return value is 0 unless a name is not a shell builtin or there is an error loading a new builtin from a shared object.

which shows that enable command has nothing to do with printer management.

Thus, a question to larryr:
Did you test what you advised before posting it above?

Log into the cups interface http://localhost:631 (user:root password:root user password) and check the status, might be stuck in maintenance mode. Perhaps the USB port it’s on goes to sleep, plug/unplug may help.

/QUOTE]Thus, a question to larryr:
Did you test what you advised before posting it above?[/QUOTE]

Works fine on Oracle Unix and HPUX. Used to work on Fedora 8. Left Redhat years ago for SUSE and I had not tried it on my Linux printer as I have not had it disable since Fedora 8 and 4 printers ago.

What used to be “enable” and “disable” on older Unix systems has been replaced with “cupsenable” and “cupsdisable” on CUPS-based Linux systems.

Apparently enable and disable were taken by apparmor in Linux.

I am old school UNIX - the command is now cupsenable - sorry about that

LLR1:~ # lpstat -v
device for Brother_HL-L2395DW_series: usb://Brother/HL-L2395DW%20series?serial=U64968L8XXXXXXX
LLR1:~ # cupsenable Brother_HL-L2395DW_series
LLR1:~ # lpstat -a
Brother_HL-L2395DW_series accepting requests since Mon Jan  3 08:44:10 2022
EPSON_ET_2720_Series_RMR accepting requests since Tue Jan  4 20:21:21 2022
LLR1:~ # whereis cupsenable
cupsenable: /usr/sbin/cupsenable /usr/share/man/man8/cupsenable.8.gz
LLR1:~ # 

The Apple CUPS site says that you may have to systemctl restart cups to take effect - does not on my 15.3 OpenSUSE.

Yes, I also thought at first that it was an advice to try out at least. I accept your explanation, I could have done the same myself. :shame:

[size=3]Update to enable and cups thoughts,

In cups the only status I can find is under CUPS -> Printers and says “idle” for HP ColorLaserJet MFP M278-M281 and also for the fax FP-FAX (same printer). No ref to maintenance mode.

cupsdisable puts the printer into “paused” status.
cupsenable puts printer back into “idle” status, as viewed in [/size]http://localhost:631

I was unaware of these commands. This will be worth a test when printer malfunctions.

I think the cause of my problrm does have to do with usb settings. I will research that some.

thanks, tom kosvic

I had this problem with a HP-p1005. In the end I just changed the usb printer cable (our hamster had gnawed the old one).

try adding this to the startup in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT line inside the " "
usbcore.autosuspend=-1 intel_pstate=disable

That will disable any USB power managment that might make the printer look offline.

thanks, larryr

I did as you suggested. and edited the /etc/default/grub file. Needs a reboot to take effect, I assume. Will do that and give it a whirl

thanks, tom kosvic

adding this to the startup in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT line inside the " "
usbcore.autosuspend=-1 intel_pstate=disable, as was suggested above did not work. Several reboots were done before a print job was needed so grub mods were in play…

A print job did not print. It just hung in queue as pending for an hour. In Yast -> printer -> edit, the printer was un-enabled again, i.e., enabled lost the check mark that was there previously.

Rechecking the enable box did not start the printer.

Did a plug removal restart of printer. Yast -> printer -> edit was again un-enabled. Upon rechecking the enable box, the print job started and ran fine.

I think I need either another diagnosis and/or another fix. Just an annoyance but due to location of printer plug, it makes for a pain.

Ideas needed. thanks, tom kosvic

Can it hook up to the network? If so, switch to that instead.

Any reason why network connection might be more stable than usb connection?

Yes, printer is network capable but I have only one computer on my wired network from the router so I just usb connected printer to the computer. Been that way for 3 or 4 years.

Will try the network alternative. I can try wifi or wired network connect. Then I guess I need to tell computer to print to network or perhaps tell cups to print to network.

thanks, tom kosvic

No fighting with USB :wink: Yes, delete and re-install the printer as a network one. I set a fixed IP address on mine, the P1102w never misses a beat, it’s on the wireless network as well, so can be moved if a family member needs it close by.