You are not logged in.

#26 2014-07-29 23:38:40

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

oktorok wrote:

Hi eewallace,

netctl-auto doesn't need systemd unit files for the specific profiles to exist in order to do its job.

Because when netctl-auto enables the profile it will create the unit configuration file?  That makes sense.

It doesn't create separate unit files for each profile at all, it just has a single systemd service that runs /usr/bin/netctl-auto, which in turn reads the appropriate configurations from /etc/netctl and connects to one as appropriate.  As far as I can tell, it doesn't actually invoke netctl at all - netctl and netctl-auto are separate, essentially independent scripts.

Offline

#27 2014-07-29 23:56:18

oktorok
Member
From: San Francisco, Ca
Registered: 2014-06-18
Posts: 70

Re: [SOLVED]netctl-auto no longer working

Just to clarify, from man NETCTL.SPECIAL(7)   

netctl-auto@<interface>.service
           This unit issues a scan on the interface it is used for and tries to
           start a profile for a network it finds. ...

and from man NETCTL(1)

*netctl enable [+PROFILE+]*::
    Enable the systemd unit for the profile specified. This will create
    a unit configuration file. ...

netctl-auto starts a profile for a given network, the profile in turn, creates the unit configuration file.  Don't want to get too far from OP's issue, but I do feel understanding these things is important for problem solving.

Offline

#28 2014-07-30 00:31:01

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

oktorok wrote:

Don't want to get too far from OP's issue, but I do feel understanding these things is important for problem solving.

Agreed on both counts. Calling the two scripts "independent" was a bit strong - in reading through the netctl-auto script, I missed a few sourced files. The basic point remains, though.  /usr/bin/netctl and /usr/bin/netctl-auto are separate scripts, each of which use some of the same basic functions (defined in the scripts in /usr/lib/network) to load profiles, and they each have associated systemd unit files, netctl@.service and netctl-auto@.service. "netctl enable <profile>" creates a "netctl@<profile>.service" unit, which I believe is the unit configuration file referenced in the bit of 'man netctl' that you quoted. netctl-auto, when it starts a profile, uses the same set of functions as netctl@.service does, but it does not start a separate systemd service for each profile. You can easily confirm this by running "systemctl status 'nectl*'" on a system using netctl-auto.

Offline

#29 2014-07-30 16:23:52

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

eewallace, thank you, your solution seems to have done the trick!  By "seems to", I mean that shutdown and rebooting (after commenting out my restart netctl-auto entry in openbox/autostart) brought an immediate wifi connection, but I don't know yet whether it will work every time.

systemctl disable netctl@wlp16s0\\x2dWIRELESS  #Note the double backslash in the \x2d escape.

I had tried this before wiithout success.  The double backslash made the difference.  I haven't the siightest idea why.

Offline

#30 2014-07-30 16:39:22

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

hilltownboy wrote:

eewallace, thank you, your solution seems to have done the trick!  By "seems to", I mean that shutdown and rebooting (after commenting out my restart netctl-auto entry in openbox/autostart) brought an immediate wifi connection, but I don't know yet whether it will work every time.

systemctl disable netctl@wlp16s0\\x2dWIRELESS  #Note the double backslash in the \x2d escape.

I had tried this before wiithout success.  The double backslash made the difference.  I haven't the siightest idea why.

Normally, the shell would treat the single backslash as an escape character, indicating that the next character should be taken literally instead of interpreted as a special character (in this case it doesn't matter, since "x" is nothing special to the shell). Since you want a literal backslash, you need to escape the backslash itself to tell the shell that it's a literal backslash character. You could get the same effect by quoting it, instead:

systemctl disable 'netctl@wlp16s0\x2dWIRELESS'

If it seems to be working consistently, please remember to mark the thread solved.

Offline

#31 2014-07-31 00:11:26

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

First boot was successful but the second not.  Third boot worked.  Difference in last lines of systemctl status "netctl*.service as follows:

* netctl-auto@wlp16s0.service - Automatic wireless network connection using netctl profiles
   Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled)
   Active: active (running) since Wed 2014-07-30 18:18:15 UTC; 9min ago
     Docs: man:netctl.special(7)
  Process: 223 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/system-netctl\x2dauto.slice/netctl-auto@wlp16s0.service
           |-280 wpa_supplicant -B -P /run/wpa_supplicant_wlp16s0.pid -i wlp16s0 -D nl80211,wext -c/run/network/wpa_supplicant_wlp16s0.conf -W
           `-282 wpa_actiond -p /run/wpa_supplicant -i wlp16s0 -P /run/network/wpa_actiond_wlp16s0.pid -a /usr/lib/network/auto.action

Jul 30 18:18:15 arch wpa_actiond[282]: Starting wpa_actiond session for interface 'wlp16s0'
Jul 30 18:18:16 arch wpa_actiond[282]: Interface 'wlp16s0' connected to network 'WIRELESS'
Jul 30 18:18:20 arch wpa_actiond[282]: Interface 'wlp16s0' lost connection to network 'WIRELESS'
Jul 30 18:18:21 arch netctl-auto[223]: Included profile 'wlp16s0-Matviak'
Jul 30 18:18:21 arch netctl-auto[223]: Included profile 'wlp16s0-WIRELESS'
Jul 30 18:18:50 arch wpa_actiond[282]: Interface 'wlp16s0' disconnected from network 'WIRELESS'
* netctl-auto@wlp16s0.service - Automatic wireless network connection using netctl profiles
   Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; enabled)
   Active: active (running) since Wed 2014-07-30 19:32:01 UTC; 28min ago
     Docs: man:netctl.special(7)
  Process: 223 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/system-netctl\x2dauto.slice/netctl-auto@wlp16s0.service
           |-280 wpa_supplicant -B -P /run/wpa_supplicant_wlp16s0.pid -i wlp16s0 -D nl80211,wext -c/run/network/wpa_supplicant_wlp16s0.conf -W
           `-282 wpa_actiond -p /run/wpa_supplicant -i wlp16s0 -P /run/network/wpa_actiond_wlp16s0.pid -a /usr/lib/network/auto.action

Jul 30 19:32:01 arch wpa_actiond[282]: Starting wpa_actiond session for interface 'wlp16s0'
Jul 30 19:32:03 arch wpa_actiond[282]: Interface 'wlp16s0' connected to network 'WIRELESS'
Jul 30 19:32:04 arch wpa_actiond[282]: Interface 'wlp16s0' lost connection to network 'WIRELESS'
Jul 30 19:32:05 arch netctl-auto[223]: Included profile 'wlp16s0-Matviak'
Jul 30 19:32:05 arch netctl-auto[223]: Included profile 'wlp16s0-WIRELESS'
Jul 30 19:32:06 arch wpa_actiond[282]: Interface 'wlp16s0' reestablished connection to network 'WIRELESS'

Many thanks for the explanation of the double backsplash.

Offline

#32 2014-07-31 00:42:13

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [SOLVED]netctl-auto no longer working

Hm, that's quite strange. I'm not sure if it'll have any additional information, but you might check

journalctl -b -u netctl-auto

to see if there's any more detail than what's shown by systemctl status.

Offline

#33 2014-07-31 14:58:00

hilltownboy
Member
From: Massachusetts
Registered: 2013-08-15
Posts: 100

Re: [SOLVED]netctl-auto no longer working

No info other than a one-line summary of journal dates from

journalctl -b -u netctl-auto

Changing the command to

journalctl -b -u "netctl-auto*"

produced the previously obtained info on wireless connection

Today netctl-auto is working as it should so if it keeps up I will mark this as solved.  But I'm still hesitant because I switch every day between arch and debian, which may cause difficulties, and notes about not finding firmware often pop up, especially iwl4965, which I read has problems.

Your help to a newbie is greatly appreciated.  Couldn't master arch without such help.

Offline

Board footer

Powered by FluxBB