Printer's /dev/usb/lpx file disappears on ubuntu mate 20.04

On ubuntu mate 18.04 I used to send data in hexadecimal representation into a usb thermal printer with this command:

cat cmds.txt > /dev/usb/lpx

I upgraded to ubuntu mate 20.04 and realized, that the lpx file (belonging to the printer) does not appear in the /dev/usb folder, like on ubuntu mate 18.04. I have googled a little bit and found, that

dmesg | grep usblp

command should provide some useful information about connection of the printer. I am not skilled at this area, therefore I do not use proper terms at this point.

With its usage I realized, that: On Ubuntu 20.04 the output is :

$ dmesg | grep usblp
[ 17.634888] usblp 3-3:1.0: usblp1: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04F9 pid 0x209D
[ 17.634950] usbcore: registered new interface driver usblp
[ 35.318303] usblp1: removed

while on Ubuntu 18.04 the log does not end with removed keyword and the lpx file shows in the expected path. The printer shows in output of lsusb on both systems:

$ lsusb
Bus 003 Device 003: ID 04f9:209d Brother Industries, Ltd QL-820NWB P-touch Label Printer

I susspect that on ubuntu 20.04 there is some process removing the usblp. Since the usblp should be responsible for creation of lpx files, they do not show up.

My question is, how to get usblp working to show lpx files on ubuntu mate 20.04?

Thank you.

EDIT 1:

The output of command sudo journalctl --since="-5 minutes" related to the printer is following:

říj 31 20:50:53 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2.1: USB disconnect, device number 8
říj 31 20:50:54 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2.4: USB disconnect, device number 7
říj 31 20:50:58 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: USB disconnect, device number 6
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: new full-speed USB device number 9 using ehci-pci
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: New USB device found, idVendor=04f9, idProduct=209d, bcdDevice= 1.00
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: Product: QL-820NWB
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: Manufacturer: Brother
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usb 1-1.2: SerialNumber: 000M0Z803274
říj 31 20:51:11 dalibor-HP-EliteBook-8470p kernel: usblp 1-1.2:1.0: usblp1: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x04F9 pid 0x209D
říj 31 20:51:12 dalibor-HP-EliteBook-8470p systemd[1]: Starting Daemon to make IPP-over-USB printers available as network printers (001:009)...
říj 31 20:51:12 dalibor-HP-EliteBook-8470p kernel: usblp1: removed
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709872.880:52): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709872.900:53): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709872.940:54): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709872.940:55): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: TCP: request_sock_TCP: Possible SYN flooding on port 60000. Sending cookies. Check SNMP counters.
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709873.044:56): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p kernel: audit: type=1400 audit(1635709873.044:57): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:12 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:12 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:12 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:12 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:13 dalibor-HP-EliteBook-8470p audit[68483]: AVC apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=68483 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
říj 31 20:51:12 dalibor-HP-EliteBook-8470p systemd[1]: Started Daemon to make IPP-over-USB printers available as network printers (001:009).
říj 31 20:51:18 dalibor-HP-EliteBook-8470p ippusbxd[68483]: <-1643116800>Error: poll returned an unexpected event
říj 31 20:51:28 dalibor-HP-EliteBook-8470p sudo[68511]: dalibor : TTY=pts/2 ; PWD=/home/dalibor ; USER=root ; COMMAND=/usr/bin/journalctl --since=-5 minutes
2

1 Answer

Following the debugging procedure for USB printers on UBUNTU webpages , the command:

$ tail -f /var/log/syslog

provides an information, where the problem with proper initilaization of a USB printer lies. When the printer is plugged back into USB port, it followed that, there is an unexpected event emitted by ippusbxd:

ippusbxd: <1468000000>Error: poll returned an unexpected event

This can be seen as well from log in EDIT 1 of the QUESTION.

Similar problems with non-working USB printers have been reported on UBUNUTU 20.04.

A similar bug has been reported officially. Worth to say, that ippusbxd crashes after its each start in my case.

Fortunately, the community managed to get a solution of this problem:

Yes, CUPS wants to deprecate drivers and go all IPP with printers; however, that part of Ubuntu seems to be broken when there is a simple printer plugged in to a simple USB port.

I totally removed ippusbxd

In my case, by using the command:

sudo apt-get remove --auto-remove ippusbxd

the issue has been solved. The files lpx appeared in the /dev/usb/ directory again.

Some functionality can be lost by removing of the ippusbxd package. But in my case, I do not observe any strange behavior of the OS. Together with installed driver, I am able to print with my thermal printer again with command:.

cat textfile | lp -d QL820NWB

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like