You are not logged in.
Pages: 1
Hi all,
Since I've installed a solid state drive I am experiencing problems with my wireless connection at boot. I have spent hours already troubleshooting; I thought that I have fixed it (see this post) but it turned out that it isn't fixed yet. See for details about my setup at the end of this post.
The problem is that the connection works at boot sometimes, and sometimes not. I have now traced the problem to rfkill reporting the hard block is on; please see the following outputs.
Fail (note the 5 seconds delay between RTNETLINK and systemd):
-- Logs begin at Sun 2013-12-22 10:28:05 CET, end at Mon 2013-12-23 11:11:29 CET. --
Dec 23 11:11:23 laptop systemd[1]: Starting wireless-open...
Dec 23 11:11:23 laptop network[173]: Starting network profile 'wireless-open'...
Dec 23 11:11:23 laptop network[173]: RTNETLINK answers: Operation not possible due to RF-kill
Dec 23 11:11:28 laptop network[173]: Failed to bring the network up for profile 'wireless-open'
Dec 23 11:11:28 laptop systemd[1]: netctl@wireless-open.service: main process exited, code=exited, status=1/FAILURE
Dec 23 11:11:28 laptop systemd[1]: Failed to start wireless-open.
Dec 23 11:11:28 laptop systemd[1]: Unit netctl@wireless-open.service entered failed state.
Success (note the 6 seconds delay between RTNETLINK and dhcpcd):
-- Logs begin at Sun 2013-12-22 10:28:05 CET, end at Mon 2013-12-23 11:11:29 CET. --
Dec 23 11:09:31 laptop systemd[1]: Starting wireless-open...
Dec 23 11:09:32 laptop network[172]: Starting network profile 'wireless-open'...
Dec 23 11:09:32 laptop network[172]: RTNETLINK answers: Operation not possible due to RF-kill
Dec 23 11:09:38 laptop dhcpcd[3722]: version 6.1.0 starting
Dec 23 11:09:38 laptop dhcpcd[3722]: wlan0: rebinding lease of 192.168.10.29
Dec 23 11:09:43 laptop dhcpcd[3722]: wlan0: leased 192.168.10.29 for 86400 seconds
Dec 23 11:09:43 laptop dhcpcd[3722]: wlan0: adding host route to 192.168.10.29 via 127.0.0.1
Dec 23 11:09:43 laptop dhcpcd[3722]: wlan0: adding route to 192.168.10.0/24
Dec 23 11:09:43 laptop dhcpcd[3722]: wlan0: adding default route via 192.168.10.253
Dec 23 11:09:43 laptop dhcpcd[3722]: forked to background, child pid 3843
Dec 23 11:09:43 laptop network[172]: Started network profile 'wireless-open'
Dec 23 11:09:43 laptop systemd[1]: Started wireless-open.
I have rebooted 10 times in a row; it failed once, and succeeded 9 times. In those 9 times the delay between the rfkill and dhcpcd is always 6 seconds.
The strangest thing is that dhcpcd is started even though "RTNETLINK answers: Operation not possible due to RF-kill". When I manually enter "rfkill list", it always reports "hard blocked: no". Similarly, the wifi-light is on, which also indicates that the hard block is off.
I copy paste the other information from my previous post:
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.
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.
Does anybody have an idea how to get the network started always?
Last edited by anadyr (2013-12-23 10:58:27)
Offline
Well, I made a script, /usr/bin/rfkilltest.sh, which calls itself:
#!/bin/sh
if [ `cat /sys/class/rfkill/rfkill0/hard` -eq 0 ]; then
echo hard block ok
else
sleep 1
echo waiting for rfkill unblock...
/usr/bin/rfkilltest.sh
fi
and I call this script from a custom systemd unit, wireless-open.service
[Unit]
Description=Wireless network wireless-open
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/ip link set wlan0 up
ExecStart=/usr/bin/ip link set wlan0 down
ExecStart=/usr/bin/rfkilltest.sh
ExecStart=/usr/lib/network/network start wireless-open
ExecStop=/usr/lib/network/network stop wireless-open
[Install]
WantedBy=multi-user.target
And now this happens:
-- Logs begin at Sun 2013-12-22 10:28:12 CET, end at Mon 2013-12-23 15:29:52 CET. --
Dec 23 15:29:38 laptop systemd[1]: Starting Wireless network wireless-open...
Dec 23 15:29:39 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:40 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:41 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:42 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:43 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:44 laptop rfkilltest.sh[177]: waiting for rfkill unblock...
Dec 23 15:29:44 laptop rfkilltest.sh[177]: hard block ok
Dec 23 15:29:45 laptop network[225]: Starting network profile 'wireless-open'...
Dec 23 15:29:46 laptop dhcpcd[298]: version 6.1.0 starting
Dec 23 15:29:46 laptop dhcpcd[298]: wlan0: rebinding lease of 192.168.10.29
Dec 23 15:29:52 laptop dhcpcd[298]: wlan0: leased 192.168.10.29 for 86400 seconds
Dec 23 15:29:52 laptop dhcpcd[298]: wlan0: adding host route to 192.168.10.29 via 127.0.0.1
Dec 23 15:29:52 laptop dhcpcd[298]: wlan0: adding route to 192.168.10.0/24
Dec 23 15:29:52 laptop dhcpcd[298]: wlan0: adding default route via 192.168.10.253
Dec 23 15:29:52 laptop dhcpcd[298]: forked to background, child pid 400
Dec 23 15:29:52 laptop network[225]: Started network profile 'wireless-open'
Dec 23 15:29:52 laptop systemd[1]: Started Wireless network wireless-open.
Amazingly it works! This is amazing because I have near zero experience in bash scripting So, it waits until the system sees that the rfkill hard block is removed, and then continues.
Final issue that I want to fix is this: the script is in fact a loop, so if I forget about the wifi button on the laptop (which toggles the hard block) the script endlessly continues. What I want is a timeout, so that if it repeats itself about 15x it stops. Any ideas how to do this? Thanks in advance!
Last edited by anadyr (2013-12-23 14:54:17)
Offline
Pages: 1