Announcement

Collapse
No announcement yet.

wlan0 not brought up at boot, only at desktop login.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    wlan0 not brought up at boot, only at desktop login.

    May 28 13:07:51 FX6300 systemd[1]: Starting WPA supplicant...
    May 28 13:07:51 FX6300 dbus[964]: [system] Successfully activated service 'fi.w1.wpa_supplicant1'
    May 28 13:07:51 FX6300 wpa_supplicant[1073]: Successfully initialized wpa_supplicant
    May 28 13:07:51 FX6300 systemd[1]: Started WPA supplicant.
    May 28 13:07:51 FX6300 NetworkManager[981]: <info> [1495969671.5739] supplicant: wpa_supplicant running
    May 28 13:07:51 FX6300 NetworkManager[981]: <info> [1495969671.5739] device (wlan0): supplicant interface state: init -> starting
    May 28 13:07:51 FX6300 wpa_supplicant[1073]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
    May 28 13:07:51 FX6300 wpa_supplicant[1073]: dbus: Failed to construct signal
    May 28 13:07:51 FX6300 NetworkManager[981]: <info> [1495969671.6447] device (wlan0): supplicant interface state: starting -> ready
    May 28 13:07:51 FX6300 NetworkManager[981]: <info> [1495969671.6447] device (wlan0): state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
    May 28 13:07:51 FX6300 kernel: [ 23.857495] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

    Bug 1439771 seems to be about a similar problem (only over there it's after a wakeup, not after powerup.)

    Do I have any chance there is a solution to this problem ? I want the wireless active at boot without having to login to the desktop.

    #2
    It's not a bug.

    If you are knowledgeable enough you can pick out the necessary steps from the following article:
    https://www.linuxbabe.com/command-li...wpa-supplicant

    Before systemd the process looked like this:
    https://askubuntu.com/questions/2942...buntu-terminal
    but "wlan0" isn't used any more for specific reasons.

    A tool I used to use a long time ago was wicd-curses (and wicd-cli). If you plan to use it in a terminal without a desktop but plan to startx the KDE desktop later, as root or a user, you should take down the wifi connection first, so it won't interfere with NetworkManager.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      OK Thanks.

      (Any idea why this was changed from 14.04 ? With 14.04 I am absolutely positively 2000% certain that the link was up alive and kicking after power-on, because I used to use a laptop as a router and it worked without logging in.)
      Last edited by Erwin Smout; May 30, 2017, 12:15 AM.

      Comment


        #4
        It's somewhat old but may be of help:

        https://help.ubuntu.com/community/Ne...WPA_supplicant

        Note that using iwconfig, etc, is only for WEP, which you should not use


        Sent from my iPhone using Tapatalk
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          My home server is a laptop with a dead NIC; I just configure the wireless connection in /etc/network/interfaces. Looks like this -

          Code:
          auto wlp3s0
          iface wlp3s0 inet dhcp
          	wpa-ssid *ssid goes here*
          	wpa-psk *passphrase goes here*
          IIRC wicd and NM will both ignore a connection that's configured in /etc/network/interfaces.
          we see things not as they are, but as we are.
          -- anais nin

          Comment


            #6
            Originally posted by wizard10000 View Post
            My home server is a laptop with a dead NIC; I just configure the wireless connection in /etc/network/interfaces. Looks like this -

            Code:
            auto wlp3s0
            iface wlp3s0 inet dhcp
             wpa-ssid *ssid goes here*
             wpa-psk *passphrase goes here*
            IIRC wicd and NM will both ignore a connection that's configured in /etc/network/interfaces.
            Okay thanks I'll try and remember this in case I run into problems after all. What should it look like if I want static IP addresses for *both* ipv4 and ipv6 ? (I know about static address ... gateway ... and inet6 but where do I put the wpa clauses in that case, seeing as there appears to be no such thing as "end-static" ?)

            (I've disabled NM altogether now and it doesn't seem to cause problems - if you are aware of any then advising me about them is welcomed.)

            (Whether NM ignores these connection is at least also a function of NM's own Managed=true|false configuration setting.)

            (Bonus question : the *passphrase goes here* would that be the passphrase in plaintext or the obfuscated thing we find in wpa_supplicant.conf ?)
            Last edited by Erwin Smout; May 30, 2017, 10:52 AM.

            Comment


              #7
              Originally posted by Erwin Smout View Post
              Okay thanks I'll try and remember this in case I run into problems after all. What should it look like if I want static IP addresses for *both* ipv4 and ipv6 ? (I know about static address ... gateway ... and inet6 but where do I put the wpa clauses in that case, seeing as there appears to be no such thing as "end-static" ?)

              (I've disabled NM altogether now and it doesn't seem to cause problems - if you are aware of any then advising me about them is welcomed.)

              (Whether NM ignores these connection is at least also a function of NM's own Managed=true|false configuration setting.)

              (Bonus question : the *passphrase goes here* would that be the passphrase in plaintext or the obfuscated thing we find in wpa_supplicant.conf ?)
              TBH I never assign static IPs on the machine itself; I prefer to use MAC address reservations on the router and assign static IPs there, that way all my IP address management is in one place - the component that's providing DHCP services

              If you really want to assign static IPs in /etc/network/interfaces you certainly can, this should help - https://wiki.debian.org/NetworkConfiguration

              Bonus question? It's your plaintext passphrase.

              Enjoy!
              we see things not as they are, but as we are.
              -- anais nin

              Comment


                #8
                I believe if you go into your connection's settings, you can check the option to have that connection available to all users, which make it connect before login. That is how I have always done it.
                You also specify static addresses, etc from there.
                Click image for larger version

Name:	Screenshot_20170530_211342.png
Views:	1
Size:	126.7 KB
ID:	643519Click image for larger version

Name:	Screenshot_20170530_211523.png
Views:	1
Size:	58.3 KB
ID:	643520Click image for larger version

Name:	Screenshot_20170530_211432.png
Views:	1
Size:	74.4 KB
ID:	643521
                Last edited by claydoh; May 30, 2017, 07:19 PM.

                Comment


                  #9
                  Originally posted by wizard10000 View Post
                  ... I prefer to use MAC address reservations on the router and assign static IPs there, that way all my IP address management is in one place - the component that's providing DHCP services

                  ''''''
                  Ditto!
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Originally posted by claydoh View Post
                    I believe if you go into your connection's settings, you can check the option to have that connection available to all users, which make it connect before login. That is how I have always done it.
                    You also specify static addresses, etc from there.
                    [ATTACH=CONFIG]7001[/ATTACH][ATTACH=CONFIG]7002[/ATTACH][ATTACH=CONFIG]7003[/ATTACH]
                    I wasn't aware that "Allow all users to use this connection" meant that it established a network connection before/without the NetworkManager loading the user's network configuration file. Until the login name and password was entered how would the NetworkManager know which config file to use? If a person configured their account to boot into a bash shell instead of running the GUI desktop they'd still need to configure their network connections the first time they logged in, or at least before they begin using the network. The NetworkManager wait online service completes running just before the login screen appears. It's what the commandline tool, nmcli, communicates with, as I understand it. That's why & how root connects when the user chooses "boot with network" on the recovery menu.

                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Restore /etc/resolv.conf if the system crashed before the ppp link was
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Login Service...
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started System Logging Service.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Permit User Sessions.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Detect the available GPUs and deal with any system changes.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Auto import assertions from block devices.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Restore /etc/resolv.conf if the system crashed before the ppp link was s
                    .....
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Authenticate and Authorize Users to Run Privileged Tasks...
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Set console scheme...
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Simple Desktop Display Manager...
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Simple Desktop Display Manager.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Raise network interfaces.
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Set console scheme.
                    ...
                    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Login Service.
                    ...
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5341] NetworkManager (version 1.2.6) is starting..
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5354] Read config: /etc/NetworkManager/NetworkMana
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5384] manager[0x217c1c0]: monitoring kernel firmwa
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5385] monitoring ifupdown state file '/run/network
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5397] dns-mgr[0x215b960]: init: dns=dnsmasq, rc-ma
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5405] rfkill0: found WiFi radio killswitch (at /sy
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5406] rfkill1: found WiFi radio killswitch (at /sy
                    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Started Network Manager.
                    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Reached target Network.
                    ....
                    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Starting Network Manager Wait Online...
                    ....
                    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Starting Network Manager Script Dispatcher Service..
                    ...
                    May 30 09:37:30 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155050.4490] SettingsPlugin-Ofono: (35308672) ... get_connections.
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] devices added (path: /sys/devices/pci0000:00/0000:00:1c.5/
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/pci0000:00/0000:00:1c.5/0
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] devices added (path: /sys/devices/virtual/net/lo, iface: l
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/virtual/net/lo, iface: lo
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] end _init.
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] settings: loaded plugin ifupdown: (C) 2008 Canonical Ltd.
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8307] settings: loaded plugin keyfile: (c) 2007 - 2015 Red Hat,
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8321] SettingsPlugin-Ofono: init!
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <warn> [1496155049.8322] SettingsPlugin-Ofono: file doesn't exist: /var/lib/ofono
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] SettingsPlugin-Ofono: end _init.
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] settings: loaded plugin ofono: (C) 2013-2016 Canonical Ltd
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] (35308448) ... get_connections.
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] (35308448) ... get_connections (managed=false): return emp
                    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8561] keyfile: new connection /etc/NetworkManager/system-connect
                    ...
                    And all the following stuff is happening after I log in:
                    ...
                    May 30 09:37:31 jerry-Aspire-V3-771 systemd[1]: Starting WPA supplicant...
                    May 30 09:37:31 jerry-Aspire-V3-771 dhclient[1249]: DHCPREQUEST of 192.168.1.100 on enp14s0 to 255.255.255.255 port 67 (xid=0x38036cbe)
                    May 30 09:37:31 jerry-Aspire-V3-771 dhclient[1249]: DHCPACK of 192.168.1.100 from 192.168.1.1
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] address 192.168.1.100
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] plen 24 (255.255.255.0)
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] gateway 192.168.1.1
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] server identifier 192.168.1.1
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] lease time 86400
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] hostname 'jerry-Aspire-V3-771'
                    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: Joining mDNS multicast group on interface enp14s0.IPv4 with address 192.168.1.100.
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] nameserver '192.168.1.1'
                    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: New relevant interface enp14s0.IPv4 for mDNS.
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6474] domain name 'neb.rr.com'
                    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: Registering new address record for 192.168.1.100 on enp14s0.IPv4.
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6474] dhcp4 (enp14s0): state changed unknown -> bound
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6482] device (enp14s0): state change: ip-config -> ip-check (rea
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6486] device (enp14s0): state change: ip-check -> secondaries (r
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6490] device (enp14s0): state change: secondaries -> activated (
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6491] manager: NetworkManager state is now CONNECTED_LOCAL
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6497] manager: NetworkManager state is now CONNECTED_GLOBAL
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6498] policy: set 'Wired connection 1' (enp14s0) as default for
                    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.7995] dns-plugin[0x218ad00]: starting dnsmasq...



                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Originally posted by GreyGeek View Post
                      I wasn't aware that "Allow all users to use this connection" meant that it established a network connection before/without the NetworkManager loading the user's network configuration file. Until the login name and password was entered how would the NetworkManager know which config file to use?
                      NetworkManager supports two types of network connections, system wide networks (available to all users, network configuration stored in /etc/NetworkManager/system-connections/) and user connections (available to specific user, configuration stored under $HOME).

                      Only system wide networks can be connected to before login (IOW automatically during boot), user connections (for obvious reasons) can only be connected to after login.

                      The setting "Allow all users to use this connection" defines whether that network is a user only or a system wide network.

                      Comment


                        #12
                        Wouldn't a "system wide" connection be limited to a wired connection because it doesn't require a login to activate? Just plug in the cable and you have a connection, unlike wifi connections.


                        Sent from my iPhone using Tapatalk
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment


                          #13
                          Follow-up question. I've applied this (wpa_supplicant approach) on two machines. On one machine, iwconfig tells me it's uisng a 2.6G channel at a bit rate of 1M, on the other, I appear to be using a 5.5G channel at a bit rate of 27M. The band difference is probably due to the capabilities of the wireless adapters involved, but I find the 1M bitrate a bit disappointing (and I vaguely seem to recall having once tried to deliberately slow it down to those speeds because I was experiencing lots of connection dropouts and the like, but I can no longer find where such changes were applied) and sudo iwconfig wlan0 rate auto or rate 11M auto seems not to change anything. Any ideas ?

                          Comment


                            #14
                            Originally posted by GreyGeek View Post
                            Wouldn't a "system wide" connection be limited to a wired connection because it doesn't require a login to activate?
                            No, you can use a wifi connection as a system wide network, if you save the network password/secret (if the wifi network is protected) in NetworkManager network settings. NetworkManager has a couple of options on how it saves the data, but the key is that it can use the secret to connect to a network even before a user logs in (provided that it is a system wide connection, of course).

                            Comment


                              #15
                              Originally posted by kubicle View Post
                              No, you can use a wifi connection as a system wide network, if you save the network password/secret (if the wifi network is protected) in NetworkManager network settings. NetworkManager has a couple of options on how it saves the data, but the key is that it can use the secret to connect to a network even before a user logs in (provided that it is a system wide connection, of course).
                              Ah, the user is in the set "Everyone" if that option is checked. I didn't know that. Thanks.
                              I don't run as another user. Would that include other users allowing "everyone" to use their connection?

                              PS- In the systemd logs I posted above, the NetworkManager isn't set up until I log in, and I don't see any use of nmcli before that.
                              Last edited by GreyGeek; May 31, 2017, 10:10 AM.
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X