指示灯电源状态变化延迟

我最近在我的东芝L645笔记本电脑上从32位14.04 LTS迁移到64位16.04 LTS。 我在统一面板上遇到电源指示灯问题。 当我从AC将电源更换为电池时, indicator-power通常需要几分钟才能更新状态。 我知道系统/硬件工作正常,因为udevadm monitor -u立即输出更改:

 UDEV [3276.620509] change /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ACAD (power_supply) UDEV [3277.010187] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1 (power_supply) UDEV [3451.378534] change /devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ACAD (power_supply) UDEV [3451.770260] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1 (power_supply) 

我认为真正的问题是indicator-power用于更新其信息的upower包。 当我执行upower --monitor-detail我可以看到当电源状态改变时它没有更新。 我当前的版本是upower (0.99.4-2ubuntu0.2)

更新:这个问题不是持久性的,即有时indicator-power立即工作,有时则不然。

这是在11:58:20.495时拔出的upower daemon输出(注意本native-path最初表示BAT1但在11:58:20.499快速更改为ACAD ,即使计算机仍然断开连接。本native-path仅在12:00:21.292更正12:00:21.292 ,两分钟后完整):

 [11:58:20.495] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 11:58:20 AM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: fully-charged warning-level: none energy: 4.46 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 65.355 W voltage: 12.568 V percentage: 100% capacity: 100% technology: lithium-ion icon-name: 'battery-full-charged-symbolic' [11:58:20.499] device changed: /org/freedesktop/UPower/devices/line_power_ACAD native-path: ACAD power supply: yes updated: Sat 18 Jun 2016 11:58:20 AM NPT (0 seconds ago) has history: no has statistics: no line-power warning-level: none online: no icon-name: 'ac-adapter-symbolic' [11:58:20.499] device changed: /org/freedesktop/UPower/devices/line_power_ACAD native-path: ACAD power supply: yes updated: Sat 18 Jun 2016 11:58:20 AM NPT (0 seconds ago) has history: no has statistics: no line-power warning-level: none online: no icon-name: 'ac-adapter-symbolic' [12:00:21.292] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.296] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.298] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.300] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.302] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.303] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.305] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.307] device changed: /org/freedesktop/UPower/devices/battery_BAT1 native-path: BAT1 vendor: LGC power supply: yes updated: Sat 18 Jun 2016 12:00:21 PM NPT (0 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none energy: 4.401 Wh energy-empty: 0 Wh energy-full: 4.46 Wh energy-full-design: 4.4 Wh energy-rate: 1.754 W voltage: 12.105 V time to empty: 2.5 hours percentage: 98% capacity: 100% technology: lithium-ion icon-name: 'battery-full-symbolic' History (charge): 1466230521 98.000 discharging History (rate): 1466230521 1.754 discharging [12:00:21.309] daemon changed: daemon-version: 0.99.4 on-battery: yes lid-is-closed: no lid-is-present: yes critical-action: HybridSleep 

但是,当回到AC时,变化是即时的。 仅在将状态从AC更改为电池时才会发生此延迟!