You are not logged in.
Hi,
Since I reinstalled a new HD in my old laptop (8 years old) I have a problem with my netctl-profile: in about 1 in 4 boots the wireless does not connect. I appreciate it if someone could take a look at what happens, because I cannot seem to find the cause because the logs and errors do not give much information.
Some general info:
1) Wireless interface is wlan0; I turned off dynamic naming of systemd/udev. Network driver is RT2500pci.
2) I use an old kernel version, 3.3.8, because any newer version effectively hard blocks the radio signal without any possibility to change this (rfkill etc).
3) The power saving option of the network interface must be off. An udev rule does this effectively.
4) The ip link of the wireless interface must be off before netctl can start the network profile.
5) When the connection fails, I enter "ip link set wlan0 down" and then start the network profile by entering "netctl start Sorryvoordehobo". This *always* works.
The following logs and outputs perhaps give information about the issue. Particularly the last might be helpful, because it shows that some authentication indeed takes place, but there is no network.
netctl profile:
Description='Sorryvoordehobo'
Interface=wlan0
Connection=wireless
Security=wpa-configsection
IP=dhcp
TimeoutCarrier=60
TimeoutDHCP=90
WPAConfigSection=(
'ssid="sorry voor de hobo"'
'key_mgmt=WPA-PSK'
'proto=WPA'
'pairwise=CCMP'
'group=CCMP'
'psk=1234-etc'
)
ExecUpPost='/usr/bin/ntpd -q || true'
systemctl --failed:
UNIT LOAD ACTIVE SUB DESCRIPTION
netctl@Sorryvoordehobo.service loaded failed failed Sorryvoordehobo
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
systemctl status -l netctl@Sorryvoordehobo.service:
netctl@Sorryvoordehobo.service - Sorryvoordehobo
Loaded: loaded (/etc/systemd/system/netctl@Sorryvoordehobo.service; enabled)
Active: failed (Result: exit-code) since Tue 2013-12-17 21:19:04 CET; 3min 26
s ago
Docs: man:netctl.profile(5)
Process: 176 ExecStart=/usr/lib/network/network start %I (code=exited, status=
1/FAILURE)
Main PID: 176 (code=exited, status=1/FAILURE)
dmesg:
[ 2.879915] Adding 255996k swap on /dev/sda2. Priority:-1 extents:1 across:255996k SS
[ 3.001917] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: data=ordered
[ 3.037816] systemd-journald[90]: Received request to flush runtime journal from PID 1
[ 3.210237] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: excluding 0x170-0x177 0x1f0-0x1f7 0x290-0x297 0x370-0x377
[ 3.212449] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: excluding 0x3e0-0x3e7 0x3f0-0x3f7 0x400-0x40f 0x4d0-0x4d7
[ 3.213304] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: excluding 0x820-0x87f
[ 3.213995] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean.
[ 3.215231] pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xc7fff 0xcc000-0xd3fff 0xe0000-0xfffff
[ 3.215280] pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: clean.
[ 3.215324] pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: clean.
[ 3.215367] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean.
[ 3.400147] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 3.401565] Registered led device: rt2500pci-phy0::radio
[ 3.401645] Registered led device: rt2500pci-phy0::quality
[ 3.401959] snd_via82xx 0000:00:11.5: setting latency timer to 64
[ 3.586063] psmouse serio4: synaptics: Touchpad model: 1, fw: 5.1, id: 0x8f40
b1, caps: 0x80471b/0x0/0x0
[ 3.625577] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/seri
o4/input/input6
[ 9.541467] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 9.690039] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery d
irectory
[ 9.690680] NFSD: starting 90-second grace period
[ 10.513803] wlan0: authenticate with 00:1a:70:9e:3a:70 (try 1)
[ 10.515334] wlan0: authenticated
[ 10.527175] wlan0: associate with 00:1a:70:9e:3a:70 (try 1)
[ 10.529457] wlan0: RX AssocResp from 00:1a:70:9e:3a:70 (capab=0x411 status=0
aid=4)
[ 10.529464] wlan0: associated
[ 10.529472] wlan0: moving STA 00:1a:70:9e:3a:70 to state 1
[ 10.529476] wlan0: moving STA 00:1a:70:9e:3a:70 to state 2
[ 10.577870] Intel AES-NI instructions are not detected.
[ 11.367009] wlan0: moving STA 00:1a:70:9e:3a:70 to state 3
Any ideas as to what exactly fails here? Thanks!
Last edited by anadyr (2013-12-21 21:32:44)
Offline
Does systemd rely on newer kernels to work properly?
Offline
I don't think there is anything wrong with the kernel. Note that with the previous HD everything started perfectly, with the same kernel version. The new HD is a lot faster as it is an SSD; maybe this has anything to do with the issue?
To continue: the connection always works when I manually enter "ip link set wlan0 down" and then start netctl. I figured that I should execute this command before netctl starts, but I cannot seem to get this to work. What I tried is to edit /etc/systemd/system/netctl.service, by entering this command with the options ExecStartPre and ExecStartPost (see the two commented lines):
[Unit]
Description=(Re)store the netctl profile state
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
#ExecStartPre=-/usr/bin/ip link set wlan0 down
ExecStart=-/usr/bin/netctl restore
#ExecStartPost=-/usr/bin/ip link set wlan0 down
ExecStop=/usr/bin/netctl store
KillMode=none
[Install]
WantedBy=multi-user.target
Nevertheless, with either of these lines uncommented I get boots without the netctl-profile starting.
In the original post I did not give the output of ip link. So here it is:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT
group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group
default qlen 1000
link/ether 00:40:45:25:dc:4b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORM
ANT group default qlen 1000
link/ether 00:13:d3:6c:f3:78 brd ff:ff:ff:ff:ff:ff
To conclude: authentication succeeds (see the output of dmesg), but I do not seem to get an IP-address (see above). But I have no idea why, and the error messages are not very clear.
I am still figuring out what happens here, but maybe somebody knows what goes wrong here? Thanks!
Offline
[Unit] Description=(Re)store the netctl profile state Before=network.target [Service] Type=oneshot RemainAfterExit=yes #ExecStartPre=-/usr/bin/ip link set wlan0 down ExecStart=-/usr/bin/netctl restore #ExecStartPost=-/usr/bin/ip link set wlan0 down ExecStop=/usr/bin/netctl store KillMode=none [Install] WantedBy=multi-user.target
Nevertheless, with either of these lines uncommented I get boots without the netctl-profile starting.
You can try to play more with that service file, try to put ExecStart=/usr/bin/ip link set wlan0 down and ExecStart=/usr/bin/sleep 2 before ExecStart=/usr/bin/netctl restore, also your service file is oneshot, so you should be able to use multiple ExecStart which should then run serially. Also, I wouldn't use dashes at the beginning of the path, then it could be harder to guess what exactly in the process actually failed.
English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?
Offline
I decided to focus on the executable /usr/lib/network/network, because this is the script that ultimately starts the network. This fails, unfortunately, without giving any futher information However, I cannot reproduce the error by issuing the command "/usr/lib/network/network start Sorryvoordehobo" manually, because it always connects properly.
Conclusion: there is something in my boot process that stops netctl from connecting properly...
I stopped altering the netctl.service file because I found out that it is called after the profile has been called (netctl@Sorryvoordehobo.service)
Last edited by anadyr (2013-12-20 19:17:35)
Offline
Well, there was a problem with my logs & journalctl did not report properly. After reinstalling the logs I do get error messages that indicate what is going on: rfkill blocks the connection:
netctl@Sorryvoordehobo.service - Sorryvoordehobo
Loaded: loaded (/etc/systemd/system/netctl@Sorryvoordehobo.service; enabled)
Active: failed (Result: exit-code) since Sat 2013-12-21 12:03:05 CET; 2min 35s ago
Docs: man:netctl.profile(5)
Process: 178 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
Main PID: 178 (code=exited, status=1/FAILURE)
Dec 21 12:03:00 laptop network[178]: Starting network profile 'Sorryvoordehobo'...
Dec 21 12:03:00 laptop network[178]: RTNETLINK answers: Operation not possible due to RF-kill
Dec 21 12:03:05 laptop systemd[1]: netctl@Sorryvoordehobo.service: main process exited, code=exited, status=1/FAILURE
Dec 21 12:03:05 laptop systemd[1]: Failed to start Sorryvoordehobo.
Dec 21 12:03:05 laptop systemd[1]: Unit netctl@Sorryvoordehobo.service entered failed state.
So I tried to set the RFKill option in the profile to auto and to phy0 (the name of the interface) but no success. I also started the rfkill-unblock@phy0.service, but that did not help either (and I think that I should not use this as netctl should take care of rfkill).
What bothers me at the moment is that rfkill is blocked, but that the connection works fine after issuing the following two commands (without unblocking rfkill!)
/usr/bin/ip link set wlan0 down
/usr/bin/netctl start Sorryvoordehobo
Last edited by anadyr (2013-12-21 11:14:04)
Offline
I finally solved it by creating a systemd unit:
[Unit]
Description=Wireless network Sorryvoordehobo
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/rfkill unblock 0
ExecStart=/usr/bin/ip link set wlan0 up
ExecStart=/usr/bin/ip link set wlan0 down
ExecStart=/usr/lib/network/network start Sorryvoordehobo
ExecStop=/usr/lib/network/network stop Sorryvoordehobo
[Install]
WantedBy=multi-user.target
The thing to notice is the "/usr/bin/sleep 2" command. It turned out that after sys-subsystem-net-devices-wlan0.device was started, the system "thinks" for a short time that RF-kill is blocked. After 2 seconds this hard block is automatically removed, and wireless can be started. My new SSD hard drive, with IDE connection (!), is simply too fast
I had to create this unit file because I could find no other way to execute the sleep-command before netctl starts the profile.
Offline