You are not logged in.

#1 2023-12-02 15:11:01

slashdoc
Member
Registered: 2022-11-08
Posts: 12

[Solved] After adding a network printer all print dialogs are slow

Hi

I've tried to follow the CUPS instructions on the wiki, but I'm having trouble figuring out what or where to look at.

My system has KDE with X11 on a laptop and it was working very well. Until the day I had added a network printer at the university. The process has worked well, the printer works well and everything is fine when I'm connected to the university network.

However, whenever I'm out side that network, everyone of libreoffice applications takes a few minutes to open up. When I try to print in Firefox or Okular (KDE'a pdf viewer) the print dialog also takes a few minutes to show up.

That didn't happen at all before configuring the network printer. Since I use the print to pdf feature a lot, it has become really painful to use the system.

The problem now is that since the problem started, I had wondered if I had missed any modules required by CUPS, so I went a few times to that wiki page and I've tried to install and configure everything, expect for the local drivers parts. But the problem didn't go away. I have even discovered what might be an old problem or a new one: the printer adminstration setting in KDE show no printers (not even CUPS-PDF) and tells me that "The printing services are not available" and " Invalid file descriptor".

My system might be a mess: I've added both cups and wheel groups to my user account and I've tried to configure and reconfigure CUPS a few times (according to the wiki).

It seems that the slowness problem is that something in the system is trying to get to the network printers but can't because they are not always available. So after some sort of timeout, the systems goes back to work. It might also be related to ipv6 (something like "try ipv6, times out and then try IPv4 and confirms that the network is not accessible).

So I have a few questions:

1. Where can I look for log messages regarding my hypothesis? (I don't see anything related to that on cups logs, or I might be searching in the wrong place)

2. Is there a recommended group that I should add the user in order to control CUPS' printers and run the KDE settings page?

3. Is there any tips on what to do to fix what seems to be a problem related to network unavailability (other network?

Thanks

PS-> I didn't include any logs or configs, because I don't know where to start, sorry.

Last edited by slashdoc (2023-12-12 21:17:59)

Offline

#2 2023-12-02 15:48:19

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [Solved] After adding a network printer all print dialogs are slow

https://wiki.archlinux.org/title/CUPS/T … #Debug_log

Did you add the network printer through avahi or by direct IP?

Offline

#3 2023-12-03 08:01:00

slashdoc
Member
Registered: 2022-11-08
Posts: 12

Re: [Solved] After adding a network printer all print dialogs are slow

seth wrote:

Did you add the network printer through avahi or by direct IP?

I think it was by direct IP and then, after the problem started, I tried to configure avahi.

I've also noticed that whenever I'm not connected to the university network, those printers don't even show up on either cups administration web panel or in the printer dialogs of applications. I wanted to try to remove them to see the effect, but they don't show up.

The error.log file doesn't seem to get relevant information because at the time the delay started until it ended nothing was added to it.

W [03/Dec/2023:08:29:50 +0100] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
W [03/Dec/2023:08:29:50 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [03/Dec/2023:08:29:50 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [03/Dec/2023:08:29:50 +0100] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
E [03/Dec/2023:08:33:41 +0100] [Client 1] Unable to encrypt connection: A TLS fatal alert has been received.
I [03/Dec/2023:08:37:47 +0100] Listening to [v1.::1]:631 (IPv6)
I [03/Dec/2023:08:37:47 +0100] Listening to 127.0.0.1:631 (IPv4)
I [03/Dec/2023:08:37:47 +0100] Listening to /run/cups/cups.sock (Domain)
I [03/Dec/2023:08:37:47 +0100] Remote access is disabled.
D [03/Dec/2023:08:37:47 +0100] Added auto ServerAlias hotpizza
I [03/Dec/2023:08:37:47 +0100] Loaded configuration file "/etc/cups/cupsd.conf"
D [03/Dec/2023:08:37:47 +0100] Using keychain "/etc/cups/ssl" for server name "hotpizza".
I [03/Dec/2023:08:37:47 +0100] Using default TempDir of /var/spool/cups/tmp...
I [03/Dec/2023:08:37:47 +0100] Configured for up to 100 clients.
I [03/Dec/2023:08:37:47 +0100] Allowing up to 100 client connections per host.
I [03/Dec/2023:08:37:47 +0100] Using policy "default" as the default.
I [03/Dec/2023:08:37:47 +0100] Full reload is required.
I [03/Dec/2023:08:37:47 +0100] Loaded MIME database from "/usr/share/cups/mime" and "/etc/cups": 41 types, 31 filters...
D [03/Dec/2023:08:37:47 +0100] Loading printer Virtual_PDF_Printer...
D [03/Dec/2023:08:37:47 +0100] cupsdMarkDirty(P----)
D [03/Dec/2023:08:37:47 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients"
D [03/Dec/2023:08:37:47 +0100] load_ppd: Loading /etc/cups/ppd/Virtual_PDF_Printer.ppd...
D [03/Dec/2023:08:37:47 +0100] load_ppd: Saving /var/cache/cups/Virtual_PDF_Printer.data...
D [03/Dec/2023:08:37:48 +0100] Virtual_PDF_Printer: pdl='application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf'
D [03/Dec/2023:08:37:48 +0100] cupsdRegisterPrinter(p=0x55a0127a84a0(Virtual_PDF_Printer))
D [03/Dec/2023:08:37:48 +0100] Queue Virtual_PDF_Printer uses a printer driver, which is deprecated.
W [03/Dec/2023:08:37:48 +0100] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
I [03/Dec/2023:08:37:48 +0100] Loading job cache file "/var/cache/cups/job.cache"...
I [03/Dec/2023:08:37:48 +0100] Full reload complete.
D [03/Dec/2023:08:37:48 +0100] cupsdCleanFiles(path="/var/spool/cups/tmp", pattern="(null)")
I [03/Dec/2023:08:37:48 +0100] Cleaning out old files in "/var/spool/cups/tmp".
D [03/Dec/2023:08:37:48 +0100] cupsdCleanFiles(path="/var/cache/cups", pattern="*.ipp")
I [03/Dec/2023:08:37:48 +0100] Cleaning out old files in "/var/cache/cups".
D [03/Dec/2023:08:37:48 +0100] service_checkin: pid=4983
D [03/Dec/2023:08:37:48 +0100] service_checkin: 1 listeners.
D [03/Dec/2023:08:37:48 +0100] service_add_listener: Listener #1 at fd 3, "/run/cups/cups.sock".
D [03/Dec/2023:08:37:48 +0100] service_add_listener: Matched existing listener #1 to /run/cups/cups.sock.
D [03/Dec/2023:08:37:48 +0100] Creating KeepAlive/PID file "/var/cache/cups/org.cups.cupsd".
D [03/Dec/2023:08:37:48 +0100] Calling FindDeviceById(cups-Virtual_PDF_Printer)
D [03/Dec/2023:08:37:48 +0100] FindDeviceById failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
D [03/Dec/2023:08:37:48 +0100] Using profile ID "Virtual_PDF_Printer-Gray..".
D [03/Dec/2023:08:37:48 +0100] Calling CreateProfile(Virtual_PDF_Printer-Gray..,temp)
W [03/Dec/2023:08:37:48 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
D [03/Dec/2023:08:37:48 +0100] Using profile ID "Virtual_PDF_Printer-RGB..".
D [03/Dec/2023:08:37:48 +0100] Calling CreateProfile(Virtual_PDF_Printer-RGB..,temp)
W [03/Dec/2023:08:37:48 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
I [03/Dec/2023:08:37:48 +0100] Registering ICC color profiles for "Virtual_PDF_Printer".
D [03/Dec/2023:08:37:48 +0100] Calling CreateDevice(cups-Virtual_PDF_Printer,temp)
W [03/Dec/2023:08:37:48 +0100] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
I [03/Dec/2023:08:37:48 +0100] Listening to [v1.::1]:631 on fd 7...
I [03/Dec/2023:08:37:48 +0100] Listening to 127.0.0.1:631 on fd 8...
I [03/Dec/2023:08:37:48 +0100] Listening to /run/cups/cups.sock on fd 3...
I [03/Dec/2023:08:37:48 +0100] Resuming new connection processing...
D [03/Dec/2023:08:37:48 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [03/Dec/2023:08:37:48 +0100] cupsdAddCert: Adding certificate for PID 0
D [03/Dec/2023:08:37:48 +0100] Discarding unused server-started event...
D [03/Dec/2023:08:37:48 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [03/Dec/2023:08:37:49 +0100] Report: clients=0
D [03/Dec/2023:08:37:49 +0100] Report: jobs=0
D [03/Dec/2023:08:37:49 +0100] Report: jobs-active=0
D [03/Dec/2023:08:37:49 +0100] Report: printers=1
D [03/Dec/2023:08:37:49 +0100] Report: stringpool-string-count=1079
D [03/Dec/2023:08:37:49 +0100] Report: stringpool-alloc-bytes=8320
D [03/Dec/2023:08:37:49 +0100] Report: stringpool-total-bytes=20104
I [03/Dec/2023:08:38:18 +0100] Saving printers.conf...
D [03/Dec/2023:08:38:18 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Dirty files"

Last edited by slashdoc (2023-12-03 20:16:32)

Offline

#4 2023-12-03 12:04:00

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [Solved] After adding a network printer all print dialogs are slow

I think it was

lpstat -lep

Offline

#5 2023-12-03 20:34:21

slashdoc
Member
Registered: 2022-11-08
Posts: 12

Re: [Solved] After adding a network printer all print dialogs are slow

Thanks for the tip!

At first that command gave me, after a long delay:

$ lpstat -lep
lpstat: Scheduler is not running.

Then I looked it up and found some references on the internet to a client.conf file. I don't have one on /etc/cups/ but I've just remembered I had created it on in ~./cups/.

I had this in ~./cups/client.conf

ServerName printservice.uni-address.org
Encryption Required
User slashdoc

That domain resolves outside the university, but I guess its firewall just drops all external packets. So any attempt to connect to it times out or something. After I just removed those entries, the system got back to work as normal, except for that network printer...which now makes complete sense!

I think I was connecting to a remote CUPS server! That explains the weirdness for me: while I thought I was configuring the remote printer authentication, following some instructions on the university wiki, I was actually configuring my system to connect to a remote cups server with that authentication. And of course I then could see more then one printer although I was configuring just one! And none while outside.

It seems that I can`t directly connect to the printer, because it is a system that prints on any printer on campus. So, another question:

Is there a way (besides manually removing the configuration) to tell CUPS client to use first my local CUPS server and then check for a remote CUPS server? Is that even possible?

Offline

#6 2023-12-03 20:50:15

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [Solved] After adding a network printer all print dialogs are slow

You can control the print server via an environment variable per-process: https://wiki.archlinux.org/title/CUPS#W … UPS_server
The uni printers are not browseable via eg. IPP?

You could also use an /etc/hosts entry to conditionally resolve printservice.uni-address.org to 127.0.0.1

Offline

#7 2023-12-12 21:17:24

slashdoc
Member
Registered: 2022-11-08
Posts: 12

Re: [Solved] After adding a network printer all print dialogs are slow

Thanks, I'll try your ideas when I get there again.

Offline

Board footer

Powered by FluxBB