Page 1 of 1

AirPrint in Trixie

Posted: Fri Oct 03, 2025 1:37 am
by in_sympathy
Hi all.

Installed a clean Trixie image - can't setup my old Samsung SCX-3400 printer over AirPrint.

I do this:

Code: Select all

sudo apt install cups*
sudo usermod -a -G lpadmin in_sympathy
sudo cupsctl --remote-any
sudo /etc/init.d/cups restart 
sudo apt-get install avahi-discover 
sudo apt install printer-driver-splix 
and then set up my printer on localhost:631. It used to work fine with Bookworm, but not with Trixie. Definitely there is some conflict with Control Center because as soon as I add a printer on CUPS WebUI - a duplicate of it appears on Control Center.

My Mac and iPhone start seeing two printers: Samsung SCX-3400 Series (location is RaspberryPi5) and "Raspberry5" - no name for a printer, just a location:
IMG_3035.jpeg
IMG_3035.jpeg (62.75 KiB) Viewed 1760 times
I tried everything I knew, but failed to succeed, so maybe you'll be able to help.

Re: AirPrint in Trixie

Posted: Fri Oct 03, 2025 7:18 am
by scruss
Those looks like enough commands to break IPP/AirPrint completely.

Is cups-ipp-utils installed?

Re: AirPrint in Trixie

Posted: Fri Oct 03, 2025 7:21 am
by spl23
in_sympathy wrote:
Fri Oct 03, 2025 1:37 am
Definitely there is some conflict with Control Center because as soon as I add a printer on CUPS WebUI - a duplicate of it appears on Control Center.
It's not a conflict; the Control Centre Printers plugin is a front-end onto CUPS, so if you add a printer to CUPS by some other mechanism, it will show up in Control Centre. I'd be more concerned if it didn't...

Re: AirPrint in Trixie

Posted: Fri Oct 03, 2025 8:42 am
by in_sympathy
scruss wrote:
Fri Oct 03, 2025 7:18 am
Those looks like enough commands to break IPP/AirPrint completely.

Is cups-ipp-utils installed?
Hi, it is installed

Re: AirPrint in Trixie

Posted: Fri Oct 03, 2025 10:06 am
by in_sympathy
spl23 wrote:
Fri Oct 03, 2025 7:21 am
in_sympathy wrote:
Fri Oct 03, 2025 1:37 am
Definitely there is some conflict with Control Center because as soon as I add a printer on CUPS WebUI - a duplicate of it appears on Control Center.
It's not a conflict; the Control Centre Printers plugin is a front-end onto CUPS, so if you add a printer to CUPS by some other mechanism, it will show up in Control Centre. I'd be more concerned if it didn't...
Can be, but something is badly off - whenever I add my printer on localhost:631 (CUPS WebUI) and share it the following happens:

1) I can print from the Pi itself no problem

2) If I try to print from the iPhone - it'll loop through trying to start printing forever. Sometimes it will display two printers (like I mentioned above), sometimes just one - doesn't matter - it won't actually print.

3) on the Mac it will mostly show two printers (again - like I mentioned above). Whenever I select any of those - Mac will try to get that printer set up - it'll take forever and will never succeed and will never therefore print

4) The UGLY - somehow after setting just one (!) printer via CUPS WebUI I end up with three (!!!) printers on Control Centre:
20251003_12h08m04s_grim.jpg
20251003_12h08m04s_grim.jpg (296.29 KiB) Viewed 1644 times
5) If that's not enough - I now have two (!!) printers on the CUPS WebUI:
Screenshot 2025年10月03日 at 13.07.01.png
Screenshot 2025年10月03日 at 13.07.01.png (144.52 KiB) Viewed 1642 times

Any ideas?

Re: AirPrint in Trixie

Posted: Fri Oct 03, 2025 10:39 am
by in_sympathy
Ok, some changes:

I removed avahi-discover, cups and anything related to both and reinstalled. Then added my printer again using CUPS WebUI.

Change: I did not put "RaspberryPi5" as a location this time and left what was default there - "Location: Local Printer":
Screenshot 2025年10月03日 at 13.33.44.png
Screenshot 2025年10月03日 at 13.33.44.png (243.67 KiB) Viewed 1626 times


Now it won't create duplicates on Control Centre or CUPS WebUI, but it has no name and no other devices would be able to connect to it or print:
Screenshot 2025年10月03日 at 13.33.26_.jpg
Screenshot 2025年10月03日 at 13.33.26_.jpg (356.52 KiB) Viewed 1626 times

Re: AirPrint in Trixie

Posted: Sat Oct 04, 2025 10:30 pm
by scruss
is it attached via usb, or wifi? wifi is easier, and all your other devices would find and negotiate without relying on a raspberry pi.

I installed Trixie on a Raspberry Pi 5, and my AirPrint printers were found and configured automatically. I did not have to add packages, configure CUPS, or do anything: they were there in the control panel. (Only thing wrong was that the paper size defaulted to a4).

These were the packages installed in a stock system related to printing:

Code: Select all

cups cups-browsed cups-client cups-common cups-core-drivers cups-daemon
cups-filters cups-filters-core-drivers cups-ipp-utils cups-pk-helper
cups-ppdc cups-server-common libcups2t64:arm64 libcupsfilters1t64:arm64
libcupsimage2t64:arm64 printer-driver-hpcups python3-cups:arm64
python3-cupshelpers

Re: AirPrint in Trixie

Posted: Sun Oct 05, 2025 12:20 am
by in_sympathy
scruss wrote:
Sat Oct 04, 2025 10:30 pm
is it attached via usb, or wifi? wifi is easier, and all your other devices would find and negotiate without relying on a raspberry pi.

I installed Trixie on a Raspberry Pi 5, and my AirPrint printers were found and configured automatically. I did not have to add packages, configure CUPS, or do anything: they were there in the control panel. (Only thing wrong was that the paper size defaulted to a4).

These were the packages installed in a stock system related to printing:

Code: Select all

cups cups-browsed cups-client cups-common cups-core-drivers cups-daemon
cups-filters cups-filters-core-drivers cups-ipp-utils cups-pk-helper
cups-ppdc cups-server-common libcups2t64:arm64 libcupsfilters1t64:arm64
libcupsimage2t64:arm64 printer-driver-hpcups python3-cups:arm64
python3-cupshelpers

Hey, cool, but sadly my SCX-3400 doesn’t have WiFi, so usb is the only option that worked just fine for years up until Trixie :)

Re: AirPrint in Trixie

Posted: Sun Oct 05, 2025 7:18 am
by scruss
Sorry, thought that "can't setup my old Samsung SCX-3400 printer over AirPrint" meant that you wanted to setup the printer over AirPrint, rather than setup your Raspberry Pi to provide an AirPrint shared printer service. All the other SCX-340xW printers are listed as AirPrint-compatible at https://openprinting.github.io/printers/

I wonder if it supports IPP over USB? There's a package for that

Re: AirPrint in Trixie

Posted: Sun Oct 05, 2025 3:25 pm
by in_sympathy
scruss wrote:
Sun Oct 05, 2025 7:18 am
Sorry, thought that "can't setup my old Samsung SCX-3400 printer over AirPrint" meant that you wanted to setup the printer over AirPrint, rather than setup your Raspberry Pi to provide an AirPrint shared printer service. All the other SCX-340xW printers are listed as AirPrint-compatible at https://openprinting.github.io/printers/

I wonder if it supports IPP over USB? There's a package for that
Thanks, I've checked - only 3400W models - ones with a build-in wifi module
Screenshot 2025年10月05日 at 18.26.38.png
Screenshot 2025年10月05日 at 18.26.38.png (97.69 KiB) Viewed 1498 times

But as for the printer itself - it works locally just fine, problem is with avahi-discover. I wonder if there is some alternative for sharing a usb printer as AirPrint with anything other (and better supported) than avahi 🤔

Re: AirPrint in Trixie

Posted: Sun Oct 05, 2025 4:43 pm
by scruss
maybe

Code: Select all

sudo apt install ipp-usb
?

though reading the docs at OpenPrinting/ipp-usb it may be doing the opposite function to what you want. It's hard to tell.

Re: AirPrint in Trixie

Posted: Mon Oct 06, 2025 6:09 pm
by in_sympathy
scruss wrote:
Sun Oct 05, 2025 4:43 pm
maybe

Code: Select all

sudo apt install ipp-usb
?

though reading the docs at OpenPrinting/ipp-usb it may be doing the opposite function to what you want. It's hard to tell.

my printer doesn't support it sadly.

I managed to get it to work somehow together with ChatGPT, but man - I have 3 similar printers as a result. Something is badly wrong on Trixie, I greatly regret updating. Everything worked like a charm on Bookworm - literally THAT SAME setup. And I have no clue how to make it work on this Trixie thing...

Re: AirPrint in Trixie

Posted: Wed Oct 08, 2025 12:58 pm
by in_sympathy
So has anyone else tried to setup AirPrint on Trixie and failed? :) Or has anyone managed to get it to work? If so - please ashore how did you do it

Re: AirPrint in Trixie

Posted: Sun Oct 12, 2025 6:53 pm
by DataNerd
I too have struggled to get an AirPrint server set up under Trixie. I tried 3 clean installs thinking I had something wrong in my setup, but no luck. So I did a clean install of bookworm 64 bit LITE on my Pi 3b, ran updates, installed CUPS, set up the printer being sure to check the box to share, and then installed avahi-daemon, BAM it works. I suspect that Trixie is blocking some protocol or something and I don't have the time to troubleshoot the issue, when rolling back to the previous OS worked and the whole setup took less than 5 minutes once I did.

Re: AirPrint in Trixie

Posted: Mon Oct 13, 2025 7:06 am
by in_sympathy
DataNerd wrote:
Sun Oct 12, 2025 6:53 pm
I too have struggled to get an AirPrint server set up under Trixie. I tried 3 clean installs thinking I had something wrong in my setup, but no luck. So I did a clean install of bookworm 64 bit LITE on my Pi 3b, ran updates, installed CUPS, set up the printer being sure to check the box to share, and then installed avahi-daemon, BAM it works. I suspect that Trixie is blocking some protocol or something and I don't have the time to troubleshoot the issue, when rolling back to the previous OS worked and the whole setup took less than 5 minutes once I did.
Exactly, glad it's not just me :). Hopefully someone will figure out what's wrong?new! with Trixie :)

Re: AirPrint in Trixie

Posted: Mon Oct 20, 2025 9:33 pm
by in_sympathy
Well I found a way to restore qbittorrent-nox on Trixie, but not the AirPrint as of yet. Just wondering if anyone else had better luck :)

Re: AirPrint in Trixie

Posted: Tue Oct 21, 2025 7:14 am
by gingis
found out that my printer would not print reliably or not at all over USB cable with newer editions of Linux.

after uninstalling "ipp-usb" it was beginning to function reliably with the correct driver from manufacturer.
ipp-usb was somehow inhibiting the use of the correct driver.

Re: AirPrint in Trixie

Posted: Tue Oct 21, 2025 10:17 am
by in_sympathy
gingis wrote:
Tue Oct 21, 2025 7:14 am
found out that my printer would not print reliably or not at all over USB cable with newer editions of Linux.

after uninstalling "ipp-usb" it was beginning to function reliably with the correct driver from manufacturer.
ipp-usb was somehow inhibiting the use of the correct driver.
Hey, good find 👍🏻.

Mine prints just fine locally - it’s just the sharing part (avahi) that malfunctions badly

Re: AirPrint in Trixie

Posted: Mon Nov 10, 2025 11:20 pm
by in_sympathy
Any updates regarding sharing printers over avahi in Trixie? Maybe there is some newer build of avahi?... Any ideas are very welcome - just want my AirPrint setup back 😊

Re: AirPrint in Trixie

Posted: Wed Nov 12, 2025 5:34 pm
by in_sympathy
So as I already mentioned, the issue is with avahi-discover or some other part of avahi.

I tried to build it from source and install that way - no change at all.

What I have a problem with is as follows: I set up a printer (Samsung SCX-3400 if that matters) that prints locally just fine.

But whenever I go to localhost:631 and check "Share this printer" checkbox - nothing happens - printer won't get visible on the network from other devices. Even worse - if I try to modify the printer again - that checkbox will be unchecked again as if I never turned it on.
Screenshot 2025年11月12日 193209.png
Screenshot 2025年11月12日 193209.png (32.29 KiB) Viewed 370 times
Please help me figure this out because it worked just fine on during Jessie-Bookworm era for many years :)

Re: AirPrint in Trixie

Posted: Fri Nov 14, 2025 4:14 pm
by in_sympathy
Say what you want about it, but ChatGPT helped to solve where CUPS failed - it was not really Avahi related issue.
Problem was that CUPS web interfrace won't save "Share this printer" option, so here are the steps I took to make it work:

------------
IMPORTANT:
potentially manually changing "Shared" to "Yes" in /etc/cups/printers.conf can be enough - give it a try :)

If not - here's more:


1. Build avahi from source (https://github.com/avahi/avahi) and then set it up as mentioned here:

Code: Select all

*** Quick install instructions (tested on Debian/Ubuntu only!) ***
While "configure" and "make" may be run as normal user all other commands
need to be run as root.
Configure the build system:
	$ autoreconf -if
	$ ./configure \
 --libdir="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" \
 --localstatedir=/var \
 --prefix=/usr \
 --runstatedir=/run \
 --sysconfdir=/etc
It should be noted that it's suitable for testing purposes only.
The script configuring the actual Debian package can be found at
https://salsa.debian.org/utopia-team/avahi/-/blob/debian/master/debian/rules?ref_type=heads.
Among other things it also turns on the hardening flags described at
https://wiki.debian.org/Hardening.
Build and install avahi:
	$ make
	# make install
	# ldconfig
Add a user and a group for avahi. (Debian specific)
	# addgroup --system avahi
	# adduser --system --no-create-home --ingroup avahi avahi
Ask D-Bus to re-read its policies:
	# systemctl reload dbus
Now start the Avahi daemon:
	# systemctl start avahi-daemon
Optionally start the unicast DNS configuration daemon:
	# systemctl start avahi-dnsconfd
To start the two daemons at boot time on Debian based distributions:
	# systemctl enable avahi-daemon
	# systemctl enable avahi-dnsconfd
If you plan to use avahi-autoipd you have to create the user/group
"avahi-autoipd" much the same way as "avahi".
2. Install printer-driver-splix (it installs CUPS and all required deps):

Code: Select all

sudo apt install printer-driver-splix
and setup CUPS:

Code: Select all

sudo usermod -a -G lpadmin (your user)
sudo cupsctl --remote-any
sudo /etc/init.d/cups restart
3. Added my printer using [url]http://localhost:631[/url]
4. [b]The root issue - let's make sure printer gets shared by using proper configs:[/b]
[code]sudo nano /etc/cups/printers.conf
and check that

Code: Select all

Shared Yes
then

Code: Select all

sudo nano /etc/cups/cupsd.conf
and use the following as a reference:

Code: Select all

# /etc/cups/cupsd.conf — updated version
LogLevel warn
PageLogFormat
MaxLogSize 0
ErrorPolicy retry-job
# Listen for HTTP and IPP on port 631 (all interfaces)
Port 631
Listen /run/cups/cups.sock
Browsing Yes
BrowseLocalProtocols all
DefaultShared Yes
DefaultAuthType Basic
WebInterface Yes
IdleExitTimeout 60
<Location />
 Order allow,deny
 Allow @LOCAL
 Allow all
</Location>
<Location /admin>
 AuthType Default
 Require user @SYSTEM
 Order allow,deny
 Allow @LOCAL
</Location>
<Location /admin/conf>
 AuthType Default
 Require user @SYSTEM
 Order allow,deny
 Allow @LOCAL
</Location>
<Location /admin/log>
 AuthType Default
 Require user @SYSTEM
 Order allow,deny
 Allow @LOCAL
</Location>
<Policy default>
 JobPrivateAccess default
 JobPrivateValues default
 SubscriptionPrivateAccess default
 SubscriptionPrivateValues default
 <Limit Create-Job Print-Job Print-URI Validate-Job>
 Order deny,allow
 </Limit>
 <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Current-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
 Require user @OWNER @SYSTEM
 Order deny,allow
 </Limit>
 <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
 AuthType Default
 Require user @SYSTEM
 Order deny,allow
 </Limit>
 <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
 AuthType Default
 Require user @SYSTEM
 Order deny,allow
 </Limit>
 <Limit Cancel-Job CUPS-Authenticate-Job>
 AuthType Default
 Require user @OWNER @SYSTEM
 Order deny,allow
 </Limit>
 <Limit All>
 Order deny,allow
 </Limit>
</Policy>
# End of file
after editing the file use this to check if the config has no errors:

Code: Select all

sudo cupsd -t
finally

Code: Select all

sudo systemctl daemon-reload
sudo systemctl restart cups.service

AltStyle によって変換されたページ (->オリジナル) /