Use following script to create rule, which disables wifi if the ethernet cable connection is up. The solution is based on this stackoverflow article.
Replace the
sudo cat > /etc/NetworkManager/dispatcher.d//99-disable-wifi-if-not-needed <<EOT
#!/bin/bash
if [ "$1" = "enp0s25" ]; then
case "$2" in
up)
nmcli radio wifi off
;;
down)
nmcli radio wifi on
;;
esac
fi
Replace the
enp0s25 with the correct "cable" interface if needed.
Komentáře