michaelrsweet / lprint

A Label Printer Application
https://www.msweet.org/lprint
Apache License 2.0
219 stars 29 forks source link

GK420D not detected on USB #140

Open robehickman opened 2 months ago

robehickman commented 2 months ago

I installed lprint via snap as discussed on the website, but lprint is not seeing the GK420D I have connected via USB when I run 'lprint devices'. It shows up in 'lsusb'. I see no 'GK' models in the list when running 'lprint drivers', but the printer model is mentioned in this issue from a few years ago:

https://github.com/michaelrsweet/lprint/issues/37

Has support for this printer been removed? I'm on ubuntu 22.4 if that makes any difference.

michaelrsweet commented 2 months ago

Do you have lprint running as root?

robehickman commented 2 months ago

hi @michaelrsweet, I started the server using sudo snap start lprint.lprint-server as discussed in the documentation. Just to be sure I've re-run all of the install commands including this one and it still isn't detecting the printer. lprint devices freezes for a few seconds then displays nothing.

The printer works as expected from windows using the official zebra drivers. It will also print (but looks awful) through the standard cups driver on linux. The dithering issue is how I found out about lprint.

lprint shows up in pstree, which presumably is the server.

michaelrsweet commented 2 months ago

Hmm, OK does the LPrint log show any errors when listing the available devices?

And just to be sure, you did run:

sudo snap connect lprint:raw-usb

Do you see anything relevant in the system log or the dmesg output?

robehickman commented 2 months ago

I'm sure that I ran that command when I installed it, but re ran it and it hasn't changed anything. Where does the snap version of lprint put its log file?

I'm seeing the following show in the dmesg log when running lprint devices, the first lines here may not be relevant:

[May 3 15:13] audit: type=1400 audit(1714745605.173:3503): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/21465/usr/lib/snapd/snap-confine" pid=113787 comm="snap-confine" capability=12  cap>
[  +0.000018] audit: type=1400 audit(1714745605.173:3504): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/21465/usr/lib/snapd/snap-confine" pid=113787 comm="snap-confine" capability=38  cap>
[  +4.139351] audit: type=1326 audit(1714745609.312:3505): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=snap.lprint.lprint-server pid=90499 comm="lprint" exe="/snap/lprint/440/bin/lprint" sig=0 arch=c000003e sy>
[ +28.901737] audit: type=1326 audit(1714745638.211:3506): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=snap.lprint.lprint-server pid=90499 comm="lprint" exe="/snap/lprint/440/bin/lprint" sig=0 arch=c000003e sy>
michaelrsweet commented 1 month ago

Can you try running the following commands and report the output?

snap info lprint
snap connections lprint
robehickman commented 1 month ago

Hi @michaelrsweet, here you go :)

name:      lprint
summary:   A Label Printer Application
publisher: Michael Sweet (michaelrsweet)
store-url: https://snapcraft.io/lprint
license:   unset
description: |
  LPrint implements printing for a variety of common label and receipt
  printers
  connected via network or USB.  Features include:

  - A single executable handles spooling, status, and server functionality.
  - Multiple printer support.
  - Each printer implements an IPP Everywhere™ print service and is
  compatible
    with the driverless printing support in iOS, macOS, and Linux clients.
  - Each printer can support options such as label modes, tear-off offsets,
    media tracking, media top offset, print darkness, resolution, roll
    selection, and speed.
  - Each printer can print "raw", Apple/PWG Raster, and/or PNG files.

  For more information, see the file "DOCUMENTATION.md", the man pages in the
  "man" directory, and/or the LPrint project page at
  "https://www.msweet.org/lprint".
commands:
  - lprint
services:
  lprint.lprint-server: simple, enabled, active
snap-id:      z83tP2AxwcXcUTH4af7M1LcXnXoe99Xz
tracking:     latest/stable
refresh-date: 15 days ago, at 19:37 BST
channels:
  latest/stable:    1.3.2 2024-05-02 (494) 12MB -
  latest/candidate: 1.3.2 2024-05-02 (494) 12MB -
  latest/beta:      1.3.2 2024-05-02 (494) 12MB -
  latest/edge:      1.3.2 2024-05-18 (500) 12MB -
installed:          1.3.2            (494) 12MB -
Interface        Plug                    Slot            Notes
avahi-control    lprint:avahi-control    :avahi-control  manual
home             lprint:home             :home           -
network          lprint:network          :network        -
network-bind     lprint:network-bind     :network-bind   -
network-manager  lprint:network-manager  -               -
raw-usb          lprint:raw-usb          :raw-usb        manual