View previous topic :: View next topic |
Author |
Message |
yew n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2011 Posts: 9
|
Posted: Wed Jul 20, 2011 5:19 am Post subject: [udev] rfkill oscillation |
|
|
I have a ThinkPad with both switch (hard) and hotkey (soft) rfkill controls, and I'm trying to get udev to start and stop net.wlan0 in response to rfkill events.
10-rfkill.rules: |
SUBSYSTEM=="rfkill", ATTR{type}=="wlan", RUN+="/etc/udev/rfkill"
|
/etc/udev/rfkill: |
#!/bin/bash
if [ "$RFKILL_STATE" = 1 ]; then
/etc/init.d/net.wlan0 start
else # state is 0 or 2
/etc/init.d/net.wlan0 stop
fi
|
The above (mostly from elsewhere on the forum) works perfectly if I flip the switch, but if I press the hotkey it causes net.wlan0 to flicker on and off rapidly. udevadm monitor --kernel --property prints a stream of events changing RFKILL_STATE from 1 to 0 and back again.
Any ideas?
Edit: I'm posting this here because it seems to be primarily a udev issue. Sorry if it should be under Networking and Security... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ultraincognito Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/6th Day/movie_the_6th_talia_elsworth.gif)
Joined: 03 Jun 2011 Posts: 346 Location: Ukraine
|
Posted: Wed Jul 20, 2011 5:42 am Post subject: |
|
|
This is a normal. You can make blocking one hotkey for few seconds using temporary file. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yew n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2011 Posts: 9
|
Posted: Wed Jul 20, 2011 5:56 am Post subject: |
|
|
Normal? The hotkey normally only sends one event when pressed, setting RFKILL_STATE to 0 or 1 as appropriate... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yew n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2011 Posts: 9
|
Posted: Thu Jul 21, 2011 1:55 pm Post subject: |
|
|
Any further advice? I confess, if stopping net.wlan0 is somehow unblocking the wireless radios I've no idea of how. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|