EDIT: This is now not working at all, and I still don't have a solution for it. Symptoms are as below: I can access the printer from ALL non-Ubuntu devices on the same LAN, but not from my Ubuntu 16.04 box. Any ideas? Thanks.


I'm trying to troubleshoot a connection from an ThinkPad E460 running Ubuntu 16.04 to a networked HP LaserJet Pro M402dw printer:

  • Laptop and printer connected to network via wifi.
  • Frequently goes from working to broken and back again within a few minutes, without my deliberately changing any settings.
  • Connection from laptop to Internet works fine.
  • Connection from other devices on LAN to printer work fine.

When it's working, I can ping the printer at its 192.168.1.xxx IP address from my laptop at 192.168.1.yyy. On Wireshark, the ping looks like this:

Time    Source         Destination    Protocol  Length  Info
[time]  192.168.1.yyy  192.168.1.xxx  ICMP      98      Echo (ping) request...
[time]  192.168.1.xxx  192.168.1.yyy  ICMP      98      Echo (ping) reply...

When it's not working, I can't ping the printer and arp -a reports its MAC address as "incomplete." On Wireshark, it's clear that the ping itself is never actually transmitted. Instead my laptop, at "IntelCor_[MAC]," sends an unanswered ARP request as follows:

Time    Source          Destination  Protocol  Length  Info
[time]  IntelCor_[MAC]  Broadcast    ARP       42      Who has 192.168.1.xxx? Tell 192.168.1.yyy

Following the suggestion here, I tried using a script in /etc/network/if-up.d/ to set a static ARP entry for the printer, as follows:

arp -i wlp1s0 -s 192.168.1.xxx [MAC address] # HP printer

It still works sometimes, but not always. The connection can drop after the network is up, and restarting the network doesn't necessarily fix it. With this static ARP entry in place, the failed ping request looks like this:

Time    Source         Destination    Protocol  Length   Info
[time]  192.168.1.yyy  192.168.1.xxx  ICMP      98       Echo (ping) request...(no response found!)

Note that this seems superficially similar to the networking problem described here, but I think I’ve already eliminated the possible software causes described in that thread. The only thing I haven't done is change out the physical network hardware.

Any suggestions on possible causes or how to troubleshoot further?


Additional information:

When it's not working:

  • I can’t access the printer’s web interface from my laptop.
  • When I try to print, Ubuntu printer properties window reports “Filter failed."
  • snmp, dnssd, lpinfo, and avahi-browse show no information about the printer.
  • I can still access the printer reliably from my iPhone and a Windows computer via the same wifi network.

Additional notes:

  • Printer sleep mode is off for testing.
  • Laptop’s iptables firewall is off for testing.
  • Printer’s firewall is off.
  • Printer’s access control list is set to allow all connections in the local network (192.168.xxx.0, subnetmask
  • The wifi network is a Unifi system with two wireless access points running under one network name. The DHCP server is on, and there are no duplicate IP addresses on the network.


Previously requested output:

    $ nmcli device
    DEVICE     TYPE      STATE        CONNECTION          
    wlp1s0     wifi      connected    [Network Name] 
    enp0s31f6  ethernet  unavailable  --                  
    lo         loopback  unmanaged    --                  

    $ ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet scope host lo
           valid_lft forever preferred_lft forever
    2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether [MAC address of laptop's ethernet card] brd ff:ff:ff:ff:ff:ff
    3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether [MAC address of laptop's wifi card] brd ff:ff:ff:ff:ff:ff
        inet brd scope global dynamic wlp1s0
           valid_lft 83676sec preferred_lft 83676sec
        inet6 [IPv6 address]/64 scope link 
           valid_lft forever preferred_lft forever

    $ sudo lshw -short -class network
    H/W path       Device     Class          Description
    /0/100/1c/0    wlp1s0     network        Dual Band Wireless-AC 3165 Plus Bluetoo
    /0/100/1f.6    enp0s31f6  network        Ethernet Connection I219-V

    $ rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
4: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

    $ ls -l /etc/resolv.conf
    lrwxrwxrwx 1 root root 29 Jan 10  2017 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

    $ ls -l /run/resolvconf/resolv.conf
    -rw-r--r-- 1 root root 196 Apr 17 10:56 /run/resolvconf/resolv.conf

Additional requested output:

$ nmcli device show wlp1s0 | grep IP4.DNS

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
search [domain.tld]

Note that [domain.tld] is the nonresolvable domain name appended to all of the hostnames on the LAN. Also, FWIW, I always ping and access the web interface by IP address rather than hostname. Whenever I can't print, I can't even acess the printer by IP address from my laptop.

Additional requested information:

sudo grep -r -n "" /run/resolvconf/* returns nothing.

There are only three files in /run/resolvconf:

/run/resolvconf/enable-updates: This is an empty file.

/run/resolvconf/resolv.conf: See above.


search [domain.tld]
  • Please edit your question and post output of the following commands: 1. nmcli device, 2. ip addr show, 3. sudo lshw -short -class network, 4. rfkill, and 5. ls -l /etc/resolv.conf – Marmayogi Apr 17 at 15:30
  • The command rfkill should run as it is. Since you are using Ubuntu 16.04, I am not sure about how it behaves (I never issued this command in 16.04). Please issue command rfkill list and post the output. – Marmayogi Apr 17 at 16:55
  • Please edit your question and post output of the following commands nmcli device show wlp1s0 | grep IP4.DNS and cat /etc/resolv.conf. – Marmayogi Apr 17 at 17:22
  • Please post the output of the command sudo grep -n "" /run/resolvconf/* – Marmayogi Apr 17 at 18:41
  • Shall we move to a chat session? – Marmayogi Apr 17 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.