防止 USB 设备耗电

防止 USB 设备耗电

我的 Acer Aspire E15 E5-575 的电池续航能力最近变得非常糟糕。使用 powertop 时,我注意到似乎有某种 USB 设备消耗了相当多的电量。

  Power est.    Usage     Device name
  9.14 W    100.0%        USB device: usb-device-04ca-3015
              0.0 pkts/s  Network interface: eth0 (r8169)
  534 mW     12.5%        DRAM
  304 mW     12.5%        CPU core
 15.0 mW     12.5%        CPU misc
              6.2 pkts/s  Network interface: wlp3s0 (ath10k_pci)
    0 mW    100.0%        USB device: xHCI Host Controller
    0 mW     15.1%        Display backlight
    0 mW      0.0%        USB device: xHCI Host Controller
    0 mW      0.0 ops/s   GPU core
    0 mW      0.0%        Radio device: acer-wmi
    0 mW      0.0%        USB device: HD WebCam (KS0HD0500471803443LM06)
    0 mW      0.0%        Audio codec hwC0D0: Realtek
    0 mW      0.0%        Radio device: btusb
    0 mW      0.0 ops/s   GPU misc

进一步的研究让我运行lsusb -v以下输出usb-设备-04ca-3015

Bus 001 Device 002: ID 04ca:3015 Lite-On Technology Corp. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x04ca Lite-On Technology Corp.
  idProduct          0x3015 
  bcdDevice            0.01
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          177
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1

几天来,我一直在搜索和摆弄 powertop、tlp 和常规电源设置,但似乎无法摆脱 USB 设备这种荒谬的耗电现象。所有可调参数都设置为“良好”。我还使用 TLP 的配置为蓝牙设备启用了 USB 自动挂起模式。

答案1

powertop不是最准确的工具。总功率估算基于电池消耗量,并且确实可以很好地了解系统的总功耗。但是,组件之间的功率分配并不总是准确的。

根据我的经验,通常有一些设备消耗了大部分的电量,但这不一定是问题的根源。

无论如何,您可以尝试进入tunable选项卡powertop并切换“坏”进程。

答案2

从以下这些类型的线路来看,该设备看起来像是一个无线电设备,可能是蓝牙:

bDeviceClass          224 Wireless
bDeviceSubClass         1 Radio Frequency
bDeviceProtocol         1 Bluetooth

您需要打开蓝牙吗?尝试将其关闭或禁用 - 应该在菜单中或从面板/系统托盘图标右键单击,通常在 XFCE 中,但我不知道您的桌面是什么或所有其他桌面是如何设置的,也可能是在设置或程序菜单中的蓝牙或网络中。

或者如果您愿意,可以使用终端命令,这个 Q (如何在 Ubuntu 中从终端禁用蓝牙)有一些 2015 年的版本,但它们可能不再起作用,因为 systemd 似乎更加高效……无论如何,赞成Maythux 的回答如果有任何帮助的话:

sudo service bluetooth stop 
# or start or restart or status

rfkill block bluetooth
# or unblock

或者chcsramm 的回答如果这也有用:

sudo hciconfig hci0 down

如果您可以拔下/关闭/禁用任何其他无线电(WiFi)或任何对电池有帮助的设备,并降低亮度,使任何机械硬盘驱动器旋转/睡眠(可以从内存运行),或降低 CPU 频率,这些也应该对电池有帮助。

答案3

在 Ubuntu 16.04 中,我们可以使用 UDEV 规则让蓝牙设备从 rfkill 中消失

sudo apt-get install gksu
gksu gedit /etc/udev/rules.d/81-bluetooth-hci.rules
然后将其作为一行粘贴到编辑器中
SUBSYSTEM=="usb", ATTRS{idVendor}=="04ca", ATTRS{idProduct}=="3015", ATTR{authorized}="0"
看看重启后是否仍耗电

相关内容