Bug#786444: laptop-mode-tools: DISABLE_ETHERNET_ON_BATTERY documentation is inconsistent
Control: tag -1 +fixed-upstream Hello Daniel, On Tue, 2015-06-02 at 16:50 -0400, Daniel Kahn Gillmor wrote: > On Wed 2015-05-27 13:43:49 -0400, Ritesh Raj Sarraf wrote: > > On Friday 22 May 2015 12:16 AM, Daniel Kahn Gillmor wrote: > > > In practice, it looks like the manpage is correct, and the > > > comments in > > > ethernet.conf are wrong. > > > > > > This is too bad, because it would be nice to avoid disabling the > > > link > > > when the carrier is still active. > > IIRC, the configuration comments are correct. This change was > > proposed > > by someone later, and the justification was similar. It should be > > in the > > git commit logs. > > This is now fixed. The man page is updated. The comments in the configuration file are correct. > > > Also, with this flag set (as it is by default, i think), the > > > ethernet > > > does not get re-enabled after moving back from Battery to AC > > > power. > > By deafult, we wouldn't disable the eth device. > > > > Regarding the behavior, I'll look into this later. Meanwhile, if > > you > > root-cause it, please do comment on this bug. > > I just checked the code and it looks good to me. If you run into this problem, the debug logs will help. > > Ok, looking into it a bit further, it's even more complicated by a > couple other options. > > DISABLE_ETHERNET_ON_BATTERY=1 is supposed to re-enable the ethernet > when > the AC is plugged back in. > With the standard defaults, this should work. I just checked the code and it looks good to me. > But if ENABLE_LAPTOP_MODE_ON_AC=0, then i think the > /usr/share/laptop-mode-tools/modules/ethernet never gets run at all > after the power has been plugged back in, so it doesn't know to bring > the NIC back up. > Ummm... I think you have read it differently. That setting would mean to enable/disable all Laptop Mode Tools Power Savings, even while on AC Power. That is why it is disabled by default. There were user reports, running desktops (and other devices), as Jukebox, and they wanted the machine to be in low power mode. And now when I go and read the comments/man page myself, it is not clear enough. Perhaps I will update the man page and config settings. > Also, while the test for active carrier appears to actually work (as > seen by set -x within .../modules/ethernet, it avoids bringing down > eth0 > if there is no NO-CARRIER present from "ip link show eth0"), > something > else (also in laptop-mode-tools, because it doesn't happen when the > package is purged) is bringing down the NIC. > Yes. I think this has also been fixed today in #807338 > So this is still pretty confusing to me, and it looks like there is > at > least one bug besides the documentation. > > --dkg Thanks for the bug reports. I am hopeful, todays fixes should also address the issues you've reported. PS: As I've mentioned in bug #807338, you may want to consider upgrading to the version in testing/unstable. LMT does not have any strong dependency, and should work fine. The version in Jessie is old. Also the newer ones have much much better systemd integration. And if you are interested to also test the bug fixes from today, you can look at the upstream git repo. In total, with both the bug reports, the code fix is 1. The rest are documentation fixes. https://github.com/rickysarraf/laptop-mode-tools -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." signature.asc Description: This is a digitally signed message part
Bug#786444: laptop-mode-tools: DISABLE_ETHERNET_ON_BATTERY documentation is inconsistent
On Wed 2015-05-27 13:43:49 -0400, Ritesh Raj Sarraf wrote: On Friday 22 May 2015 12:16 AM, Daniel Kahn Gillmor wrote: In practice, it looks like the manpage is correct, and the comments in ethernet.conf are wrong. This is too bad, because it would be nice to avoid disabling the link when the carrier is still active. IIRC, the configuration comments are correct. This change was proposed by someone later, and the justification was similar. It should be in the git commit logs. Also, with this flag set (as it is by default, i think), the ethernet does not get re-enabled after moving back from Battery to AC power. By deafult, we wouldn't disable the eth device. Regarding the behavior, I'll look into this later. Meanwhile, if you root-cause it, please do comment on this bug. Perhaps there's a cleanup step that needs to happen as well here? I need to verify first. And my current laptop has no eth devices. But I'll be able to figure out. Just need some time. My gut feel is that the manpage is outdated. Ok, looking into it a bit further, it's even more complicated by a couple other options. DISABLE_ETHERNET_ON_BATTERY=1 is supposed to re-enable the ethernet when the AC is plugged back in. But if ENABLE_LAPTOP_MODE_ON_AC=0, then i think the /usr/share/laptop-mode-tools/modules/ethernet never gets run at all after the power has been plugged back in, so it doesn't know to bring the NIC back up. Also, while the test for active carrier appears to actually work (as seen by set -x within .../modules/ethernet, it avoids bringing down eth0 if there is no NO-CARRIER present from ip link show eth0), something else (also in laptop-mode-tools, because it doesn't happen when the package is purged) is bringing down the NIC. So this is still pretty confusing to me, and it looks like there is at least one bug besides the documentation. --dkg -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#786444: laptop-mode-tools: DISABLE_ETHERNET_ON_BATTERY documentation is inconsistent
On Friday 22 May 2015 12:16 AM, Daniel Kahn Gillmor wrote: In practice, it looks like the manpage is correct, and the comments in ethernet.conf are wrong. This is too bad, because it would be nice to avoid disabling the link when the carrier is still active. IIRC, the configuration comments are correct. This change was proposed by someone later, and the justification was similar. It should be in the git commit logs. Also, with this flag set (as it is by default, i think), the ethernet does not get re-enabled after moving back from Battery to AC power. By deafult, we wouldn't disable the eth device. Regarding the behavior, I'll look into this later. Meanwhile, if you root-cause it, please do comment on this bug. Perhaps there's a cleanup step that needs to happen as well here? I need to verify first. And my current laptop has no eth devices. But I'll be able to figure out. Just need some time. My gut feel is that the manpage is outdated. Thanks for reporting. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. signature.asc Description: OpenPGP digital signature
Bug#786444: laptop-mode-tools: DISABLE_ETHERNET_ON_BATTERY documentation is inconsistent
Package: laptop-mode-tools Version: 1.66-2 Severity: normal The documentation about DISABLE_ETHERNET_ON_BATTERY disagrees about whether it will choose to disable of the NIC based on carrier status: In /etc/laptop-mode-tools/conf.d/ethernet.conf, it says: - # In practise, most of the times a user is on battery, she is using the wireless device # Under such cases, you might want to disable your ethernet interface completely, when # on battery. # # Set below setting to 1, to disable ethernet interface when on battery and # when no carrier is detected on the interface (e.g., no active cable is # plugged in). DISABLE_ETHERNET_ON_BATTERY=1 - but in laptop-mode.conf(8), it says: DISABLE_ETHERNET_ON_BATTERY Set this to 1 if you want to completely disable your ethernet device when running on battery. Default is 0 In practice, it looks like the manpage is correct, and the comments in ethernet.conf are wrong. This is too bad, because it would be nice to avoid disabling the link when the carrier is still active. Also, with this flag set (as it is by default, i think), the ethernet does not get re-enabled after moving back from Battery to AC power. Perhaps there's a cleanup step that needs to happen as well here? --dkg -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages laptop-mode-tools depends on: ii lsb-base4.1+Debian13+nmu1 ii psmisc 22.21-2 ii util-linux 2.26.2-3 Versions of packages laptop-mode-tools recommends: ii ethtool 1:3.16-1 ii hdparm 9.43-2 ii net-tools 1.60-26+b1 ii python-qt4 4.11.2+dfsg-1 ii sdparm 1.08-1 ii udev215-17 ii wireless-tools 30~pre9-8 Versions of packages laptop-mode-tools suggests: ii acpid 1:2.0.23-2 -- Configuration Files: /etc/laptop-mode/conf.d/usb-autosuspend.conf 5ec19c7a0c63c3f10002a9b8dc0928ed [Errno 2] No such file or directory: u'/etc/laptop-mode/conf.d/usb-autosuspend.conf 5ec19c7a0c63c3f10002a9b8dc0928ed' -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org