Skip to content

Instantly share code, notes, and snippets.

@Jim-Holmstroem
Created April 4, 2017 21:03
Show Gist options
  • Save Jim-Holmstroem/93f525393662f19a7f31d7c56e1c8a16 to your computer and use it in GitHub Desktop.
Save Jim-Holmstroem/93f525393662f19a7f31d7c56e1c8a16 to your computer and use it in GitHub Desktop.
arch linux auto connect to wifi problems (and fix) #rpi #raspberry. Had som issue with that the raspberry pi would not auto connect to the WiFi network, dispite that it worked when I started it manually. The below commands fixed it
sudo pacman -S polkit wpa_actiond
systemctl enable [email protected]
@Jim-Holmstroem
Copy link
Author

the connection to wlan0 that netctl-auto will use (in the example code) is setup with with wifi-menu (and not with netctl-auto, netctl, or anything else)
as I stated, the interfaces in netctl will conflict with netctl-auto, so I just clearified on which method to use for setup to get it right
it was something I setup almost 3 years ago, so the details are kinda blurry by now

@johnyradio
Copy link

johnyradio commented Dec 12, 2019

"Starting with version 1.20, netctl stopped depending on wpa_actiond for its automatic wireless connecting features" bugs.archlinux.org/task/61934

My recipe, tested on a standard arch install (2019) with systemd:

One-time setup:

Connect to a hotspot first time:

  • Run wifi-menu. Requires root.
    pkexec wifi-menu -o
    or
    sudo wifi-menu -o
    Leave off the -o to see network passwords as you type it.
  • Arrow down, pick your desired connection, hit enter, accept connection-name, enter password.
  • Add more hotspots as needed.

netctl-auto will automatically reconnect to the strongest available hotspot thereafter.

@Jim-Holmstroem
Copy link
Author

awesome @johnyradio thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment