Title: "Fixing" iwlwifi 0000:03:00.0: Failed to run INIT ucode: -5
Date: 2021-12-15 14:30

Recently, I've encountered some WiFi issues with my [beloved
x230]({filename}/misc/work_from_home.md), the network card randomly not being
able to be loaded/detected:

```
Dec 15 14:17:55 grimhilde kernel: [151178.805738] iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Dec 15 14:17:56 grimhilde kernel: [151179.288475] iwlwifi 0000:03:00.0: Could not load the [0] uCode section
Dec 15 14:17:58 grimhilde iwd[181322]: Error bringing interface 30 up: Input/output error
Dec 15 14:17:58 grimhilde systemd-udevd[181341]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Dec 15 14:17:58 grimhilde NetworkManager[180423]: <info>  [1639574278.3966] device (wlan0): state change: unavailable -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Dec 15 14:17:58 grimhilde kernel: [151181.230858] iwlwifi 0000:03:00.0: Failed to run INIT ucode: -5
Dec 15 14:17:58 grimhilde kernel: [151181.230871] iwlwifi 0000:03:00.0: Unable to initialize device.
Dec 15 14:17:58 grimhilde NetworkManager[180423]: <info>  [1639574278.4002] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/7)
Dec 15 14:17:58 grimhilde NetworkManager[180423]: <info>  [1639574278.4030] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Dec 15 14:17:58 grimhilde kernel: [151181.376039] iwlwifi 0000:03:00.0: Radio type=0x0-0x3-0x1
Dec 15 14:17:59 grimhilde kernel: [151181.860362] iwlwifi 0000:03:00.0: Could not load the [0] uCode section
Dec 15 14:18:00 grimhilde NetworkManager[180423]: <warn>  [1639574280.9748] platform-linux: do-change-link[30]: failure changing link: failure 5 (Input/output error)
Dec 15 14:18:00 grimhilde kernel: [151183.810868] iwlwifi 0000:03:00.0: Failed to run INIT ucode: -5
Dec 15 14:18:00 grimhilde kernel: [151183.810909] iwlwifi 0000:03:00.0: Unable to initialize device.
```

It seems to be [this bug](https://bugzilla.kernel.org/show_bug.cgi?id=91171)
from 2015, marked as `CLOSED WILL_NOT_FIX`, and fortunately, a kind soul
[provided a workaround](https://bugzilla.kernel.org/show_bug.cgi?id=91171#c42):

```
# lspci | grep Centrino
03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
# echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove                                                                                                
# echo 1 > /sys/bus/pci/rescan
```

Apparently, this might be a hardware problem, meh.
