You are not logged in.

#1 2016-07-14 12:19:35

jerf
Member
Registered: 2009-06-03
Posts: 33

[solved] systemd launches wpa_supplicant, prevents netctl from working

After a recent update I started getting the following issue.

I use netctl to automatically connect to wireless and wired networks on my laptop. After a recent update it stopped working. Long story short, it turned out that systemd for some reason started launching an instance of wpa_supplicant (with -u argument) before starting the netctl service, which prevents netctl from working, since wpa_supplicant internally used by netctl fails to authenticate if there is another instance of wpa_supplicant already running.

wpa_supplicant is getting launched by systemd even if I disable netctl and (and I don't have any other network-related services). Here are the services which are enabled if I disable netctl:

$ systemctl list-unit-files --type=service | grep enabled
asus-kbd-backlight.service                 enabled 
autovt@.service                            enabled 
display-manager.service                    enabled 
earlyoom.service                           enabled 
getty@.service                             enabled 
ntpd.service                               enabled 
sddm.service                               enabled 
tlp.service                                enabled 
watchdog.service                           enabled

As I said, in this case I still have wpa_supplicant running in the background after the startup (launched by systemd with argument "-u"). If I kill it manually and then either start netctl, or connect to network manually using wpa_supplicant and dhcpcd, everything works.

How to disable this systemd behavior? What causes this instance of wpa_supplicant to be run? This started to happen only after I updated the system recently, before that I didn't have this problem, and I didn't change anything with my setup of Arch.

Thanks!

Last edited by jerf (2016-07-14 15:52:35)

Offline

#2 2016-07-14 15:15:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: [solved] systemd launches wpa_supplicant, prevents netctl from working

Okay, let us see what is starting it.  Look at the output of systemctl status.  It will show a tree as to what started what.  If you like, post it here.  Get the full output with systemctl status --no-pager


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-07-14 15:33:36

jerf
Member
Registered: 2009-06-03
Posts: 33

Re: [solved] systemd launches wpa_supplicant, prevents netctl from working

ewaller wrote:

Okay, let us see what is starting it.  Look at the output of systemctl status.  It will show a tree as to what started what.  If you like, post it here.  Get the full output with systemctl status --no-pager

Here is the output of systemctl status:

● ub
    State: degraded
     Jobs: 0 queued
   Failed: 2 units
    Since: Чт 2016-07-14 18:22:34 MSK; 1min 46s ago
   CGroup: /
           ├─init.scope
           │ └─1 /sbin/init
           ├─system.slice
           │ ├─dbus.service
           │ │ └─453 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           │ ├─wpa_supplicant.service
           │ │ └─569 /usr/bin/wpa_supplicant -u
           │ ├─systemd-journald.service
           │ │ └─223 /usr/lib/systemd/systemd-journald
           │ ├─ntpd.service
           │ │ └─478 /usr/bin/ntpd -g -u ntp:ntp
           │ ├─udisks2.service
           │ │ ├─651 /usr/lib/udisks2/udisksd --no-debug
           │ │ └─826 /sbin/mount.ntfs /dev/md126p4 /run/media/petya/OS -o rw,nodev,nosuid,uid=1000,gid=100,uhelper=udisks2
           │ ├─upower.service
           │ │ └─658 /usr/lib/upower/upowerd
           │ ├─systemd-logind.service
           │ │ └─450 /usr/lib/systemd/systemd-logind
           │ ├─watchdog.service
           │ │ └─464 /usr/bin/watchdog
           │ ├─systemd-udevd.service
           │ │ └─256 /usr/lib/systemd/systemd-udevd
           │ ├─polkit.service
           │ │ └─567 /usr/lib/polkit-1/polkitd --no-debug
           │ ├─NetworkManager.service
           │ │ └─461 /usr/bin/NetworkManager --no-daemon
           │ ├─sddm.service
           │ │ ├─476 /usr/bin/sddm
           │ │ └─504 /usr/lib/xorg-server/Xorg -nolisten tcp -auth /var/run/sddm/{492226a2-8131-4462-bfdf-9f8d9dd555c8} -background none -noreset -displayfd 18 vt1
           │ └─rtkit-daemon.service
           │   └─840 /usr/lib/rtkit/rtkit-daemon
           └─user.slice
             └─user-1000.slice
               ├─user@1000.service
               │ ├─dbus.service
               │ │ ├─697 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
               │ │ ├─771 /usr/bin/kglobalaccel5
               │ │ ├─782 /usr/lib/dconf/dconf-service
               │ │ ├─808 /usr/lib/kf5/kscreen_backend_launcher
               │ │ └─946 /usr/bin/kuiserver5
               │ ├─obex.service
               │ │ └─910 /usr/lib/bluetooth/obexd
               │ ├─pulseaudio.service
               │ │ └─836 /usr/bin/pulseaudio --daemonize=no
               │ └─init.scope
               │   ├─684 /usr/lib/systemd/systemd --user
               │   └─685 (sd-pam)  
               └─session-c2.scope
                 ├─683 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth496a48a9-8b8d-4472-93fc-d879473f31aa --id 1 --start /usr/bin/startkde --user petya
                 ├─690 /bin/sh /usr/bin/startkde
                 ├─736 /usr/lib/kf5/start_kdeinit --kded +kcminit_startup
                 ├─737 kdeinit5: Running...                                  
                 ├─738 klauncher [kdeinit5] --fd=9                           
                 ├─741 kded5 [kdeinit5]                                      
                 ├─743 kcminit_startup [kdeinit5]                            
                 ├─761 /usr/bin/kaccess
                 ├─763 kwrapper5 /usr/bin/ksmserver
                 ├─765 /usr/bin/ksmserver
                 ├─769 /usr/bin/kactivitymanagerd start-daemon
                 ├─790 kwin_x11 -session 10756200000144200754000000069440002_1468509732_759610
                 ├─791 /usr/bin/baloo_file
                 ├─792 /usr/bin/krunner
                 ├─805 /usr/bin/plasmashell --shut-up
                 ├─823 /usr/lib/polkit-kde/polkit-kde-authentication-agent-1
                 ├─833 /usr/bin/yakuake -session 10756200000144200762700000069440009_1468509732_756429
                 ├─851 /bin/bash
                 ├─884 /usr/bin/ginn
                 ├─886 /usr/bin/xembedsniproxy
                 ├─890 syndaemon -t -k -i 2 -d
                 ├─912 /home/petya/.dropbox-dist/dropbox-lnx.x86_64-6.4.14/dropbox /newerversion
                 ├─955 su -
                 ├─957 -bash
                 └─986 systemctl status

For some reason, wpa_supplicant.service and NetworkManager.service are being started. Why is it happening? They are disabled:

$systemctl list-unit-files --type=service
UNIT FILE                                  STATE   
accounts-daemon.service                    disabled
acpid.service                              disabled
adb.service                                disabled
alsa-restore.service                       static  
alsa-state.service                         static  
asus-kbd-backlight.service                 enabled 
autovt@.service                            enabled 
avahi-daemon.service                       disabled
avahi-dnsconfd.service                     disabled
blk-availability.service                   disabled
bluetooth.service                          disabled
canberra-system-bootup.service             disabled
canberra-system-shutdown-reboot.service    disabled
canberra-system-shutdown.service           disabled
colord.service                             static  
console-getty.service                      disabled
console-shell.service                      disabled
container-getty@.service                   static  
cronie.service                             disabled
cups-browsed.service                       disabled
dbus-org.freedesktop.hostname1.service     static  
dbus-org.freedesktop.import1.service       static  
dbus-org.freedesktop.locale1.service       static  
dbus-org.freedesktop.login1.service        static  
dbus-org.freedesktop.machine1.service      static  
dbus-org.freedesktop.network1.service      disabled
dbus-org.freedesktop.resolve1.service      disabled
dbus-org.freedesktop.timedate1.service     static  
dbus.service                               static  
debug-shell.service                        disabled
dhclient@.service                          disabled
dhcpcd.service                             disabled
dhcpcd@.service                            disabled
display-manager.service                    enabled 
dm-event.service                           disabled
dropbox@.service                           disabled
earlyoom.service                           enabled 
emergency.service                          static  
fancontrol.service                         disabled
fluidsynth.service                         disabled
fstrim.service                             static  
ftpd.service                               disabled
geoclue.service                            static  
getty@.service                             enabled 
git-daemon@.service                        static  
gpm.service                                disabled
haveged.service                            disabled
healthd.service                            disabled
hplip-printer@.service                     static  
ifplugd@.service                           disabled
initrd-cleanup.service                     static  
initrd-parse-etc.service                   static  
initrd-switch-root.service                 static  
initrd-udevadm-cleanup-db.service          static  
ip6tables.service                          disabled
iptables.service                           disabled
irexec.service                             disabled
kmod-static-nodes.service                  static  
krb5-kadmind.service                       disabled
krb5-kdc.service                           disabled
krb5-kpropd.service                        disabled
krb5-kpropd@.service                       static  
ldconfig.service                           static  
lircd-uinput.service                       disabled
lircd.service                              disabled
lircmd.service                             disabled
lm_sensors.service                         disabled
logrotate.service                          static  
lvm2-lvmetad.service                       disabled
lvm2-monitor.service                       disabled
lvm2-pvscan@.service                       static  
mdadm-grow-continue@.service               static  
mdadm-last-resort@.service                 static  
mdmon@.service                             static  
mdmonitor.service                          static  
mkinitcpio-generate-shutdown-ramfs.service static  
ModemManager.service                       disabled
mysqld.service                             disabled
netctl-auto@.service                       disabled
netctl-ifplugd@.service                    disabled
netctl-sleep.service                       disabled
netctl.service                             disabled
netctl@.service                            static  
NetworkManager-dispatcher.service          disabled
NetworkManager-wait-online.service         disabled
NetworkManager.service                     disabled
nscd.service                               disabled
ntpd.service                               enabled 
ntpdate.service                            disabled
openslp.service                            disabled
org.cups.cups-lpd@.service                 static  
org.cups.cupsd.service                     disabled
polkit.service                             static  
ppp@.service                               disabled
quotaon.service                            static  
rescue.service                             static  
rfkill-block@.service                      disabled
rfkill-unblock@.service                    disabled
rlogin@.service                            static  
rsh@.service                               static  
rtkit-daemon.service                       disabled
saned@.service                             static  
sddm.service                               enabled 
sensord.service                            disabled
serial-getty@.service                      disabled
shadow.service                             static  
snmpd.service                              disabled
snmptrapd.service                          disabled
speech-dispatcherd.service                 disabled
sshd.service                               disabled
sshd@.service                              static  
sshdgenkeys.service                        static  
svnserve.service                           disabled
systemd-ask-password-console.service       static  
systemd-ask-password-wall.service          static  
systemd-backlight@.service                 static  
systemd-binfmt.service                     static  
systemd-coredump@.service                  static  
systemd-exit.service                       static  
systemd-firstboot.service                  static  
systemd-fsck-root.service                  static  
systemd-fsck@.service                      static  
systemd-halt.service                       static  
systemd-hibernate-resume@.service          static  
systemd-hibernate.service                  static  
systemd-hostnamed.service                  static  
systemd-hwdb-update.service                static  
systemd-hybrid-sleep.service               static  
systemd-importd.service                    static  
systemd-initctl.service                    static  
systemd-journal-catalog-update.service     static  
systemd-journal-flush.service              static  
systemd-journal-gatewayd.service           indirect
systemd-journal-remote.service             indirect
systemd-journal-upload.service             disabled
systemd-journald.service                   static  
systemd-kexec.service                      static  
systemd-localed.service                    static  
systemd-logind.service                     static  
systemd-machine-id-commit.service          static  
systemd-machined.service                   static  
systemd-modules-load.service               static  
systemd-networkd-wait-online.service       disabled
systemd-networkd.service                   disabled
systemd-nspawn@.service                    disabled
systemd-poweroff.service                   static  
systemd-quotacheck.service                 static  
systemd-random-seed.service                static  
systemd-reboot.service                     static  
systemd-remount-fs.service                 static  
systemd-resolved.service                   disabled
systemd-rfkill.service                     static  
systemd-suspend.service                    static  
systemd-sysctl.service                     static  
systemd-sysusers.service                   static  
systemd-timedated.service                  static  
systemd-timesyncd.service                  disabled
systemd-tmpfiles-clean.service             static  
systemd-tmpfiles-setup-dev.service         static  
systemd-tmpfiles-setup.service             static  
systemd-udev-settle.service                static  
systemd-udev-trigger.service               static  
systemd-udevd.service                      static  
systemd-update-done.service                static  
systemd-update-utmp-runlevel.service       static  
systemd-update-utmp.service                static  
systemd-user-sessions.service              static  
systemd-vconsole-setup.service             static  
talk.service                               indirect
teamd@.service                             static  
telnet@.service                            static  
tlp-sleep.service                          disabled
tlp.service                                enabled 
udisks2.service                            disabled
ufw.service                                disabled
upower.service                             disabled
usbmuxd.service                            static  
user@.service                              static  
uuidd.service                              indirect
watchdog.service                           enabled 
wpa_supplicant-nl80211@.service            disabled
wpa_supplicant-wired@.service              disabled
wpa_supplicant.service                     disabled
wpa_supplicant@.service                    disabled

184 unit files listed.

Apparently, something calls them, but what? How to figure it out?

Thanks!

Offline

#4 2016-07-14 15:42:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: [solved] systemd launches wpa_supplicant, prevents netctl from working

Because of tlp

Offline

#5 2016-07-14 15:51:59

jerf
Member
Registered: 2009-06-03
Posts: 33

Re: [solved] systemd launches wpa_supplicant, prevents netctl from working

Scimmia wrote:

Because of tlp

You're right, thanks! For some reason tlp.service wants NetworkManager.service, as written in the ArchWiki TLP article.

It's weird though that I started to encounter this problem only now, as I both had TLP and used netctl already for ages.

Masking NetworkManager.service and wpa_supplicant.service solved the problem.

Thanks!

Offline

#6 2016-07-14 15:53:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: [solved] systemd launches wpa_supplicant, prevents netctl from working

Scimmia wrote:

Because of tlp

Nice catch !


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB