You are not logged in.
I usually run the following code after booting to initialise wpa_supplicant and connect to my saved wifi in the .conf file.
wpa_supplicant -i wlo1 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
I searched for some way to do this in the startup. I already enabled wpa_supplicant.service using systemctl but still its not even showing up in my pgrep output upon boot.
Please someone suggest a solution ?
Edited : I solved the problem. Thanks for everyone's contribution in guiding me to this solution.
Just rename and change path of the .conf file created as /etc/wpa_supplicant/wpa_supplicant-wlo1.conf. Then enable wpa_supplicant@wlo1.service. The service will identify the configuration file without us specifying. (try reading /usr/lib/systemd/system/wpa_supplicant@.service).
mv ".conf file path" /etc/wpa_supplicant/wpa_supplicant-wlo1.conf
systemctl enable wpa_supplicant@wlo1.service
Last edited by dongon104 (2019-07-16 19:06:19)
Offline
Post the status of the service you've enabled
systemctl status wpa_supplicant.service
systemctl list-unit-files --state=enabled
journalctl -b -u wpa_supplicant
Offline
Thanks V1del. This is the output.
>> systemctl status wpa_supplicant.service
● wpa_supplicant.service - WPA supplicant
Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-07-15 17:39:49 IST; 5h 15min ago
Main PID: 375 (wpa_supplicant)
Tasks: 1 (limit: 4915)
Memory: 1.6M
CGroup: /system.slice/wpa_supplicant.service
└─375 /usr/bin/wpa_supplicant -u
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
>> systemctl list-unit-files --state=enabled
UNIT FILE STATE
autovt@.service enabled
dbus-fi.w1.wpa_supplicant1.service enabled
dhcpcd.service enabled
display-manager.service enabled
gdm.service enabled
getty@.service enabled
wpa_supplicant.service enabled
remote-fs.target enabled
8 unit files listed.
>> journalctl -b -u wpa_supplicant
-- Logs begin at Fri 2018-08-17 21:54:37 IST, end at Mon 2019-07-15 23:00:13 IST. --
Jul 15 17:39:47 Arch-Linux systemd[1]: Starting WPA supplicant...
Jul 15 17:39:49 Arch-Linux wpa_supplicant[375]: Successfully initialized wpa_supplicant
Jul 15 17:39:49 Arch-Linux systemd[1]: Started WPA supplicant.
Offline
I'm not sure whether wpa_supplicant.service will work for you, you should use wpa_supplicant@.service, or - better yet in my opinion, enable the wpa_supplicant hook for dhcpcd as you have that enabled already.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Thanks Trilby. But I had already tried enabling wpa_supplicant@wlo1.service but its not working.
>> systemctl enable wpa_supplicant@wlo1.service
Failed to enable unit: File /etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlo1.service already exists and is a symlink to /etc/systemd/system/wpa_supplicant@wlo1.service.
There's no file such as wpa_supplicant@wlo1.sevice in /etc/systemd/system presently, although I did make one and deleted it while following some forum that didn't solve the problem.
The status report is :
>> systemctl status wpa_supplicant@wlo1.service
● wpa_supplicant@wlo1.service - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant@.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-07-15 17:39:49 IST; 6h ago
Process: 377 ExecStart=/usr/bin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlo1.conf -iwlo1 (code=exited, status=255)
Main PID: 377 (code=exited, status=255)
Jul 15 17:39:47 Arch-Linux systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jul 15 17:39:48 Arch-Linux wpa_supplicant[377]: Successfully initialized wpa_supplicant
Jul 15 17:39:48 Arch-Linux wpa_supplicant[377]: Failed to open config file '/etc/wpa_supplicant/wpa_supplicant-wlo1.conf', error: No s>
Jul 15 17:39:48 Arch-Linux wpa_supplicant[377]: Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant-wlo1.conf'.
Jul 15 17:39:49 Arch-Linux systemd[1]: wpa_supplicant@wlo1.service: Main process exited, code=exited, status=255/n/a
Jul 15 17:39:49 Arch-Linux systemd[1]: wpa_supplicant@wlo1.service: Failed with result 'exit-code'.
And I am sorry to say this, but I have no idea what a hook is or what I should do.
Offline
And I am sorry to say this, but I have no idea what a hook is or what I should do.
Offline
There should not be a wpa_supplicant@wlo.service file, that's not how the @.services work. But the @.service clearly failed due to not having an associated config file. I suspect the regular service failed due to it not being provided the correct interface name.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline