I have NixOS installed on a desktop computer.
An HP LaserJet 1018 is connected to the desktop computer with a USB cable. After installing NixOS on the computer I had several months of problem free printing with this printer.
This month I changed the graphical X environment from i3 to XFCE in my configuration file and updated the system with nixos-rebuild switch --upgrade
.
I noticed that after the updating and switching to XFCE the laser printer stoped working.
My user is a member of the lp gproup. groups
outputs users wheel disk floppy lp networkmanager scanner
.
The printer shows up in the output of lsusb
as Bus 002 Device 003: ID 03f0:4117 HP, Inc LaserJet 1018
systemctl status cups
outputs:
“”"
● cups.service - CUPS Scheduler
Loaded: loaded (/etc/systemd/system/cups.service; linked; preset: enabled)
Drop-In: /nix/store/4fd053x4cckjjfx555f41gpnbfalpvcm-system-units/cups.service.d
└─overrides.conf
Active: active (running) since Mon 2024-05-20 12:01:18 EDT; 5h 21min ago
TriggeredBy: ● cups.socket
Docs: man:cupsd(8)
Process: 1044 ExecStartPre=/nix/store/08klwiwrfyvfcjcgfq43zz2chnbily5x-unit-script-cups-pre-start/bin/cups-pre-star>
Main PID: 1087 (cupsd)
Status: “Scheduler is running…”
IP: 296B in, 72B out
IO: 88.0M read, 8.1M written
Tasks: 5 (limit: 9354)
Memory: 54.1M
CPU: 3.506s
CGroup: /system.slice/cups.service
├─1087 /nix/store/fhi4f3p9kj2cil28pa6fwp2r0hp8mpg9-cups-2.4.7/sbin/cupsd -l
├─1093 /nix/store/ph4y49g1ymq1s6mlam0amfp0602xv2zy-cups-progs/lib/cups/notifier/dbus dbus://
├─1094 /nix/store/ph4y49g1ymq1s6mlam0amfp0602xv2zy-cups-progs/lib/cups/notifier/dbus dbus://
├─1095 /nix/store/ph4y49g1ymq1s6mlam0amfp0602xv2zy-cups-progs/lib/cups/notifier/dbus dbus://
└─6583 /nix/store/ph4y49g1ymq1s6mlam0amfp0602xv2zy-cups-progs/lib/cups/notifier/dbus dbus://
“”"
I have not been successful at getting the printer to work again. Here are some of the things that I have tried to get the printer to work:
- turning it off and on again
- rebooting the computer
- trying a know good USB cable
- switching back to i3
- switching to MATE
The relavant parts of my /etc/nixos/configuration.nix:
“””
environment.systemPackages = with pkgs; [ hplipWithPlugin ];
#printer setup
services.printing.enable = true;
services.printing.drivers = [ pkgs.hplipWithPlugin ];
services.avahi.enable = true;
“””
System packages truncated to just the printer driver for brevity of this post.
The HP Device Manager program showed that whenever I tried printing, under the Printer Control tab the printers status would change to stoped from Started/Idle. If I then started it by clicking Start Printer button the I would get a message about a connection error.
In the HP Device Manager program I tried to remove the printer and readd it using the USB connection type. But then the HP Device Manager program does not find the printer.
I would appreciate suggestions on things I can try to get this printer to work again.
I can provide further information to further diagnose the issue.