On Mon, Dec 07, 2015 at 05:44:04PM +0000, Steve McIntyre wrote: > >I *do* get a glitch in the networking, though, which looks like it's >coming from line 124 - it's trying to adjust (un-throttle) the >network. That's giving a suspicious error in line 208 of the log:
And here's the log. -- Steve McIntyre, Cambridge, UK. st...@einval.com Google-bait: http://www.debian.org/CD/free-linux-cd Debian does NOT ship free CDs. Please do NOT contact the mailing lists asking us to send them to you.
Dec 7 17:35:25 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:39 tack systemd[1]: Reloading Laptop Mode Tools. Dec 7 17:35:39 tack laptop_mode[14441]: Enabling debug mode for module /etc/laptop-mode/conf.d/ethernet.conf Dec 7 17:35:39 tack laptop_mode[14441]: Laptop mode Dec 7 17:35:39 tack laptop_mode[14441]: enabled, active Dec 7 17:35:39 tack laptop_mode[14441]: + disableDebug /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:39 tack laptop_mode[14441]: + . /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:39 tack laptop_mode[14441]: #! /bin/sh Dec 7 17:35:39 tack laptop_mode[14441]: # Dec 7 17:35:39 tack laptop_mode[14441]: # Laptop mode tools module: Ethernet power saving tweaks. Dec 7 17:35:39 tack laptop_mode[14441]: # Dec 7 17:35:39 tack laptop_mode[14441]: if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHERNET = xauto ]; then Dec 7 17:35:39 tack laptop_mode[14441]: # Let's check the binaries firts Dec 7 17:35:39 tack laptop_mode[14441]: if [ -x /sbin/ethtool ]; then Dec 7 17:35:39 tack laptop_mode[14441]: ETHTOOL=/sbin/ethtool Dec 7 17:35:39 tack laptop_mode[14441]: elif [ -x /usr/sbin/ethtool ]; then Dec 7 17:35:39 tack laptop_mode[14441]: ETHTOOL=/usr/sbin/ethtool Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "ethtool is not installed" Dec 7 17:35:39 tack laptop_mode[14441]: + sed s/-/_/g Dec 7 17:35:39 tack laptop_mode[14441]: ETHTOOL=/bin/false Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: if [ -x /sbin/mii-tool ]; then Dec 7 17:35:39 tack laptop_mode[14441]: MIITOOL=/sbin/mii-tool Dec 7 17:35:39 tack laptop_mode[14441]: elif [ -x /usr/sbin/mii-tool ]; then Dec 7 17:35:39 tack laptop_mode[14441]: + cut -d . -f1 Dec 7 17:35:39 tack systemd[1]: Starting Session c125617 of user steve. Dec 7 17:35:39 tack systemd[1]: Started Session c125617 of user steve. Dec 7 17:35:39 tack laptop_mode[14441]: MIITOOL=/usr/sbin/mii-tool Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "mii-tool is not installed" Dec 7 17:35:39 tack laptop_mode[14441]: MIITOOL=/bin/false Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: if [ -x /bin/ip ]; then Dec 7 17:35:39 tack laptop_mode[14441]: IPTOOL=/bin/ip Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "ip is not installed" Dec 7 17:35:39 tack laptop_mode[14441]: IPTOOL=/bin/false Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: if [ $ON_AC -eq 1 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: if [ "$ACTIVATE" -eq 1 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: THROTTLE_ETHERNET="$LM_AC_THROTTLE_ETHERNET" Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: THROTTLE_ETHERNET="$NOLM_AC_THROTTLE_ETHERNET" Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: if [ x$DISABLE_ETHERNET_ON_BATTERY = x1 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: # We are ON_AC and Disable feature is requested Dec 7 17:35:39 tack laptop_mode[14441]: # So we might be required to re-enable the device. Dec 7 17:35:39 tack laptop_mode[14441]: DISABLE_ETHERNET=0 #zero would mean that the device needs be re-enabled. Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: DISABLE_ETHERNET=2 Dec 7 17:35:39 tack laptop_mode[14441]: # IF this is the case, don't touch the device for Dec 7 17:35:39 tack laptop_mode[14441]: # enable/disable Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: THROTTLE_ETHERNET="$BATT_THROTTLE_ETHERNET" Dec 7 17:35:39 tack laptop_mode[14441]: if [ x$DISABLE_ETHERNET_ON_BATTERY = x1 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: DISABLE_ETHERNET=1 Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: DISABLE_ETHERNET=2 Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: for DEVICE in $ETHERNET_DEVICES ; do Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "ethernet: $DEVICE" Dec 7 17:35:39 tack laptop_mode[14441]: # Carrier detection Dec 7 17:35:39 tack laptop_mode[14441]: if $IPTOOL link show $DEVICE | grep -q NO-CARRIER; then Dec 7 17:35:39 tack laptop_mode[14441]: carrier="false"; Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: carrier="true"; Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: # Wakeup-on-LAN handling Dec 7 17:35:39 tack laptop_mode[14441]: if [ x$DISABLE_WAKEUP_ON_LAN = x1 ] ; then Dec 7 17:35:39 tack laptop_mode[14441]: ret=`$ETHTOOL -s $DEVICE wol d 2>&1` Dec 7 17:35:39 tack laptop_mode[14441]: exit_status=$?; Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "$ret" Dec 7 17:35:39 tack laptop_mode[14441]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "Enabled wakeup-on-LAN for $DEVICE" Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "Could not enable wakeup-on-LAN for $DEVICE" Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: # Determine speed Dec 7 17:35:39 tack laptop_mode[14441]: speed=`$MIITOOL -v $DEVICE 2>/dev/null | grep capabilities | tr ' ' '\n' |\ Dec 7 17:35:39 tack laptop_mode[14441]: sort -n | sed -ne '/^1.*/p' | cut -d "b" -f1` Dec 7 17:35:39 tack laptop_mode[14441]: if [ -z "$speed" ]; then Dec 7 17:35:39 tack laptop_mode[14441]: speed=0; Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: max_s=0; Dec 7 17:35:39 tack laptop_mode[14441]: min_s=100000; Dec 7 17:35:39 tack laptop_mode[14441]: for s in $speed; Dec 7 17:35:39 tack laptop_mode[14441]: do Dec 7 17:35:39 tack laptop_mode[14441]: if [ $s -gt $max_s ]; then Dec 7 17:35:39 tack laptop_mode[14441]: max_s=$s Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: if [ $s -lt $min_s ]; then Dec 7 17:35:39 tack laptop_mode[14441]: min_s=$s Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: done Dec 7 17:35:39 tack laptop_mode[14441]: MAX_SPEED=$max_s; Dec 7 17:35:39 tack laptop_mode[14441]: case "$THROTTLE_SPEED" in Dec 7 17:35:39 tack laptop_mode[14441]: "slowest") Dec 7 17:35:39 tack laptop_mode[14441]: THROTTLE_SPEED=$min_s Dec 7 17:35:39 tack laptop_mode[14441]: ;; Dec 7 17:35:39 tack laptop_mode[14441]: "fastest") Dec 7 17:35:39 tack laptop_mode[14441]: THROTTLE_SPEED=$max_s Dec 7 17:35:39 tack laptop_mode[14441]: ;; Dec 7 17:35:39 tack laptop_mode[14441]: esac Dec 7 17:35:39 tack laptop_mode[14441]: # Handle throttling Dec 7 17:35:39 tack laptop_mode[14441]: if [ x$THROTTLE_ETHERNET = x1 ] ; then Dec 7 17:35:39 tack laptop_mode[14441]: # Handle Speed Throttling Dec 7 17:35:39 tack laptop_mode[14441]: ret=`$ETHTOOL -s $DEVICE speed $THROTTLE_SPEED 2>&1` Dec 7 17:35:39 tack laptop_mode[14441]: exit_status=$?; Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "$ret"; Dec 7 17:35:39 tack laptop_mode[14441]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "Throttled speed to $THROTTLE_SPEED Mbit for $DEVICE" Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: log "VERBOSE" "Could not throttle speed for $DEVICE" Dec 7 17:35:39 tack laptop_mode[14441]: fi Dec 7 17:35:39 tack laptop_mode[14441]: else Dec 7 17:35:39 tack laptop_mode[14441]: # Handle Speed Throttling Dec 7 17:35:40 tack laptop_mode[14441]: ret=`$ETHTOOL -s $DEVICE speed $MAX_SPEED 2>&1` Dec 7 17:35:40 tack laptop_mode[14441]: exit_status=$?; Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "$ret"; Dec 7 17:35:40 tack laptop_mode[14441]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "Restored speed to $MAX_SPEED Mbit for $DEVICE" Dec 7 17:35:40 tack laptop_mode[14441]: else Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "Could not restore speed for $DEVICE" Dec 7 17:35:40 tack laptop_mode[14441]: fi Dec 7 17:35:40 tack laptop_mode[14441]: fi Dec 7 17:35:40 tack laptop_mode[14441]: # Shut down interface Dec 7 17:35:40 tack laptop_mode[14441]: if [ x$DISABLE_ETHERNET = x1 -a $carrier = "false" ]; then Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" Dec 7 17:35:40 tack laptop_mode[14441]: $IPTOOL link set dev $DEVICE down Dec 7 17:35:40 tack laptop_mode[14441]: elif [ x$DISABLE_ETHERNET = x0 ]; then Dec 7 17:35:40 tack laptop_mode[14441]: $IPTOOL link set dev $DEVICE up Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" Dec 7 17:35:40 tack laptop_mode[14441]: fi Dec 7 17:35:40 tack laptop_mode[14441]: done Dec 7 17:35:40 tack laptop_mode[14441]: else Dec 7 17:35:40 tack laptop_mode[14441]: log "VERBOSE" "Ethernet module is disabled." Dec 7 17:35:40 tack laptop_mode[14441]: fi Dec 7 17:35:40 tack laptop_mode[14441]: + [ xauto = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x1 = x1 -a xauto = xauto ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /sbin/ethtool ] Dec 7 17:35:40 tack laptop_mode[14441]: + ETHTOOL=/sbin/ethtool Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /sbin/mii-tool ] Dec 7 17:35:40 tack laptop_mode[14441]: + MIITOOL=/sbin/mii-tool Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /bin/ip ] Dec 7 17:35:40 tack laptop_mode[14441]: + IPTOOL=/bin/ip Dec 7 17:35:40 tack laptop_mode[14441]: + [ 0 -eq 1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + THROTTLE_ETHERNET=0 Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + DISABLE_ETHERNET=2 Dec 7 17:35:40 tack laptop_mode[14441]: + log VERBOSE ethernet: eth0 Dec 7 17:35:40 tack laptop_mode[14441]: + [ x1 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = MSG ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = ERR ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 1 = 0 ] Dec 7 17:35:40 tack laptop_mode[14441]: + basename /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:40 tack laptop_mode[14441]: + /bin/ip link show eth0 Dec 7 17:35:40 tack laptop_mode[14441]: + grep -q NO-CARRIER Dec 7 17:35:40 tack laptop_mode[14441]: + carrier=true Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + tr \n Dec 7 17:35:40 tack laptop_mode[14441]: + sed -ne /^1.*/p Dec 7 17:35:40 tack laptop_mode[14441]: + tr [:lower:] [:upper:] Dec 7 17:35:40 tack laptop_mode[14441]: + grep capabilities Dec 7 17:35:40 tack laptop_mode[14441]: + [ x1 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + set +vx Dec 7 17:35:40 tack laptop_mode[14441]: + /sbin/mii-tool -v eth0 Dec 7 17:35:40 tack laptop_mode[14441]: + cut -d b -f1 Dec 7 17:35:40 tack laptop_mode[14441]: + sort -n Dec 7 17:35:40 tack laptop_mode[14441]: + speed=10 Dec 7 17:35:40 tack laptop_mode[14441]: 10 Dec 7 17:35:40 tack laptop_mode[14441]: 100 Dec 7 17:35:40 tack laptop_mode[14441]: 100 Dec 7 17:35:40 tack laptop_mode[14441]: 1000 Dec 7 17:35:40 tack laptop_mode[14441]: + [ -z 10 Dec 7 17:35:40 tack laptop_mode[14441]: 10 Dec 7 17:35:40 tack laptop_mode[14441]: 100 Dec 7 17:35:40 tack laptop_mode[14441]: 100 Dec 7 17:35:40 tack laptop_mode[14441]: 1000 ] Dec 7 17:35:40 tack laptop_mode[14441]: + max_s=0 Dec 7 17:35:40 tack laptop_mode[14441]: + min_s=100000 Dec 7 17:35:40 tack laptop_mode[14441]: + [ 10 -gt 0 ] Dec 7 17:35:40 tack laptop_mode[14441]: + max_s=10 Dec 7 17:35:40 tack laptop_mode[14441]: + [ 10 -lt 100000 ] Dec 7 17:35:40 tack laptop_mode[14441]: + min_s=10 Dec 7 17:35:40 tack laptop_mode[14441]: + [ 10 -gt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 10 -lt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 100 -gt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + max_s=100 Dec 7 17:35:40 tack laptop_mode[14441]: + [ 100 -lt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 100 -gt 100 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 100 -lt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 1000 -gt 100 ] Dec 7 17:35:40 tack laptop_mode[14441]: + max_s=1000 Dec 7 17:35:40 tack laptop_mode[14441]: + [ 1000 -lt 10 ] Dec 7 17:35:40 tack laptop_mode[14441]: + MAX_SPEED=1000 Dec 7 17:35:40 tack laptop_mode[14441]: + THROTTLE_SPEED=10 Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + /sbin/ethtool -s eth0 speed 1000 Dec 7 17:35:40 tack systemd[1]: Stopped Run anacron jobs. Dec 7 17:35:40 tack laptop_mode[14441]: + ret=Cannot advertise speed 1000 Dec 7 17:35:40 tack laptop_mode[14441]: + exit_status=0 Dec 7 17:35:40 tack laptop_mode[14441]: + log VERBOSE Cannot advertise speed 1000 Dec 7 17:35:40 tack laptop_mode[14441]: + [ x1 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = MSG ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = ERR ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 1 = 0 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 0 -eq 0 ] Dec 7 17:35:40 tack laptop_mode[14441]: + log VERBOSE Restored speed to 1000 Mbit for eth0 Dec 7 17:35:40 tack laptop_mode[14441]: + [ x1 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = MSG ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = ERR ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x0 = x1 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ 1 = 0 ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x2 = x1 -a true = false ] Dec 7 17:35:40 tack laptop_mode[14441]: + [ x2 = x0 ] Dec 7 17:35:40 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:40 tack systemd[1]: Reloading Laptop Mode Tools. Dec 7 17:35:40 tack laptop_mode[15265]: Enabling debug mode for module /etc/laptop-mode/conf.d/ethernet.conf Dec 7 17:35:40 tack laptop_mode[15265]: Laptop mode Dec 7 17:35:40 tack laptop_mode[15265]: enabled, active [unchanged] Dec 7 17:35:40 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:40 tack systemd[1]: Stopped Run anacron jobs. Dec 7 17:35:40 tack systemd[1]: Reloading Laptop Mode Tools. Dec 7 17:35:40 tack laptop_mode[15462]: Enabling debug mode for module /etc/laptop-mode/conf.d/ethernet.conf Dec 7 17:35:40 tack laptop_mode[15462]: Laptop mode Dec 7 17:35:40 tack laptop_mode[15462]: enabled, active [unchanged] Dec 7 17:35:40 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:46 tack systemd[1]: Reloading Laptop Mode Tools. Dec 7 17:35:46 tack laptop_mode[15547]: Enabling debug mode for module /etc/laptop-mode/conf.d/ethernet.conf Dec 7 17:35:46 tack laptop_mode[15547]: Laptop mode Dec 7 17:35:46 tack laptop_mode[15547]: enabled, not active Dec 7 17:35:46 tack laptop_mode[15547]: + disableDebug /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:46 tack laptop_mode[15547]: + . /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:46 tack laptop_mode[15547]: #! /bin/sh Dec 7 17:35:46 tack laptop_mode[15547]: # Dec 7 17:35:46 tack laptop_mode[15547]: # Laptop mode tools module: Ethernet power saving tweaks. Dec 7 17:35:46 tack laptop_mode[15547]: # Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHERNET = xauto ]; then Dec 7 17:35:46 tack laptop_mode[15547]: # Let's check the binaries firts Dec 7 17:35:46 tack laptop_mode[15547]: if [ -x /sbin/ethtool ]; then Dec 7 17:35:46 tack laptop_mode[15547]: ETHTOOL=/sbin/ethtool Dec 7 17:35:46 tack laptop_mode[15547]: elif [ -x /usr/sbin/ethtool ]; then Dec 7 17:35:46 tack laptop_mode[15547]: ETHTOOL=/usr/sbin/ethtool Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "ethtool is not installed" Dec 7 17:35:46 tack laptop_mode[15547]: ETHTOOL=/bin/false Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: if [ -x /sbin/mii-tool ]; then Dec 7 17:35:46 tack laptop_mode[15547]: MIITOOL=/sbin/mii-tool Dec 7 17:35:46 tack laptop_mode[15547]: elif [ -x /usr/sbin/mii-tool ]; then Dec 7 17:35:46 tack laptop_mode[15547]: MIITOOL=/usr/sbin/mii-tool Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "mii-tool is not installed" Dec 7 17:35:46 tack laptop_mode[15547]: MIITOOL=/bin/false Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: if [ -x /bin/ip ]; then Dec 7 17:35:46 tack laptop_mode[15547]: IPTOOL=/bin/ip Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "ip is not installed" Dec 7 17:35:46 tack laptop_mode[15547]: IPTOOL=/bin/false Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: if [ $ON_AC -eq 1 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: if [ "$ACTIVATE" -eq 1 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: THROTTLE_ETHERNET="$LM_AC_THROTTLE_ETHERNET" Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: THROTTLE_ETHERNET="$NOLM_AC_THROTTLE_ETHERNET" Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$DISABLE_ETHERNET_ON_BATTERY = x1 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: # We are ON_AC and Disable feature is requested Dec 7 17:35:46 tack laptop_mode[15547]: # So we might be required to re-enable the device. Dec 7 17:35:46 tack laptop_mode[15547]: DISABLE_ETHERNET=0 #zero would mean that the device needs be re-enabled. Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: DISABLE_ETHERNET=2 Dec 7 17:35:46 tack laptop_mode[15547]: # IF this is the case, don't touch the device for Dec 7 17:35:46 tack laptop_mode[15547]: # enable/disable Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: THROTTLE_ETHERNET="$BATT_THROTTLE_ETHERNET" Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$DISABLE_ETHERNET_ON_BATTERY = x1 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: DISABLE_ETHERNET=1 Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: DISABLE_ETHERNET=2 Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: for DEVICE in $ETHERNET_DEVICES ; do Dec 7 17:35:46 tack systemd[1]: Starting Session c125618 of user steve. Dec 7 17:35:46 tack systemd[1]: Started Session c125618 of user steve. Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "ethernet: $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: # Carrier detection Dec 7 17:35:46 tack laptop_mode[15547]: if $IPTOOL link show $DEVICE | grep -q NO-CARRIER; then Dec 7 17:35:46 tack laptop_mode[15547]: carrier="false"; Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: carrier="true"; Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: # Wakeup-on-LAN handling Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$DISABLE_WAKEUP_ON_LAN = x1 ] ; then Dec 7 17:35:46 tack laptop_mode[15547]: ret=`$ETHTOOL -s $DEVICE wol d 2>&1` Dec 7 17:35:46 tack laptop_mode[15547]: exit_status=$?; Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "$ret" Dec 7 17:35:46 tack laptop_mode[15547]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Enabled wakeup-on-LAN for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Could not enable wakeup-on-LAN for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: # Determine speed Dec 7 17:35:46 tack laptop_mode[15547]: speed=`$MIITOOL -v $DEVICE 2>/dev/null | grep capabilities | tr ' ' '\n' |\ Dec 7 17:35:46 tack laptop_mode[15547]: sort -n | sed -ne '/^1.*/p' | cut -d "b" -f1` Dec 7 17:35:46 tack laptop_mode[15547]: if [ -z "$speed" ]; then Dec 7 17:35:46 tack laptop_mode[15547]: speed=0; Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: max_s=0; Dec 7 17:35:46 tack laptop_mode[15547]: min_s=100000; Dec 7 17:35:46 tack laptop_mode[15547]: for s in $speed; Dec 7 17:35:46 tack laptop_mode[15547]: do Dec 7 17:35:46 tack laptop_mode[15547]: if [ $s -gt $max_s ]; then Dec 7 17:35:46 tack laptop_mode[15547]: max_s=$s Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: if [ $s -lt $min_s ]; then Dec 7 17:35:46 tack laptop_mode[15547]: min_s=$s Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: done Dec 7 17:35:46 tack laptop_mode[15547]: MAX_SPEED=$max_s; Dec 7 17:35:46 tack laptop_mode[15547]: case "$THROTTLE_SPEED" in Dec 7 17:35:46 tack laptop_mode[15547]: "slowest") Dec 7 17:35:46 tack laptop_mode[15547]: THROTTLE_SPEED=$min_s Dec 7 17:35:46 tack laptop_mode[15547]: ;; Dec 7 17:35:46 tack laptop_mode[15547]: "fastest") Dec 7 17:35:46 tack laptop_mode[15547]: THROTTLE_SPEED=$max_s Dec 7 17:35:46 tack laptop_mode[15547]: ;; Dec 7 17:35:46 tack laptop_mode[15547]: esac Dec 7 17:35:46 tack laptop_mode[15547]: # Handle throttling Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$THROTTLE_ETHERNET = x1 ] ; then Dec 7 17:35:46 tack laptop_mode[15547]: # Handle Speed Throttling Dec 7 17:35:46 tack laptop_mode[15547]: ret=`$ETHTOOL -s $DEVICE speed $THROTTLE_SPEED 2>&1` Dec 7 17:35:46 tack laptop_mode[15547]: exit_status=$?; Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "$ret"; Dec 7 17:35:46 tack laptop_mode[15547]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Throttled speed to $THROTTLE_SPEED Mbit for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Could not throttle speed for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: # Handle Speed Throttling Dec 7 17:35:46 tack laptop_mode[15547]: ret=`$ETHTOOL -s $DEVICE speed $MAX_SPEED 2>&1` Dec 7 17:35:46 tack laptop_mode[15547]: exit_status=$?; Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "$ret"; Dec 7 17:35:46 tack laptop_mode[15547]: if [ $exit_status -eq 0 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Restored speed to $MAX_SPEED Mbit for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Could not restore speed for $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: # Shut down interface Dec 7 17:35:46 tack laptop_mode[15547]: if [ x$DISABLE_ETHERNET = x1 -a $carrier = "false" ]; then Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: $IPTOOL link set dev $DEVICE down Dec 7 17:35:46 tack laptop_mode[15547]: elif [ x$DISABLE_ETHERNET = x0 ]; then Dec 7 17:35:46 tack laptop_mode[15547]: $IPTOOL link set dev $DEVICE up Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: done Dec 7 17:35:46 tack laptop_mode[15547]: else Dec 7 17:35:46 tack laptop_mode[15547]: log "VERBOSE" "Ethernet module is disabled." Dec 7 17:35:46 tack laptop_mode[15547]: fi Dec 7 17:35:46 tack laptop_mode[15547]: + [ xauto = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x1 = x1 -a xauto = xauto ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /sbin/ethtool ] Dec 7 17:35:46 tack laptop_mode[15547]: + ETHTOOL=/sbin/ethtool Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /sbin/mii-tool ] Dec 7 17:35:46 tack laptop_mode[15547]: + MIITOOL=/sbin/mii-tool Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /bin/ip ] Dec 7 17:35:46 tack laptop_mode[15547]: + IPTOOL=/bin/ip Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1 -eq 1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 0 -eq 1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + THROTTLE_ETHERNET=0 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + DISABLE_ETHERNET=2 Dec 7 17:35:46 tack laptop_mode[15547]: + log VERBOSE ethernet: eth0 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x1 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = MSG ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = ERR ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1 = 0 ] Dec 7 17:35:46 tack laptop_mode[15547]: + /bin/ip link show eth0 Dec 7 17:35:46 tack laptop_mode[15547]: + cut -d . -f1 Dec 7 17:35:46 tack laptop_mode[15547]: + sed s/-/_/g Dec 7 17:35:46 tack laptop_mode[15547]: + grep -q NO-CARRIER Dec 7 17:35:46 tack laptop_mode[15547]: + carrier=true Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + tr \n Dec 7 17:35:46 tack laptop_mode[15547]: + basename /usr/share/laptop-mode-tools/modules/ethernet Dec 7 17:35:46 tack laptop_mode[15547]: + + cuttr [:lower:] -d b [:upper:] Dec 7 17:35:46 tack laptop_mode[15547]: -f1 Dec 7 17:35:46 tack laptop_mode[15547]: + sort -n Dec 7 17:35:46 tack laptop_mode[15547]: + /sbin/mii-tool -v eth0 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x1 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + set +vx Dec 7 17:35:46 tack laptop_mode[15547]: + sed -ne /^1.*/p Dec 7 17:35:46 tack laptop_mode[15547]: + grep capabilities Dec 7 17:35:46 tack laptop_mode[15547]: + speed=10 Dec 7 17:35:46 tack laptop_mode[15547]: 10 Dec 7 17:35:46 tack laptop_mode[15547]: 100 Dec 7 17:35:46 tack laptop_mode[15547]: 100 Dec 7 17:35:46 tack laptop_mode[15547]: 1000 Dec 7 17:35:46 tack laptop_mode[15547]: + [ -z 10 Dec 7 17:35:46 tack laptop_mode[15547]: 10 Dec 7 17:35:46 tack laptop_mode[15547]: 100 Dec 7 17:35:46 tack laptop_mode[15547]: 100 Dec 7 17:35:46 tack laptop_mode[15547]: 1000 ] Dec 7 17:35:46 tack laptop_mode[15547]: + max_s=0 Dec 7 17:35:46 tack laptop_mode[15547]: + min_s=100000 Dec 7 17:35:46 tack laptop_mode[15547]: + [ 10 -gt 0 ] Dec 7 17:35:46 tack laptop_mode[15547]: + max_s=10 Dec 7 17:35:46 tack laptop_mode[15547]: + [ 10 -lt 100000 ] Dec 7 17:35:46 tack laptop_mode[15547]: + min_s=10 Dec 7 17:35:46 tack laptop_mode[15547]: + [ 10 -gt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 10 -lt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 100 -gt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + max_s=100 Dec 7 17:35:46 tack laptop_mode[15547]: + [ 100 -lt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 100 -gt 100 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 100 -lt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1000 -gt 100 ] Dec 7 17:35:46 tack laptop_mode[15547]: + max_s=1000 Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1000 -lt 10 ] Dec 7 17:35:46 tack laptop_mode[15547]: + MAX_SPEED=1000 Dec 7 17:35:46 tack laptop_mode[15547]: + THROTTLE_SPEED=10 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + /sbin/ethtool -s eth0 speed 1000 Dec 7 17:35:46 tack laptop_mode[15547]: + ret=Cannot advertise speed 1000 Dec 7 17:35:46 tack laptop_mode[15547]: + exit_status=0 Dec 7 17:35:46 tack laptop_mode[15547]: + log VERBOSE Cannot advertise speed 1000 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x1 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = MSG ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = ERR ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1 = 0 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 0 -eq 0 ] Dec 7 17:35:46 tack laptop_mode[15547]: + log VERBOSE Restored speed to 1000 Mbit for eth0 Dec 7 17:35:46 tack laptop_mode[15547]: + [ x1 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ -x /usr/bin/logger -a VERBOSE != STATUS ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = MSG ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = ERR ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x0 = x1 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ VERBOSE = VERBOSE ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ 1 = 0 ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x2 = x1 -a true = false ] Dec 7 17:35:46 tack laptop_mode[15547]: + [ x2 = x0 ] Dec 7 17:35:46 tack systemd[1]: Starting Run anacron jobs... Dec 7 17:35:46 tack systemd[1]: Started Run anacron jobs. Dec 7 17:35:46 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:46 tack systemd[1]: Reloading Laptop Mode Tools. Dec 7 17:35:46 tack laptop_mode[16363]: Enabling debug mode for module /etc/laptop-mode/conf.d/ethernet.conf Dec 7 17:35:47 tack systemd[1]: Starting Run anacron jobs... Dec 7 17:35:47 tack systemd[1]: Started Run anacron jobs. Dec 7 17:35:47 tack systemd[1]: Reloaded Laptop Mode Tools. Dec 7 17:35:48 tack laptop_mode[16363]: Laptop mode Dec 7 17:35:48 tack laptop_mode[16363]: enabled, not active [unchanged]