Usb 使用Yubikey Nano时笔记本电脑闲置功耗调整
背景 大约一年前,我使用powertop优化我的笔记本电脑的功耗(以下和指南),最终得到了这项systemd服务:Usb 使用Yubikey Nano时笔记本电脑闲置功耗调整,usb,system,power-management,pci,yubico,Usb,System,Power Management,Pci,Yubico,背景 大约一年前,我使用powertop优化我的笔记本电脑的功耗(以下和指南),最终得到了这项systemd服务: [Unit] Description=Powertop tunings for X1 Carbon 5th [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c "echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';" ExecStart=/b
[Unit]
Description=Powertop tunings for X1 Carbon 5th
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';"
ExecStart=/bin/sh -c "echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';"
ExecStart=/bin/sh -c "echo '0' > '/proc/sys/kernel/nmi_watchdog';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/i2c/devices/i2c-0/device/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/i2c/devices/i2c-2/device/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/usb/devices/1-9/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/i2c/devices/i2c-1/device/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control';"
ExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/pci/devices/0000:00:08.0/power/control';"
# ... omitted some more PCI devices ...
[Install]
WantedBy=multi-user.target
问题分析
这很好地工作,并且降低了我笔记本电脑的闲置功耗——直到几个月前,我得到了一台Yubikey 5C nano
然而现在,我的笔记本电脑的空闲功耗从以前的5-5.5W上升到现在的5.8-6.2W(没有Yubikey Nano插电和插电。在空闲系统上观察到的读数超过5分钟,没有打开程序。)
不是尤比基在消耗额外的瓦特,否则很可能是。相反,这可能是由于USB控制器没有正常睡眠造成的
当我运行powertop
时,我会在Tuning选项卡中看到以下内容:
但是,如果我删除Yubikey,再次插入它,然后再次运行powertop--html=reportB.html
,我会在Tuning选项卡中看到以下内容:
问题
这就引出了一系列问题:
- 可能的副作用是什么
- 那么,仅适用于USB设备YubiKey的自动暂停功能如何
- 如果在某些奇怪的情况下,我无论如何都要删除它,那会有什么影响呢
| Description | Script |
| ----------- | ------ |
| Autosuspend for USB device YubiKey OTP+FIDO+CCID [Yubico] | echo 'auto' > '/sys/bus/usb/devices/3-2/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:3c:00.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:07:04.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:07:01.0/power/control'; |
| Description | Script |
| ----------- | ------ |
| Autosuspend for USB device YubiKey OTP+FIDO+CCID [Yubico] | echo 'auto' > '/sys/bus/usb/devices/3-2/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:3c:00.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:07:02.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:06:00.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:07:04.0/power/control'; |
| Runtime PM for PCI Device Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] | echo 'auto' > '/sys/bus/pci/devices/0000:07:01.0/power/control'; |