Arch Linux

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!
Tasklist

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
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
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

Closed by  Jouke Witteveen (jouke)
Sunday, 02 March 2014, 18:10 GMT
Reason for closing:  Not a bug
Comment by Tom (reztho) - Sunday, 26 January 2014, 20:38 GMT
I made a mistake in the description. My laptop actually has hardware rfkill device; it's not a switch, but a combination of keys (Fn + F13), so it's correct what the kernel does. But the problem with netctl remains.
Comment by Jouke Witteveen (jouke) - Sunday, 02 March 2014, 17:35 GMT
Your patch doesn't change any functionality at all. It just removes the rf_status function.
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.
Comment by Tom (reztho) - Sunday, 02 March 2014, 18:07 GMT
Did you read correctly the description?
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.


Loading...