r/voidlinux • • 2d ago

solved Unable to connect to internet

Post image

I just installed void linux using tony-btw’s tutorial and everything was done smoothly and before hand i had connected to my wifi using the void-installer but after installing the os it randomly disconnected to my wifi and now im trying to use the wpa_cli to connect to it but it says could not connect to wpa_supplicant: (nil) - retrying

is there a fix to this or shall i completely reinstall it

33 Upvotes

17 comments sorted by

9

u/BrunusManOWar 2d ago

What's the output of "ls /var/service"?

Also try "sudo resolvconf -u" to reconfigure DNS

3

u/Quandle_Toenail 2d ago

the output is
agetty-tty1 agetty-tty2 same goes on till tty6 then dbus dhcpcd udevd

9

u/newteamain 2d ago

Put in terminal this: ln -s /etc/sv/wpa_supplicant /var/service/

6

u/Quandle_Toenail 2d ago

THANK YOU SO MUCH! i can finally connect now

11

u/BrunusManOWar 1d ago

Also, prefer the void Linux handbook + arch wiki to online tutorials

10

u/ShipshapeMobileRV 1d ago

If you don't fully understand what that command does:

"Put in terminal this: ln -s /etc/sv/wpa_supplicant /var/service/"

When you installed wpa_supplicant it put everything into /etc/sv/wpa_supplicant/. This is normal.

However, Void's init system 'runit' doesn't see anything in that location, so it didn't start wpa_supplicamt for you. Runit only looks (by default) in /var/service/ to see what services/daemons you want it to manage.

The command that you ran (ln -s) created a symbolic link in /var/service/ that points to /etc/sv/wpa_supplicant. After that, runit saw that you wanted it to manage wpa_supplicant, and started it for you.

A symbolic link is a "shortcut" in Windows terminology; but really is nothing more than a pointer to a file that exists somewhere else.

This same symbolic link process is used for any services or even executable scripts that you want runit to manage; simply find where the file is, and create a symbolic link to it in /var/service/.

5

u/Dakota-Batterlation 1d ago

To clarify, linking from /etc/sv/foo to /var/service/foo is the equivalent of systemctl enable --now on typical Linux distros.

To disable a service, either remove the symlink with rm /var/service/foo, or create a down file in the directory touch /etc/sv/foo/down


There's also sv status, sv stop, sv start, and sv restart, which are analogous to their systemctl counterparts.

3

u/Bilbo_Swaggins11 1d ago

I need more explanations just like this one. The whole point of me starting with void was to learn terminal commands a bit more after using only mint and fedora, but I ended up using llm's and YouTube guides

3

u/BrunusManOWar 2d ago

Yes, he's missing wpa supplicant

Though most people I think use NetworkManager exclusively rather

2

u/newteamain 2d ago

I use iwctl, first used this in Arch Linux because it's default in there

1

u/EditorOne5312 1d ago

I tried that before and removing wpa_supplicant makes NetworkManager unable to connect to WiFi, so I have to turn on both by default. Is there's something wrong with my setup?

2

u/BidAffectionate6660 1d ago

what does this command actually do? It links the wpa_supplicant and puts it in the service directory, where the runit initsystem controls the deamons, right?

2

u/Nealan_XV 1d ago

yes, you create sys links to turn on services in runit, you can also remove it to turn it off or use sv commands

3

u/Due_Dragonfly_5328 1d ago

are you sure the wpa_supplicant service is actually running?

2

u/Simple_Hamster_4096 1d ago

Does anyone ever read the Void documents?

Apparently not.

If this is your first go at Linux, go with Linux Mint, it's far kinder to newcomers... Void isn't a beginner distro...

1

u/TuxLibertario 1d ago

Mesmo que o serviço de Wi-Fi esteja habilitado e em execução, a placa de rede sem fio pode não ser reconhecida pelo kernel.

Isso acontece porque o serviço de Wi-Fi e o reconhecimento do hardware são coisas diferentes.

Verifica se falta Firmware

rfkill list
ip link
lsmod | grep -iE 'wifi|wlan|80211'
sudo dmesg | grep -iE 'wifi|wlan|firmware|wireless'
lsusb
lspci

0

u/Imaginary-Shake-6150 1d ago

I think this might be an issue related to openresolv package, even though that it supposed to be fixed according to this report.

I've just had network problems as well, but adding "[main] rc-manager=file" to "/etc/NetworkManager/NetworkManager.conf" helped in my case.