Bug#862975: laptop-mode-tools: Fails to modify wireless txpower using "fixed" with "iw"
On Sun, 2017-05-21 at 12:52 +0300, Rowan Thorpe wrote: > ...and from your followup email: > > Can you please test the following .deb package ? The only delta is the patch > you > > submitted. I'd appreciate if you tested this .deb package, with LMT > Verbosity > > enabled, and shared the results. > > > > https://people.debian.org/~rrs/tmp/laptop-mode-tools_1.71-2_all.deb > > I installed the package and restarted laptop-mode.service with DEBUG=1 > for wireless-power, and when unplugging/replugging the AC I can see it > executes the appropriate power_save=on/off commands OK, without the > failing txpower commands. I didn't uninstall iw to test the iwconfig > behaviour, but I think that is not necessary, as the only change there > was the typo-fix of iw -> iwconfig. I've attached the appropriate part > of /var/log/daemon.log THanks. I have prepared an upload and requested an exception from the Release Team. (DBUG: #863107) -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System signature.asc Description: This is a digitally signed message part
Bug#862975: laptop-mode-tools: Fails to modify wireless txpower using "fixed" with "iw"
On 20 May 2017 at 07:29, Ritesh Raj Sarrafwrote: > ..[snip].. > > > sudo iw dev wlan0 set txpower fixed > > > > it shows: > > > > > Missing TX power level argument. > > > > When I manually run the command with an added parameter, e.g.: > > > > > sudo iw dev wlan0 set txpower fixed 1 > > > > and then check the result with: > > > > > sudo iw dev wlan0 info > > > > it shows the updated value OK. Note that the lowest value it accepts in my > > case is 1, not 0. > > > > Can you please elaborate what you are referring to, in terms of the numbers ? > Do you mean that your wireless device is enumerated as wlan1 ? I am only using wlan0. The numbers I refer to are the commandline arguments. It is easier to show a transcript of what happens for me in the shell: > $ sudo iw dev wlan0 info > Interface wlan0 > ifindex 3 > wdev 0x1 > addr [retracted] > type managed > wiphy 0 > txpower 1.00 dBm > $ sudo iw dev wlan0 set txpower fixed ## no number here: error output, retval > 2 > Missing TX power level argument. > $ sudo iw dev wlan0 set txpower fixed 0 ## with number "zero" here: no > output, retval 0 > $ sudo iw dev wlan0 info ## no change though > Interface wlan0 > ifindex 3 > wdev 0x1 > addr [retracted] > type managed > wiphy 0 > txpower 1.00 dBm > $ sudo iw dev wlan0 set txpower fixed 2 ## with number "two" here (number > "one" also works): no output, retval 0 > $ sudo iw dev wlan0 info ## new txpower has been applied OK > Interface wlan0 > ifindex 3 > wdev 0x1 > addr [retracted] > type managed > wiphy 0 > txpower 2.00 dBm > $ sudo iw dev wlan0 set txpower auto ## auto here: no output, retval 0 > $ sudo iw dev wlan0 info ## txpower reset to default power > Interface wlan0 > ifindex 3 > wdev 0x1 > addr [retracted] > type managed > wiphy 0 > txpower 1.00 dBm but from what I understood from various commit-messages, the txpower commands seem to be redundant when doing "iw .. power_save" commands anyway... ...and from your followup email: > Can you please test the following .deb package ? The only delta is the patch > you > submitted. I'd appreciate if you tested this .deb package, with LMT Verbosity > enabled, and shared the results. > > https://people.debian.org/~rrs/tmp/laptop-mode-tools_1.71-2_all.deb I installed the package and restarted laptop-mode.service with DEBUG=1 for wireless-power, and when unplugging/replugging the AC I can see it executes the appropriate power_save=on/off commands OK, without the failing txpower commands. I didn't uninstall iw to test the iwconfig behaviour, but I think that is not necessary, as the only change there was the typo-fix of iw -> iwconfig. I've attached the appropriate part of /var/log/daemon.log -- Rowan Thorpe http://twitter.com/rowanthorpe http://www.rowanthorpe.com May 21 12:43:17 home systemd[1]: Reloading Laptop Mode Tools. May 21 12:43:17 home laptop_mode[5984]: Enabling debug mode for module /etc/laptop-mode/conf.d/wireless-power.conf May 21 12:43:17 home laptop_mode[5984]: Laptop mode May 21 12:43:17 home laptop-mode: enabled, active May 21 12:43:17 home laptop_mode[5984]: enabled, active May 21 12:43:17 home laptop-mode: Swapping out configuration files. May 21 12:43:17 home laptop_mode[5984]: Swapping out configuration files. May 21 12:43:17 home laptop-mode: /etc/rsyslog.conf is a symlink. May 21 12:43:17 home laptop_mode[5984]: /etc/rsyslog.conf is a symlink. May 21 12:43:17 home laptop-mode: Pointing config file /etc/rsyslog.conf to /etc/rsyslog.conf-batt. May 21 12:43:17 home laptop_mode[5984]: Pointing config file /etc/rsyslog.conf to /etc/rsyslog.conf-batt. May 21 12:43:18 home laptop_mode[5984]: + disableDebug /usr/share/laptop-mode-tools/modules/wireless-power May 21 12:43:18 home laptop_mode[5984]: + . /usr/share/laptop-mode-tools/modules/wireless-power May 21 12:43:18 home laptop_mode[5984]: #! /bin/sh May 21 12:43:18 home laptop_mode[5984]: # May 21 12:43:18 home laptop_mode[5984]: # Laptop mode tools module, called from /usr/sbin/laptop_mode. May 21 12:43:18 home laptop_mode[5984]: # Configuration in /etc/laptop-mode/conf.d/wireless-power.conf. May 21 12:43:18 home laptop_mode[5984]: # May 21 12:43:18 home laptop_mode[5984]: # PURPOSE: power saving for generic wireless adapters that support May 21 12:43:18 home laptop_mode[5984]: # the iwconfig power command. May 21 12:43:18 home laptop_mode[5984]: # May 21 12:43:18 home laptop_mode[5984]: [ "$WIRELESS_POWER_SAVING_EXCLUDE_DRIVERS" ] || WIRELESS_POWER_SAVING_EXCLUDE_DRIVERS="iwl3945 iwl4965 iwlagn ipw3945 ipw2200 ipw2100" May 21 12:43:18 home laptop_mode[5984]: + [ ] May 21 12:43:18 home laptop_mode[5984]: + WIRELESS_POWER_SAVING_EXCLUDE_DRIVERS=iwl3945 iwl4965 iwlagn ipw3945 ipw2200 ipw2100 May 21 12:43:18 home laptop_mode[5984]: # May 21 12:43:18 home laptop_mode[5984]: # Find all the wireless devices that do not use an excluded driver. May 21 12:43:18 home
Bug#862975: laptop-mode-tools: Fails to modify wireless txpower using "fixed" with "iw"
On Sat, 2017-05-20 at 10:14 +0545, Ritesh Raj Sarraf wrote: > > When using the wireless-power module (with its config-file unmodified), it > > fails to enable wireless powersavings. When running with debugging enabled, > > and when running the borked internal command manually: > > > > Thank you for the bug report. I completely missed to backport it for Debian, > when fixing upstream. I'll see if the current freeze status allows pushing for > an exception. In the worst case, it'd be scheduled for the next stable update. Rowan, Can you please test the following .deb package ? The only delta is the patch you submitted. I'd appreciate if you tested this .deb package, with LMT Verbosity enabled, and shared the results. https://people.debian.org/~rrs/tmp/laptop-mode-tools_1.71-2_all.deb I'll then seek exception from the Debian Release Team. Thanks, Ritesh -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System signature.asc Description: This is a digitally signed message part
Bug#862975: laptop-mode-tools: Fails to modify wireless txpower using "fixed" with "iw"
Control: tag -1 +fixed-upstream Hello Rowan, On Fri, 2017-05-19 at 17:09 +0300, Rowan Thorpe wrote: > Package: laptop-mode-tools > Version: 1.71-1 > Severity: normal > Tags: patch > > Dear Maintainer, > > When using the wireless-power module (with its config-file unmodified), it > fails to enable wireless powersavings. When running with debugging enabled, > and when running the borked internal command manually: > Thank you for the bug report. I completely missed to backport it for Debian, when fixing upstream. I'll see if the current freeze status allows pushing for an exception. In the worst case, it'd be scheduled for the next stable update. > > sudo iw dev wlan0 set txpower fixed > > it shows: > > > Missing TX power level argument. > > When I manually run the command with an added parameter, e.g.: > > > sudo iw dev wlan0 set txpower fixed 1 > > and then check the result with: > > > sudo iw dev wlan0 info > > it shows the updated value OK. Note that the lowest value it accepts in my > case is 1, not 0. > Can you please elaborate what you are referring to, in terms of the numbers ? Do you mean that your wireless device is enumerated as wlan1 ? -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System signature.asc Description: This is a digitally signed message part
Bug#862975: laptop-mode-tools: Fails to modify wireless txpower using "fixed" with "iw"
Package: laptop-mode-tools Version: 1.71-1 Severity: normal Tags: patch Dear Maintainer, When using the wireless-power module (with its config-file unmodified), it fails to enable wireless powersavings. When running with debugging enabled, and when running the borked internal command manually: > sudo iw dev wlan0 set txpower fixed it shows: > Missing TX power level argument. When I manually run the command with an added parameter, e.g.: > sudo iw dev wlan0 set txpower fixed 1 and then check the result with: > sudo iw dev wlan0 info it shows the updated value OK. Note that the lowest value it accepts in my case is 1, not 0. This has been fixed (actually, avoided) upstream with the following sequence of commits: https://github.com/rickysarraf/laptop-mode-tools/commit/3644486a9ee4fda7887fa0ecf224e66c4d12a0d2 https://github.com/rickysarraf/laptop-mode-tools/commit/791191702b91f7e23b280f35e292869631f5ba22 https://github.com/rickysarraf/laptop-mode-tools/commit/9ca191ff3e5b002f759d69435f14c7f54020085f Namely, they use: > iw dev wlan0 set power_save [on/off] and *no* txpower settings if "iw" is available, falling back to the old txpower commands with iwconfig (and fixed a variable typo in the test). So it would be good if upstream's new way of running the two commands could be backported as a Debian patch while we wait for upstream to make the next release for packaging. For that purpose I attached a diff by merging the relevant parts of the above 3 commits (note it is the diff that should be turned into a Debian patch, not a diff for creating the debian patch itself). -- System Information: Debian Release: 9.0 APT prefers unstable APT policy: (900, 'unstable'), (500, 'testing'), (500, 'stable'), (100, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages laptop-mode-tools depends on: ii init-system-helpers 1.48 ii lsb-base 9.20161125 ii psmisc 22.21-2.1+b2 ii util-linux 2.29.2-1 Versions of packages laptop-mode-tools recommends: ii ethtool 1:4.8-1+b1 ii hdparm 9.51+ds-1 ii net-tools 1.60+git20161116.90da8a0-1 ii python-qt4 4.11.4+dfsg-2+b1 ii sdparm 1.08-1+b1 ii udev232-23 ii wireless-tools 30~pre9-12+b1 Versions of packages laptop-mode-tools suggests: ii acpid 1:2.0.28-1+b1 -- Configuration Files: /etc/laptop-mode/conf.d/auto-hibernate.conf changed [not included] /etc/laptop-mode/conf.d/bluetooth.conf changed [not included] /etc/laptop-mode/conf.d/configuration-file-control.conf changed [not included] /etc/laptop-mode/conf.d/cpufreq.conf changed [not included] /etc/laptop-mode/conf.d/dpms-standby.conf changed [not included] /etc/laptop-mode/conf.d/eee-superhe.conf changed [not included] /etc/laptop-mode/conf.d/kbd-backlight.conf changed [not included] /etc/laptop-mode/conf.d/lcd-brightness.conf changed [not included] /etc/laptop-mode/conf.d/radeon-dpm.conf changed [not included] /etc/laptop-mode/conf.d/runtime-pm.conf changed [not included] /etc/laptop-mode/conf.d/video-out.conf changed [not included] /etc/laptop-mode/conf.d/wireless-ipw-power.conf changed [not included] /etc/laptop-mode/conf.d/wireless-iwl-power.conf changed [not included] -- no debconf information -- debsums errors found: --- a/usr/share/laptop-mode-tools/modules/wireless-power2017-01-12 15:57:19.0 +0200 +++ b/usr/share/laptop-mode-tools/modules/wireless-power2017-05-19 16:56:56.701809056 +0300 @@ -66,17 +66,12 @@ if [ -n "$IW" ]; then $IW dev $IF set power_save $ONOFF -if [ $ONOFF = "ON" ]; then -$IW dev $IF set txpower auto -else -$IW dev $IF set txpower fixed -fi else $IWCONFIG $IF power $ONOFF -if [ $ONOFF = "ON" ]; then +if [ $ONOFF = "on" ]; then $IWCONFIG $IF txpower auto else -$IW dev $IF txpower fixed +$IWCONFIG dev $IF txpower fixed fi fi }