You are not logged in.

#1 2014-03-16 01:23:33

keepitsimpleengineer
Member
From: San Joaquin Valley, CA
Registered: 2012-06-25
Posts: 382

Predictable Network Interface Names fail, cannot connect wireless

On my seldom used laptop, I converted to netctl and adapted interface name changes with systemd v197.
Recently, no wireless connection.  ip link gives

]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:1f:16:2b:6f:85 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 0c:60:76:9d:93:a5 brd ff:ff:ff:ff:ff:ff

The connection failure (I presume) comes from the "new" wireless interface devices  name, "wlan0", which has changed from "wlp3s0" prviously given by systemd/udev.  This apparenly discombobs netctl and gives this

[root@KISE-007 ~]# netctl start kise-wlan
A dependency job for netctl@kise\x2dwlan.service failed. See 'journalctl -xn' for details.
[root@KISE-007 ~]# journalctl -xn
-- Logs begin at Sun 2014-02-16 19:36:24 PST, end at Sat 2014-03-15 18:01:46 PDT. --
Mar 15 17:52:22 KISE-007 systemd[1]: Started Cleanup of Temporary Directories.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-tmpfiles-clean.service has finished starting up.
-- 
-- The start-up result is done.
Mar 15 17:52:28 KISE-007 kernel: perf samples too long (4991 > 4990), lowering kernel.perf_event_max_sample_rate to 25200
Mar 15 17:59:48 KISE-007 sudo[2491]: ljohnson : TTY=pts/0 ; PWD=/home/ljohnson ; USER=root ; COMMAND=/bin/bash
Mar 15 17:59:48 KISE-007 sudo[2491]: pam_unix(sudo:session): session opened for user root by ljohnson(uid=0)
Mar 15 18:00:16 KISE-007 systemd[1]: Expecting device sys-subsystem-net-devices-wlp3s0.device...
-- Subject: Unit sys-subsystem-net-devices-wlp3s0.device has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sys-subsystem-net-devices-wlp3s0.device has begun starting up.
Mar 15 18:01:46 KISE-007 systemd[1]: Job sys-subsystem-net-devices-wlp3s0.device/start timed out.
Mar 15 18:01:46 KISE-007 systemd[1]: Timed out waiting for device sys-subsystem-net-devices-wlp3s0.device.
-- Subject: Unit sys-subsystem-net-devices-wlp3s0.device has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sys-subsystem-net-devices-wlp3s0.device has failed.
-- 
-- The result is timeout.
Mar 15 18:01:46 KISE-007 systemd[1]: Dependency failed for Automatically generated profile by wifi-menu.
-- Subject: Unit netctl@kise\x2dwlan.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@kise\x2dwlan.service has failed.
-- 
-- The result is dependency. 

I  tried forcing the wlp3s0 name in /etc/s Leno 32 bitudev/rules.d/ but the name stayed the same.

I would like to get this laptop mobile again, any sugguestions?

BTW It's a 32bit lenovo S12 Intel with Broadcom BCM4312 running b43 drivers


Al Einstein: "Man soll die Dinge so einfach machen wie möglich ~ aber nicht einfacher." (Things should be as simple as possible ~ but not too simple.) ~ Al (Einstein) war ein Cousin von Albert, "Al" ist die Abkürzung für Aloysius

Offline

#2 2014-03-16 01:58:34

andy123
Member
Registered: 2011-11-04
Posts: 169
Website

Re: Predictable Network Interface Names fail, cannot connect wireless

How about changing the interface in your netctl profile?


i'm sorry for my poor english wirting skills…

Offline

#3 2014-03-16 19:06:36

keepitsimpleengineer
Member
From: San Joaquin Valley, CA
Registered: 2012-06-25
Posts: 382

Re: Predictable Network Interface Names fail, cannot connect wireless

andy123 wrote:

How about changing the interface in your netctl profile?

Thanks andy123, I wanted to avoid this as I wanted to follow the documentation, netctl

So I disabled all the failed netctl services, deleted the netctl profiles for wireless and used wifi-menu to connect, generating and saving new profiles.

Wifi-menu had no trouble detecting local wifi networks (kise is mine), but the wireless connection failed.

[ljohnson@KISE-007 ~]$ journalctl -xn
-- Logs begin at Sun 2014-02-16 19:36:24 PST, end at Sun 2014-03-16 11:06:27 PDT. --
Mar 16 11:05:33 KISE-007 systemd[1]: netctl@wlan0\x2dkise.service: main process exited, code=exited, status=1/FAILURE
Mar 16 11:05:33 KISE-007 systemd[1]: Failed to start Networking for netctl profile wlan0-kise.
-- Subject: Unit netctl@wlan0\x2dkise.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@wlan0\x2dkise.service has failed.
--
-- The result is failed.
Mar 16 11:05:33 KISE-007 systemd[1]: Unit netctl@wlan0\x2dkise.service entered failed state.
Mar 16 11:05:33 KISE-007 network[1807]: The interface of network profile 'wlan0-kise' is already up
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: The canary thread is apparently starving. Taking action.
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Demoting known real-time threads.
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Successfully demoted thread 1376 of process 1325 (/usr/bin/pulseaudio).
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Successfully demoted thread 1375 of process 1325 (/usr/bin/pulseaudio).
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Successfully demoted thread 1325 of process 1325 (/usr/bin/pulseaudio).
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Demoted 3 threads.

So I tried a restart from terminal.

[ljohnson@KISE-007 ~]$ sudo systemctl start netctl@wlan0\x2dkise.service
Job for netctl@wlan0x2dkise.service failed. See 'systemctl status netctl@wlan0x2dkise.service' and 'journalctl -xn' for details.
[ljohnson@KISE-007 ~]$ journalctl -xn
-- Logs begin at Sun 2014-02-16 19:36:24 PST, end at Sun 2014-03-16 11:08:17 PDT. --
Mar 16 11:06:27 KISE-007 rtkit-daemon[1326]: Demoted 3 threads.
Mar 16 11:08:11 KISE-007 sudo[1835]: ljohnson : TTY=pts/0 ; PWD=/home/ljohnson ; USER=root ; COMMAND=/usr/bin/systemctl start netctl@wlan0x2dkise.service
Mar 16 11:08:11 KISE-007 sudo[1835]: pam_unix(sudo:session): session opened for user root by ljohnson(uid=0)
Mar 16 11:08:11 KISE-007 sudo[1835]: pam_unix(sudo:session): session closed for user root
Mar 16 11:08:11 KISE-007 systemd[1]: Starting Networking for netctl profile wlan0x2dkise...
-- Subject: Unit netctl@wlan0x2dkise.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@wlan0x2dkise.service has begun starting up.
Mar 16 11:08:11 KISE-007 systemd[1]: netctl@wlan0x2dkise.service: main process exited, code=exited, status=1/FAILURE
Mar 16 11:08:11 KISE-007 systemd[1]: Failed to start Networking for netctl profile wlan0x2dkise.
-- Subject: Unit netctl@wlan0x2dkise.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@wlan0x2dkise.service has failed.
--
-- The result is failed.
Mar 16 11:08:11 KISE-007 systemd[1]: Unit netctl@wlan0x2dkise.service entered failed state.
Mar 16 11:08:11 KISE-007 network[1838]: Profile 'wlan0x2dkise' does not exist or is not readable
Mar 16 11:08:17 KISE-007 org.gtk.Private.UDisks2VolumeMonitor[1231]: ### debug: Name owner ':1.18' vanished

Here is the wifi-menu created profile:

[ljohnson@KISE-007 ~]$ sudo cat /etc/netctl/wlan0-kise
Description='Automatically generated profile by wifi-menu'
Interface=wlan0
Connection=wireless
Security=wpa
ESSID=kise
IP=dhcpi
Key=****************

I inserted my wireless USB TP-LINK (as wlan1) and got similar results.

[ljohnson@KISE-007 ~]$ sudo iwconfig
wlan0     IEEE 802.11bg  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

lo        no wireless extensions.

eth0      no wireless extensions.

wlan1     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

[ljohnson@KISE-007 ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.139  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 00:1f:16:2b:6f:85  txqueuelen 1000  (Ethernet)
        RX packets 3408  bytes 577386 (563.8 KiB)
        RX errors 0  dropped 809  overruns 0  frame 0
        TX packets 2399  bytes 293589 (286.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 0c:60:76:9d:93:a5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f4:ec:38:8f:ea:74  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And after these efforts, I get:

[root@KISE-007 ~]# systemctl --failed
UNIT                                                    LOAD   ACTIVE SUB    DESCRIPTION
netctl@wireless\x2ddhcp\x2dwlan0\x2dwpa\x2dkise.service loaded failed failed A wireless connection using a custom network block configuration
netctl@wlan0\x2dkise.service                            loaded failed failed Networking for netctl profile wlan0-kise
netctl@wlan0x2dkise.service                             loaded failed failed Networking for netctl profile wlan0x2dkise
netctl@wlan1\x2dkise.service                            loaded failed failed Networking for netctl profile wlan1-kise

All failed with no discernible to me hint as to why, particularly frustrating as the wireless worked fine before..?


Al Einstein: "Man soll die Dinge so einfach machen wie möglich ~ aber nicht einfacher." (Things should be as simple as possible ~ but not too simple.) ~ Al (Einstein) war ein Cousin von Albert, "Al" ist die Abkürzung für Aloysius

Offline

#4 2014-03-16 20:11:34

billybob45
Member
Registered: 2014-03-16
Posts: 1

Re: Predictable Network Interface Names fail, cannot connect wireless

Same here!
wifi worked fine before!!
and now sad

been 2 days like that
i dont know what to do!
somebody has idea?

i deleted profile in /etc/netctl
to recreate neu one with wifi-menu ... doesnt work

Offline

#5 2014-03-16 20:48:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: Predictable Network Interface Names fail, cannot connect wireless

I had this problem too, this is how I got my wireless back up:
Stop all currently running network services (dhcpcd, netctl, wpa_supplicant, etc) and disable them using systemctl.
Set up a new /etc/wpa_supplicant.conf with:

# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
# wpa_passphrase <SSID> <passphrase> >> /etc/wpa_supplicant.conf

Then add to your .xinitrc:

sudo ip link set <interface> up
sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i <interface>
sudo dhcpcd <interface>

<interface> can be either wlan0 or wlp3s0 or whatever: found by running

# ip link

Last edited by Head_on_a_Stick (2014-03-16 20:50:09)


Jin, Jîyan, Azadî

Offline

#6 2014-03-16 21:43:10

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Predictable Network Interface Names fail, cannot connect wireless

Head_on_a_Stick wrote:

I had this problem too, this is how I got my wireless back up:
Stop all currently running network services (dhcpcd, netctl, wpa_supplicant, etc) and disable them using systemctl.
Set up a new /etc/wpa_supplicant.conf with:

# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
# wpa_passphrase <SSID> <passphrase> >> /etc/wpa_supplicant.conf

Then add to your .xinitrc:

sudo ip link set <interface> up
sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i <interface>
sudo dhcpcd <interface>

<interface> can be either wlan0 or wlp3s0 or whatever: found by running

# ip link

How does this solve the issue of failing predictable interface names?  You would still have to figure out what the interface name ends up being, and even then, you would end up with a dirty hack that only works with the X server launched.  Not only that, but it would not work for a number of display managers that don't actually use the xinitrc.  This just doesn't seem like sound advice overall.

@keepitsimpleengineer, I believe the network interface renaming happens with the systemd-networkd configurations now.  In particular, the file /usr/lib/systemd/network/99-default.link handles this.  So that might be something to look into.

If you only have one wireless and one wired interface on this machine, then it might be simpler to just use the traditional kernel namespaces for this.  Just mask the 80-net-setup-link.rules file, or simply mask the 99-default.rules.  They you will end up with eth0 and wlan0.  Though this will do nothing to get to the root of why you are having this issue.

Offline

#7 2014-03-16 22:08:32

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: Predictable Network Interface Names fail, cannot connect wireless

@ WonderWoofy -- a good point, well made smile
It wasnt intended as a solution as such, just a description of how I got my wireless working again.
I don't think the interface names are to blame -- @keepitsimpleengineer lists "no wireless connection" as the primary problem.
The problem is with netctl failing to work and wifi-menu being unable to make a new connection -- I don't know how to fix this. sad
Also the wiki states:

Note: When choosing the static names it should be avoided to use names in the format of "ethX" and "wlanX", because this may lead to race conditions between the kernel and udev during boot.

https://wiki.archlinux.org/index.php/Ne … vice_names
If .xinitrc isn't used, the .bashrc could be changed instead...

Last edited by Head_on_a_Stick (2014-03-16 22:22:13)


Jin, Jîyan, Azadî

Offline

#8 2014-03-17 03:46:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Predictable Network Interface Names fail, cannot connect wireless

Head_on_a_Stick wrote:

Also the wiki states:

Note: When choosing the static names it should be avoided to use names in the format of "ethX" and "wlanX", because this may lead to race conditions between the kernel and udev during boot.

https://wiki.archlinux.org/index.php/Ne … vice_names
If .xinitrc isn't used, the .bashrc could be changed instead...

The use of the traditional kernel namespace only causes a race if you have more than one device that will end up in either the wlan* or eth* namespaces.  If you have a single wired ethernet device and a single wireless device (that gets properly named to wlan*), this is not an issue at all.  The predictable naming scheme solves the issue of more than one interface per namespace by naming it according to its physical location in the machine.

Insead of sticking your networking setup in a user's startup file, you should be using systemd for this.  Network connectivity is exactly the kind of thing that systemd should be handling for you.  Ideally, you should be using the proper tools for this, but just using a oneshot systemd.service or even just having a service run a script would be a lot less wrong than putting it in the bashrc or xinitrc.

Offline

#9 2014-03-17 07:20:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,811
Website

Re: Predictable Network Interface Names fail, cannot connect wireless

Thanks for the info @WonderWoofy, I did make up a one-shot systemd.service (as descibed in the wiki) but it failed in the same way the netctl service failed...
I did not mean to suggest other users should stick my networking setup in their startup file, I was merely illustrating my way of acheiving a network connection; sorry for the confusion.
Also, @keepitsimpleengineer has two wlan connections...

Last edited by Head_on_a_Stick (2014-03-17 07:23:22)


Jin, Jîyan, Azadî

Offline

#10 2014-03-17 15:15:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Predictable Network Interface Names fail, cannot connect wireless

Head_on_a_Stick wrote:

Thanks for the info @WonderWoofy, I did make up a one-shot systemd.service (as descibed in the wiki) but it failed in the same way the netctl service failed...
I did not mean to suggest other users should stick my networking setup in their startup file, I was merely illustrating my way of acheiving a network connection; sorry for the confusion.
Also, @keepitsimpleengineer has two wlan connections...

That's cool Head_on_a_stick.  Maybe you should open a thread and see if someone can help guide you toward finding a real solution for your issue here.  I do think it is good though that you now know how to use the networking tools directly.  That is great knowledge to have when debugging.

You're right that at one point in this thread keepitsimpleengineer has two wireless connections.  But I think that is because he plugged a USB one in to try to debug the issue here.  Ideally, I think he would like to be using the internal WiFi device, having it properly named.

Offline

#11 2014-03-17 18:34:39

keepitsimpleengineer
Member
From: San Joaquin Valley, CA
Registered: 2012-06-25
Posts: 382

Re: Predictable Network Interface Names fail, cannot connect wireless

@ wrote:

You're right that at one point in this thread keepitsimpleengineer has two wireless connections.  But I think that is because he plugged a USB one in to try to debug the issue here.  Ideally, I think he would like to be using the internal WiFi device, having it properly named.

The above is correct.  My yesterday's post went the way of buggy-whips.

I disabled dhcpcd.service, and removed the wired connection, and now the wireless will connect using wifi-menu.  This came from another of @WonderWoofy posts/thread.

Wired will not connect unless plugged in after boot.

The wireless connection is erratic and hangs for periods of time.

Not so much solved as replaced.  Thanks for your help @WonderWoofy.


Al Einstein: "Man soll die Dinge so einfach machen wie möglich ~ aber nicht einfacher." (Things should be as simple as possible ~ but not too simple.) ~ Al (Einstein) war ein Cousin von Albert, "Al" ist die Abkürzung für Aloysius

Offline

#12 2014-03-18 18:29:45

keepitsimpleengineer
Member
From: San Joaquin Valley, CA
Registered: 2012-06-25
Posts: 382

Re: Predictable Network Interface Names fail, cannot connect wireless

keepitsimpleengineer wrote:

I disabled dhcpcd.service, and removed the wired connection, and now the wireless will connect using wifi-menu.  This came from another of @WonderWoofy posts/thread.

On subsequent boots, wireless again fails to connect with wifi-menu.  I have re-enabled dhcpcd.service and can at least get a wired connection.

I am doubtful that systemd/netctl is a workable solution for my laptop.

I guess I'll wait for connman to sort itself out. connman thread

Thanks again all... .. .

Edit: connman wiki

Last edited by keepitsimpleengineer (2014-03-18 18:37:41)


Al Einstein: "Man soll die Dinge so einfach machen wie möglich ~ aber nicht einfacher." (Things should be as simple as possible ~ but not too simple.) ~ Al (Einstein) war ein Cousin von Albert, "Al" ist die Abkürzung für Aloysius

Offline

Board footer

Powered by FluxBB