To get your printer working you will mainly need to install and setup cups.
If you choose the printer support option on the installer you will already have a working cups setup and only need to add your printer.
To start with cups and an usb connected printer:
sudo pacman -S cups cups-filters cups-pdf system-config-printer --needed
To get full cups with support for many different printers per default. Install this packages on top of that:
sudo pacman -S ghostscript gsfonts foomatic-db-engine foomatic-db foomatic-db-ppds foomatic-db-nonfree foomatic-db-nonfree-ppds gutenprint foomatic-db-gutenprint-ppds --needed
For QT environments (like KDE/plasma LXQT):
sudo pacman -S print-manager --needed
enable socket, which will listen if print-job is calling and then enable the service:
sudo systemctl enable --now cups.socket
or using the service, which will be running constantly.
sudo systemctl enable --now cups.service
For network printer support, check if avahi is installed and its daemon is running:
systemctl status avahi-daemon
if you get an error or it shows disabled not running:
sudo pacman -S avahi --needed sudo systemctl start avahi-daemon sudo systemctl enable avahi-daemon
Automatically add network printers:
CUPS can use Avahi browsing to discover unknown shared printers in your network. This can be useful in large setups where the server is unknown. To use this feature, set up local hostname resolution, and start both
cups-browsed.service. Jobs are sent directly to the printer without any processing so the created queues may not work, however driverless printers such as those supporting IPP Everywhere or AirPrint should work out of the box.
This is mainly usefull for mobile devices or for usage in offices where a number of changing network printers is used.
But you can use this at home too, it can be less troublesome in case, as you do not need to setup drivers and uri.
sudo systemctl enable --now cups-browsed.service
With this you will get network printers automatically added, without any need to setup..
Network printer not reachable
It is a common issue that you can not get wifi printers to print, especially some Brother wifi printers.
It can be required to enable local hostname resolution for avahi to be able to connect to your network printer:
Avahi provides local hostname resolution using a “hostname.local” naming scheme. To enable it, make sure the nss-mdns package is installed and
avahi-daemon.service is running:
pacman -Qs nss-mdns to see if it is installed local:
➜ ~ » pacman -Qs nss-mdns
glibc plugin providing host name resolution via mDNS
Make sure avahi-daemon is running:
systemctl status avahi-daemon.service
Then, edit the file
/etc/nsswitch.conf and change the
hosts line to include
mdns_minimal [NOTFOUND=return] before
Restart avahi-daemon and NetworkManager after this, or reboot machine:
sudo systemctl restart avahi-daemon NetworkManager
Firewall is blocking mdns:
If you are using GNOME or Pasma/KDE the printer setup tools inside their setting managers seem to not be able to set the firewall to let you detect network printers.
The easiest solution is to use system-config-printer application to setup the printer, as it will set firewall to let mdns in automatically.
In addition, using system-config-printer is known to work better in many cases. But you can use the integrated solutions later after using it to setup the printer initially later.
If you missed that and want to open the firewall manually for Network printing support use the firewalld-application:
switch to permanent configuration and enable ipp and ipp-client and mdns Services.
This will be permanent over reboots.
Procedure to find the right driver for your printer:
Go to the open printing website and search for whether your printer is supported on Linux at all, and what driver options are available.
This is what the result will look like:
- On top you will see whether or not there is a working driver for your printer
- second it will show available driver options, in the example, you see Type: Ghostscript built-in, so go to package search on Archlinux (or use the tool of your choice) you will find GhostScript (already installed if you followed the tutorial from top to bottom)
So install the driver available for your device, and proceed to install and configure the printer. But take a look at these links first, as it could be that your printer needs some extra configuration done to work properly:
Some links to common printers’ information on Archwiki:
- Canon printers
- Epson printers
- HP printers
- Lexmark printers
- Oki printers
- Samsung printers
- Brother printers
Notes on Common ways to install printer drivers:
Mostly all printers will be using cups as a backend to communicate with your system, but different brands will be needing different ways to get printers fully functional:
Hewlett and Packard (HP) printers:
Some of the HP-printers needs a proprietary plugin to work, this can be installed by hplip.
Here is an overview of some common printers and working drivers on Archwiki:
Most drivers for hp-printers come with the HPLIP package you can install this with:
sudo pacman -S hplip
install python-pyqt5 to run GUI and hp-toolbox:
sudo pacman -S python-pyqt5
now run the program to install new printer queue and the possibly needed proprietary plugin for some hp-printers:
sudo hp-setup -i for CLI install without a GUI
or run hp-setup from menu.
The tool guides you through the installation – simply read the instructions.
Current notes (29.5.2020):
There is currently an issue with getting keys from keyservers, this also seem to effect the hp-plugin. Verify downloaded plugin to see what caused a failed to install. To solve this you need to change the server used by the tool:
sudo nano /usr/share/hplip/base/validation.py
change the server to
keyserver.ubuntu.com like this:
def init(self, pgp_site = 'keyserver.ubuntu.com', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
Save the file by pressing [Ctrl+X].
sudo hp-setup -i again.
You have your printer added now, so you do not need to set it up again as what follows, but you can use system-config-printer to setup configuration for papersize e.t.c.
HP printers alternative driver (foo2zjs-nightly)
Uninstall hplip package:
sudo pacman -Rsc hplip
install foo2zjs-nightly from AUR:
yay -S foo2zjs-nightly
Use system-config-printer to set up your HP Printer.
Common printer setup (not if hplip is used):
Use the system-config-printer tool to find and set up your printer:
Under KDE/plasma or LXQT:
Brother Network Printers
Most newer Brother Network Printers can be set up driverless after you enable local hostname resolution (like described up here before).
Power on your Printer and start searching for it with system-config-printer GUI:Connect with us: