Announcement

Collapse
No announcement yet.

Printing stopped working -- how to debug?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Printing stopped working -- how to debug?

    Hi -- I have a Brother HL-L2460DW printer. I set it up in Kubuntu and it worked like a dream for a while. It connects to the same LAN as my desktop (desktop is wired, printer is wireless.)

    Now it doesn't work and I can't seem to straighten things out. Not sure if there was an update (or possibly it happened when I upgraded to 24.10, but I feel like it was working after that? I only print rarely so it's hard to say when the problem started.) A friend printed from their macos laptop over the wifi (using local LAN, not connecting direct to printer) and it detected, configured, and worked fine.

    When I go to the printers config in system settings, nothing is there ("no printers are currently set up"). When I "add printer" it finds the printer on the network and has the "driverless" option selected with a driverless:ipps://Brother... URL. I click "Select Recommended Driver" and back on the Add page I check "Default printer" and leave everything else as is. I click "Add", it says "Configuring printer, please wait..." and a few seconds later that banner disappears and then nothing. If I go back to the main page there are no printers added. However, if I wait a few more seconds, eventually it does present an error (oof, this UX is rough): "Failed to configure printer: The printer or class does not exist." The journal has the following output while it's trying to Add:

    Jan 28 17:23:44 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: IPP_INTERNAL_ERROR: clearing cookies and reconnecting
    Jan 28 17:23:44 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: Failed to reconnect Invalid argument
    Jan 28 17:23:51 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: IPP_INTERNAL_ERROR: clearing cookies and reconnecting
    Jan 28 17:23:51 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: Failed to reconnect Invalid argument
    Jan 28 17:23:57 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: IPP_INTERNAL_ERROR: clearing cookies and reconnecting
    Jan 28 17:23:57 capybara systemsettings[6906]: org.kde.plasma.printmanager.libkcups: Failed to reconnect Invalid argument
    Jan 28 17:23:57 capybara systemsettings[6906]: org.kde.plasma.printmanager.kcm: Failed to save printer/class "HL-L2460DW" "The printer or class does not exist."​

    Seems like the KDE configuration widget can't talk to cups? If in the printer dialog I click "Configure Print Server" and then "CUPS Print Server Admin" it opens http://localhost:631/admin and the CUPS admin page comes up... I seem to be able to navigate through that OK but I don't know enough to specify the correct URL. But CUPS does seem to be alive?

    Anyway, this is kind of a pile of stuff but if anyone can point me in a useful direction I'd very much appreciate it. I can't seem to google a thing about this. Thanks!
    Last edited by chconnor; Yesterday, 02:30 PM.

    #2
    Frankly, I can't tell you how to debug. However, I can point out a few things or rather, recommend a few things here. While it is nice to let the OS locate the printer, I found it "safer" to manually specify things. I have a laser printer (old cannon MFC) installed connected to the network (via ethernet) and here's what I did after learning my lesson back in the days when I ran MS Windows and it usually messed my printer settings up.
    1. Set a static IP address for your printer (whether it's configured to connect via Wi-Fi or Wired). Sometimes, DHCP lease times can mess around and not every time the OS catches the changes to the local LAN IP change. Safer this way.
    2. If you follow the point above, there's no need to let the OS search for the printer. Just add the IP address of the printer. Yes, the OS will still find it if you set a static IP. Either or doesn't make a difference but this practice makes it easier for me to troubleshoot any connectivity issues as I know where to look for any failed connection attempts. In addition, this prevents the OS from failing to find the address of the printer since it's set to static (don't do it from the printer or network interfaces file on your pc....set it at the router level)
    3. When the dialogue box shows up when the printer is found, be SURE to ascertain the name/model corresponds to the make/model of what's marked on the printer.
    4. Double check the manufacture's website to see if they have Linux drivers for the make/model. I ran into a similar "disappearing" printer issue as I'd follow the above steps for myself except the last one. The drivers provided by the OS worked sometimes, other times I got issues. When I checked Canon's website, they had drivers for the make and model. Downloaded, installed, and lo and behold, issue resolved.
    The above points should point you in a direction that's easier to diagnose and troubleshoot, maybe even solve the issue as well. Try it out if you can't find any resolution elsewhere.
    Last edited by Princey; Yesterday, 05:49 AM.
    Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
    _______________________________________________
    Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

    Comment


      #3
      Thanks; I'll have to read up on the various protocols and URL specifications because it's all greek to me (the IP stuff is straightforward enough, I just have no idea how cups works or what the various protocols are/mean, e.g. ipss://, "driverless", DNS-SD, etc). The printer worked perfectly before and the make/model is all correct, so something else seems to be going on. The errors listed above make me think it's not a printer or printer driver issue but rather a GUI/UX issue, but I'll do as you say and see how I get on. Side rant: it's kind of astounding how complicated printers still are in 2025. I thought we had left the microsoft 90's behind when it came to eldritch printer installation methods. :-) Edit: we have, it was a networking issue, apparently.
      Last edited by chconnor; Yesterday, 02:31 PM.

      Comment


        #4
        So, trying to add the printer manually via the cups web interface (http://localhost:631/admin/). When I click "Add printer" a username/password dialog pops up... entering my username/password, I see errors like this in the logs:

        Code:
        Jan 30 11:21:00 myhostname kernel: audit: type=1400 audit(1738264860.777:406): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cupsd" name="/etc/fscrypt.conf" pid=37925 comm="cupsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
        Jan 30 11:21:00 myhostname kernel: audit: type=1400 audit(1738264860.777:407): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cupsd" name="/home/.ecryptfs/myusename/.ecryptfs/Private.mnt" pid=37925 comm="cupsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
        Jan 30 11:21:00 myhostname cupsd[112156]: pam_ecryptfs: Passphrase file wrapped
        Jan 30 11:21:00 myhostname kernel: audit: type=1400 audit(1738264860.778:408): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cupsd" name="/home/.ecryptfs/myusename/.ecryptfs/wrapped-passphrase" pid=112156 comm="cupsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
        Jan 30 11:21:00 myhostname kernel: audit: type=1400 audit(1738264860.778:409): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cupsd" name="/home/.ecryptfs/myusename/.ecryptfs/wrapped-passphrase" pid=112156 comm="cupsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
        Jan 30 11:21:00 myhostname cupsd[112156]: pam_ecryptfs: Unable to rewrap passphrase file
        Jan 30 11:21:00 myhostname cupsd[112156]: Failed to detect wrapped passphrase version: Permission denied
        Jan 30 11:21:00 myhostname cupsd[112156]: Error attempting to unwrap passphrase from file [/home/myusename/.ecryptfs/wrapped-passphrase]; rc = [-13]
        Jan 30 11:21:00 myhostname cupsd[112156]: pam_ecryptfs: Error adding passphrase key token to user session keyring; rc = [-5]​​
        ...it seems like cups is trying to unwrap my ecryptfs passphrase? Why would it need/want to do that?

        Comment


          #5
          Got it working. Magic fix was getting the printer back into DHCP mode -- somehow it was in "auto" or something instead (maybe a power cut made it forget? but that would be odd...) I believed it was in DHCP mode already (and I'm sure a static IP would have worked as well, as Princey said) because my router assigned it an IP but apparently because it had a bad internal IP configured it was findable on the LAN via the printer discovery protocols but wouldn't actually work when communication was required?

          I still have no idea why the various errors in the journal were present (ecryptfs stuff, "Failed to reconnect Invalid argument", etc). Seems like a classic case of misleading/incomplete log entries and useless/misleading errors through the UX, but I'm clearly out of my depth, so I will restrain myself. :-)

          I did have some success adding the printer manually on the CLI, which is what led me to the DHCP issue, because the error there actually held meaning:

          Code:
          # lpadmin -v
          # lpadmin -p myprinter -D "myprinter" -E -v ipps://Brother%20HL-L2460DW._ipps._tcp.local/ -m everywhere
          ...but again, that wasn't necessary or useful in the end, since it's auto-detected and "just works" again.

          Comment

          Working...
          X