← Back to team overview

desktop-packages team mailing list archive

[Bug 1443249] Re: After kernel-3.13.04-41, wireless script checks wrong sys file.

 

[the root cause]
$ apt-get changelog linux-image-3.13.0-41-generic
--->---> snip --->---> snip --->---> snip --->---> snip --->--->
* PCI: Rename sysfs 'enabled' file back to 'enable'
    - LP: #1393477
--->---> snip --->---> snip --->---> snip --->---> snip --->--->

[recommendation 1]
* revert 17-fix-wireless-hook.patch in pm-utils package.

  * debian/patches/17-fix-wireless-hook.patch: Fix typo in wireless
    hook (LP: #1299975).

[recommendation 2]
$ 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/net/$1/device/driver" ] || return 1
     # Skip if not a wireless card.
     [ -d "/sys/class/net/$1/wireless" ] || return 1
+    # Confirm sysfs filename. (enable or enabled)
+    [ -e "/sys/class/net/$1/device/enable" ] && sysfsname="enable"
+    [ -e "/sys/class/net/$1/device/enabled" ] && sysfsname="enabled"
     # Also don't do anything if the device is disabled
-    [ "$(cat /sys/class/net/$1/device/enabled)" = "1" ] || return 1
+    [ "$(cat /sys/class/net/$1/device/$sysfsname)" = "1" ] || return 1
+    unset sysfsname
     driver="$(readlink "/sys/class/net/$1/device/driver")"
     driver=${driver##*/}
     case $driver in

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pm-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1443249

Title:
  After kernel-3.13.04-41, wireless script checks wrong sys file.

Status in pm-utils package in Ubuntu:
  New

Bug description:
  [TEST CASE]
  * on a laptop machine with a ac adapter connect & wireless interface run:
  1. ac adapter disconnect
  2. $ tail /var/log/pm-powersave.log & $ iwconfig

  [Actual Result]
  * wireless power management does not "ON"

  $ tail /var/log/pm-powersave.log
  --->---> snip --->---> snip --->---> snip --->---> snip --->--->
  Running hook /usr/lib/pm-utils/power.d/wireless true:
  cat: /sys/class/net/wlan0/device/enabled: No such file or directory
  /usr/lib/pm-utils/power.d/wireless true: success.
  --->---> 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/pm-powersave.log
  --->---> snip --->---> snip --->---> snip --->---> snip --->--->
  Running hook /etc/pm/power.d/wireless true:
  Turning powersave for wlan0 on...Done.
  /etc/pm/power.d/wireless true: success.
  --->---> 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.d/ath9k_powersave.conf 
  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://www.ftp.ne.jp/Linux/packages/ubuntu/archive/ trusty-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       1.4.1-13 0
          500 http://www.ftp.ne.jp/Linux/packages/ubuntu/archive/ trusty/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/1443249/+subscriptions


References