λ su -c '/usr/bin/env bash -c echo "unloading network"; nmcli networking off; sleep 1; systemctl stop NetworkManager; sleep 2; echo "$(hwinfo --wlan | grep "Device File" | cut -d " " -f5)" > /tmp/device; $device="(cat /tmp/device)"; ip link set $device down; echo -e "\n--- unloading network ---\n"; sleep 3; lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs sudo rmmod; sleep 3; echo -e "\n--- restarting network ---\n"; sleep 3; modprobe -v iwlwifi swcrypto=1 11n_disable=8; sleep 3; ip link set $device up; sleep 2; systemctl start NetworkManager; sleep 2; nmcli networking on; sleep 2; nmcli r wifi off; sleep 2; nmcli r wifi on; echo -e "\n--- process completed ---\n"'
Password:
bash: line 1: =(cat /tmp/device): No such file or directory
Not enough information: "dev" argument is required.
--- unloading network ---
--- restarting network ---
insmod /lib/modules/5.16.10-zen1-1-zen/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst swcrypto=1 11n_disable=8
Not enough information: "dev" argument is required.
--- process completed ---
I think the reload worked, because wifi disconnected and reconnected. But after, folding the laptop still caused it to disconnect