Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#38675 - [netctl] Netctl isn't prepared to have both types of rfkill devices, hard and soft, at the same time
Attached to Project:
Arch Linux
Opened by Tom (reztho) - Sunday, 26 January 2014, 19:15 GMT
Last edited by Jouke Witteveen (jouke) - Sunday, 02 March 2014, 18:10 GMT
Opened by Tom (reztho) - Sunday, 26 January 2014, 19:15 GMT
Last edited by Jouke Witteveen (jouke) - Sunday, 02 March 2014, 18:10 GMT
|
DetailsDescription:
My laptop doesn't have a rfkill hardware switch, but the kernel thinks the laptop has it, so I have both files: /sys/class/rfkill/rfkill0/{hard, soft}. Netctl is programmed to give preference to the hard rfkill device, but it doesn't check the state of soft rfkill device after the hard one. So in my case for whatever reason sometimes it happens that the soft rfkill device is enabled but because netctl only checks the hard one, it doesn't disable the soft rfkill device and I just can't connect to any wireless network. Additional info: * netctl 1.4-2 * Added a patch for/usr/lib/network/rfkill to fix this problem. Steps to reproduce: 1. You need to have these files: /sys/class/rfkill/rfkill0/{hard, soft} 2. rfkill block wlan 3. netctl start profile Doing what the netctl@.service would do: # /usr/lib/network/network start wlanProfile Starting network profile 'wlanProfile'... Successfully initialized wpa_supplicant rfkill: WLAN soft blocked Could not set interface wlan0 flags (UP): Operation not possible due to RF-kill Failed to bring the network up for profile 'wlanProfile' |
This task depends upon
rfkill_netctl_both.patch
I don't see a bug. If transmission is hard blocked, there is no point in looking at the soft block status, because we can't transmit anyway.
Currently, netctl won't connect with hard rfkill disabled and soft rfkill enabled. Netctl is assuming it exists or hard rfkill or soft rfkill, not both. So when it's only soft rkill avaliable, netctl unblocks it if soft rfkill is enabled. When both are avaliable, it doesn't check the status of the soft rfkill. It should check both. The patch fixes this.
Edit: I was totally wrong, although the problem is still there and I accidentally fixed it with my patch. The $path variable inside rf_enable is empty when netctl tries to write a 0 the soft rfkill file, so it writes a 0 to /soft instead of /sys/class/rfkill/rfkillX/soft file.