I have an HP Deskjet 1510 printer that is usb connected to an Ubuntu Server 12.04 LTS machine. In order to power on the server I use wake on lan from my smartphone. However the printer that is physically next to the server remains powered off. The printer is behaving as it's supposed to, it is designed to power off itself after a certain period of time if it's not used. The printer does have a power button on it, which I have to press if i want it to turn on.

Now since many times I wake the server just to print, having to go to the server place and power on the printer, kinda defeats the purpose of waking up the server remotely.

The printer is managed with CUPS and is working just fine when it's powered on.

Is it possible for the printer to be powered on from the usb connection? Here is what I've tried so far:

$ cupsenable HP_Deskjet_1510

This just returns (successfully I guess)

$ lpstat -v
device for HP_Deskjet_1510: usb://HP/Deskjet%201510%20series?serial=CN5192F06B05XJ&interface=1

$ /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=6

$ usb_printerid /dev/usb/lp0
Error: No such file or directory: can't open '/dev/usb/lp0'

After each command I did 3 things:

  1. Check if the power led was lit on the printer, or if the printer made any sounds
  2. Send a page from Microsoft Word, from my main computer to print
  3. Check the "Printers" page in the cups web interface to see if the job was sent and registered

None of those things happened, no lit leds, no sounds, no pages been sent to cups (the job page was empty).

Since those efforts gave no results, I searched for a usb power on approach

$ lsusb
Bus 002 Device 002: ID 045e:009d Microsoft Corp. Wireless Optical Desktop 3.0
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The printer doesn't seem to be listed, only my wireless keyboard. Regardless I powered on each usb device blindly:

$ echo on > /sys/bus/usb/devices/usb1/power/level
$ echo on > /sys/bus/usb/devices/usb2/power/level
$ echo on > /sys/bus/usb/devices/usb3/power/level
$ echo on > /sys/bus/usb/devices/usb4/power/level
$ echo on > /sys/bus/usb/devices/usb5/power/level

Again the led didn't lit, and no sounds were heard. I sent a test page again and now it seems to go through cups:

$ lpstat -t
scheduler is running
no system default destination
device for HP_Deskjet_1510: usb://HP/Deskjet%201510%20series?serial=CN5192F06B05XJ&interface=1
HP_Deskjet_1510 accepting requests since Mon 30 Nov 2015 10:51:02 PM EET
printer HP_Deskjet_1510 is idle.  enabled since Mon 30 Nov 2015 10:51:02 PM EET
        Waiting for printer to become available.
HP_Deskjet_1510-122     unknown          18432   Mon 30 Nov 2015 10:55:24 PM EET

I can't correlate this with the fact that I tried usb power on, but that is the sequence I performed the steps. Through the whole procedure I randomly restarted the cups service after the steps to see if maybe that would help but it didn't

I don't think I can power it on somehow but any ideas are welcome, even the hacky ones.

up vote 0 down vote accepted

Ok so I didn't look up the basics before doing all this work. From HP's site:

http://support.hp.com/us-en/product/HP-Deskjet-1510-All-in-One-Printer-series/5157551/model/5157552/document/c04183583/ under "Why is my printer turning off automatically?"

So this "Auto power off" feature has to be disabled somehow. Apparently this can't be done from hplip in linux:

https://bugs.launchpad.net/hplip/+bug/1205142 (by the way, the guy in the second post there is 100% on point with my issue)

So a work around as suggested, is to plug the printer in a Windows machine. Then according to this manual

ht tp://h10032.www1.hp.com/ctg/Manual/c03832527 page 13 (can't post more than 2 links)

you can set the feature off from the hp's software utility.

Now I'm hoping this won't change If I plug it back to the server. I'll post back after I've tested this with a comment.

  • It looks like it's working, The printer hasn't shut down in like 15 hours and the server is powered off – Tasos Dec 1 '15 at 21:22

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.