After kernel-3.13.0-41, wireless script checks wrong sys file.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pm-utils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
[TEST CASE]
* on a laptop machine with a ac adapter connect & wireless interface run:
1. ac adapter disconnect
2. $ tail /var/log/
[Actual Result]
* wireless power management does not "ON"
$ tail /var/log/
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
Running hook /usr/lib/
cat: /sys/class/
/usr/lib/
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
$ iwconfig
wlan0 IEEE 802.11bgn ESSID:"xxxxxxxxx"
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
Power Management:off
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
[Expected Result]
$ tail /var/log/
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
Running hook /etc/pm/
Turning powersave for wlan0 on...Done.
/etc/pm/
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
$ iwconfig
wlan0 IEEE 802.11bgn ESSID:"xxxxxxxxx"
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
Power Management:on
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
$ uname -a
Linux xxxxxxx 3.13.0-49-generic #81-Ubuntu SMP Tue Mar 24 19:29:48 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/modprobe.
options ath9k ps_enable=1
$ apt-cache policy pm-utils
pm-utils:
インストールされているバージョン: 1.4.1-13ubuntu0.1
候補: 1.4.1-13ubuntu0.1
バージョンテーブル:
*** 1.4.1-13ubuntu0.1 0
500 http://
100 /var/lib/
1.4.1-13 0
500 http://
summary: |
- After kernel-3.13.04-41, wireless script checks wrong sys file. + After kernel-3.13.0-41, wireless script checks wrong sys file. |
[the root cause] 3.13.0- 41-generic
$ apt-get changelog linux-image-
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
* PCI: Rename sysfs 'enabled' file back to 'enable'
- LP: #1393477
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
[recommendation 1] wireless- hook.patch in pm-utils package.
* revert 17-fix-
* debian/ patches/ 17-fix- wireless- hook.patch: Fix typo in wireless
hook (LP: #1299975).
[recommendation 2] net/$1/ device/ driver" ] || return 1 net/$1/ wireless" ] || return 1 net/$1/ device/ enable" ] && sysfsname="enable" net/$1/ device/ enabled" ] && sysfsname="enabled" net/$1/ device/ enabled) " = "1" ] || return 1 net/$1/ device/ $sysfsname) " = "1" ] || return 1 "$(readlink "/sys/class/ net/$1/ device/ driver" )" ${driver# #*/}
$ diff -Nur wireless.orig wireless
--- wireless.orig 2015-04-12 13:52:04.911478886 +0900
+++ wireless 2015-04-12 13:52:37.791641939 +0900
@@ -19,8 +19,12 @@
[ -L "/sys/class/
# Skip if not a wireless card.
[ -d "/sys/class/
+ # Confirm sysfs filename. (enable or enabled)
+ [ -e "/sys/class/
+ [ -e "/sys/class/
# Also don't do anything if the device is disabled
- [ "$(cat /sys/class/
+ [ "$(cat /sys/class/
+ unset sysfsname
driver=
driver=
case $driver in