Your message dated Thu, 21 Dec 2023 17:56:09 +0000 with message-id <[email protected]> and subject line Bug#1058701: Removed package(s) from unstable has caused the Debian Bug report #618878, regarding [pm-utils] power.d/wireless broken to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 618878: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618878 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: pm-utils Version: 1.4.1-7 Severity: normal Tags: patch --- Please enter the report below this line. --- I noticed that pm-utils did not turn on wireless power management when unplugging from ac on my laptop. I investigated a bit and found out, that the power.d/wireless skript uses a "heuristic" method for finding out if a network interface is a wireless interface. The line in question is # Skip if not a wireless card. [ -d "/sys/class/net/$1/wireless" ] || return 1 Apparently, the directory /sys/class/net/$1/wireless has gone away, or is not available on every platform at least. Therefor I think it's best to use /sys/class/ieee80211 instead. The patch below corrects the script accordingly. The new skript works fine on my box but I cannot test it on different hardware and it might need some adjustments in the final loop for other network cards since I am not sure what it means, when one ieee80211/* device has multiple ../device/net/* devices. diff --git a/wireless b/wireless index b4be69c..de70084 100755 --- a/wireless +++ b/wireless @@ -16,12 +16,10 @@ get_wireless_params() { unset iwpriv iwconfig iwlevel # Don't do anything if we cannot find a driver for this iface. - [ -L "/sys/class/net/$1/device/driver" ] || return 1 - # Skip if not a wireless card. - [ -d "/sys/class/net/$1/wireless" ] || return 1 + [ -L "/sys/class/ieee80211/$1/device/driver" ] || return 1 # Also don't do anything if the device is disabled - [ "$(cat /sys/class/net/$1/device/enable)" = "1" ] || return 1 - driver="$(readlink "/sys/class/net/$1/device/driver")" + [ "$(cat /sys/class/ieee80211/$1/device/enable)" = "1" ] || return 1 + driver="$(readlink "/sys/class/ieee80211/$1/device/driver")" driver=${driver##*/} case $driver in ipw2100) iwpriv_ac="set_power 0" @@ -31,7 +29,7 @@ get_wireless_params() { ipw3945) iwpriv_ac="set_power 6" iwpriv_batt="set_power 7";; - iwl*) if [ -f "/sys/class/net/$1/device/power_level" ]; then + iwl*) if [ -f "/sys/class/ieee80211/$1/device/power_level" ]; then iwlevel_ac=0 iwlevel_batt=3 else @@ -53,19 +51,21 @@ get_wireless_params() { } wireless_powersave() { - for dev in /sys/class/net/*; do - get_wireless_params "${dev##*/}" "$1" || continue + for phy in /sys/class/ieee80211/*; do + get_wireless_params "${phy##*/}" "$1" || continue ret=0 - printf "Turning powersave for %s %s..." "${dev##*/}" "$1" - if [ "$have_iwconfig" = true -a "$iwconfig" ]; then - iwconfig "${dev##*/}" $iwconfig || ret=1 - fi - if [ "$have_iwpriv" = true -a "$iwpriv" ]; then - iwpriv "${dev##*/}" $iwpriv || ret=1 - fi + for dev in $phy/device/net/*; do + printf "Turning powersave for %s %s..." "${dev##*/}" "$1" + if [ "$have_iwconfig" = true -a "$iwconfig" ]; then + iwconfig "${dev##*/}" $iwconfig || ret=1 + fi + if [ "$have_iwpriv" = true -a "$iwpriv" ]; then + iwpriv "${dev##*/}" $iwpriv || ret=1 + fi + done if [ "$iwlevel" ]; then - echo "$iwlevel" > "$dev/device/power_level" || ret=1 - fi + echo "$iwlevel" > "$phy/device/power_level" || ret=1 + fi [ "$ret" -eq 0 ] && echo Done. || echo Failed. done } @@ -76,4 +76,4 @@ case $1 in *) exit $NA ;; esac -exit 0 \ No newline at end of file +exit 0 --- System information. --- Architecture: amd64 Kernel: Linux 2.6.38-1-amd64 Debian Release: wheezy/sid 500 unstable www.debian-multimedia.org 500 unstable ftp.de.debian.org 500 testing ftp.de.debian.org 100 experimental-snapshots qt-kde.debian.net 1 experimental ftp.de.debian.org --- Package information. --- Depends (Version) | Installed =============================-+-=========== powermgmt-base | 1.31 kbd | OR console-tools | 1:0.2.3dbs-70 Recommends (Version) | Installed =========================-+-=========== vbetool | 1.1-2 procps | 1:3.2.8-10 hdparm | 9.32-1 Suggests (Version) | Installed =============================-+-=========== cpufrequtils | 007-1 wireless-tools | 30~pre9-5 ethtool | 1:2.6.37-1 radeontool |
--- End Message ---
--- Begin Message ---Version: 1.4.1-19+rm Dear submitter, as the package pm-utils has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1058701 The version of this package that was in Debian prior to this removal can still be found using https://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]. Debian distribution maintenance software pp. Thorsten Alteholz (the ftpmaster behind the curtain)
--- End Message ---

