"RTNETLINK answers: Input/Output error" given when trying to bring interface up

by glS   Last Updated February 27, 2018 16:02 PM

This issue seems to have happened to many people in the last years, and I could find it discussed in several forums and questions around. However, most of such discussions ended up dying without clear solutions, or were not clearly stated, hence my trying it again here.

 The problem

 Connection dies silently

I'm trying to connect to a public wifi network (a university network to be precise) using my laptop (a Dell Precision M3800). The connection is initially successful, but after some time (I couldn't figure out how much: sometimes it's just a few minutes, sometimes hours) it just stops working.

By stops working here I mean that while apparently the connection is still up, when I try to actually go to some website, or ping some address, nothing initially happens. Notably, at this point everything still shows the connection as up. Both the Network Manager icon, and the outputs of nmcli dev, nmcli g and nmcli dev wifi say that we are successfully connected.

After some time, while nmcli dev and nmcli g still say everything is fine, nmcli dev wifi now only detects the connection we are supposed to be connected right now (even though I know there are other APs available).

 Trying to reset the connection

If I do nothing, the situation stays as above. If I now try and reset the connection, we get to the error as per the title. For the purpose, I use sudo service network-manager restart. Here is the state reported by various tools at this point:

  1. ip link still reports the interface as up, with a line of the form ... wlp6s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> ... (note the UP portion).
  2. On the other hand, iw reports the interface as down: the output of iw dev wlp6s0 link is Not connected.
  3. nmcli reports the interface as down. In particular, nmcli dev reports the state as disconnected, and same for nmcli g. Interestingly, nmcli g still reports the WIFI as enabled. This is confirmed by the output of nmcli radio, which reports everything as enabled.
  4. The Network Manager icon just says disconnected with no visible option to reconnect.

Try to bring the interface up again, get RTNETLINK error

At this point I'm kind of short of ideas, so I just try and reset the connection via ip, which still doesn't register it as down. I use sudo ip link set wlp6s0 down and then sudo ip link set wlp6s0 up. The first command succeed, as confirmed by the output of ip link. The second command however fails with

RTNETLINK answers: Input/Output error

Additional interesting information is given by dmesg. When the error occurs, a whole lot of errors are given by iwlwifi. I uploaded the whole dmesg dump on this gist. The error is most likely to be traced to what is going on at around L1049. After the connection is dead, until I force a reset of the network manager, we get the loop of iwlwifi errors that starts at L1100, and only ends because that is the point at which I run dmesg.

When I then try to run ip link set wlp6s0 up, and get our beloved error, the following lines are printed in the dmesg:

[  +9.727062] iwlwifi 0000:06:00.0: Failed to wake NIC for hcmd
[  +0.000047] iwlwifi 0000:06:00.0: Error sending MAC_CONTEXT_CMD: enqueue_hcmd failed: -5
[  +0.000006] iwlwifi 0000:06:00.0: Failed to remove MAC context: -5
[ +13.220958] iwlwifi 0000:06:00.0: Could not load the [0] uCode section
[  +0.000007] iwlwifi 0000:06:00.0: Failed to start INIT ucode: -5
[  +0.000002] iwlwifi 0000:06:00.0: Failed to run INIT ucode: -5
[  +0.000001] iwlwifi 0000:06:00.0: Failed to start RT ucode: -5
[Feb27 12:59] iwlwifi 0000:06:00.0: Could not load the [0] uCode section
[  +0.000007] iwlwifi 0000:06:00.0: Failed to start INIT ucode: -5
[  +0.000002] iwlwifi 0000:06:00.0: Failed to run INIT ucode: -5
[  +0.000002] iwlwifi 0000:06:00.0: Failed to start RT ucode: -5

Technical info

Network adapter model details, as given by lspci -k | grep -A3 Network:

06:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)
    Subsystem: Intel Corporation Dual Band Wireless-AC 7260
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

The device is a Dell Precision M3800 laptop, running ubuntu 16.04 64-bit.

 Relevant additional information

  1. No other device that I know of gives the same problem with this connection, also, the same device mostly doesn't show this problem on any other wifi network. It does happen sometimes, but it is rare and usually easily solved by resetting the connection. This seems to imply the problem must lie in the combination between this particular device and this particular network, which is what makes it so nasty.

  2. I used to have windows 10 on this same device, and it gave the same problem. It was arguably even worst, as if I tried to reboot while the wifi was not working, the laptop would often hang during the reboot and end up in a BSOD. After I tried to install different network adapter drivers this was somewhat less common, but still to bring the interface up again I have to go through a weird procedure of disabling and reenabling the network adapter via the control panel multiple times.

 Other posts where this issue was brought up

  • Unable to set up wifi via systemd-networkd (archlinux forums). Not completely relevant to my case as the OP there is using systemd-networkd. The message is given when trying to bring the interface up via ip link set wlp2s0f0 up. OP claims to have solved the problem correcting a faulty wpa_supplicant configuration file, which I don't if it applies to the present case.

  • [Solved] Problem getting wireless to connect (archlinux forums). The error message is again given trying to bring the interface up with ip link set wlp2s0 up. The cause seemed to be a conflict between NetworkManager and dhcpcd that were both running. OP claims to have solved the problem disabling dhcpcd via systemctl. Probably doesn't apply here.

  • Wifi not working RTNETLINK answers: Input/output error (archlinux forums). Possibly same problem as above, but OP abandoned the post.

  • [Solved] RTNETLINK answers: Input/output error (archlinux forums). Error given by ip link set wlo1 up. No solutions reached.

  • wifi doesn't work with various error messages [closed] (askubuntu). Error given by ip link set wlo1up. Post closed an unclear.

  • Wireless disconnects without a reason and stops working (ubuntuforums). The suggested solution was to use sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf to disable Network Manager from enabling wireless power management. OP never came back to the post to say whether it worked for him, but this didn't work for me.

  • Several other posts can be found, especially on the arch linux forums and on askubuntu.

Related Questions

Intel Wireless-N 1030 Driver

Updated February 21, 2019 14:02 PM

Ubuntu 16.04 wifi not working

Updated November 14, 2016 07:29 AM

Wifi losing connection, weak signal

Updated August 11, 2015 17:01 PM