如果我在笔记本电脑关闭时插入电池,电池指示器就会消失。我使用的是带有 Unity 桌面的官方 ubuntu 14.04。在系统设置中,为“在状态栏中显示电池”选择了“当电池存在时”选项。如果我在笔记本电脑开机时插入电池,它就可以正常工作。在 13.10 上,它可以正常工作。我全新安装了 14.04。有什么想法吗?
编辑1:这是输出ps ax | grep indicator-power-service
:
2709 ? Ssl 0:00 /usr/lib/x86_64-linux-gnu/indicator-power/indicator-power-service
12133 pts/1 S+ 0:00 grep --color=auto indicator-power-service
编辑2:这是的输出upower --dump
。笔记本电脑使用电池供电且未插电,但没有电池指示器:
Device: /org/freedesktop/UPower/devices/line_power_AC0
native-path: AC0
power supply: yes
updated: понедељак, 14. јул 2014. 10:54:51 CEST (2631 seconds ago)
has history: no
has statistics: no
line-power
online: no
Daemon:
daemon-version: 0.9.23
can-suspend: yes
can-hibernate: yes
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
is-docked: no
编辑3:这是的输出sudo lshw -sanitize
。我在指示器工作并且计算机已插入时执行了此操作。谢谢!
computer
description: Notebook
product: K55A (ASUS-NotebookSKU)
vendor: ASUSTeK COMPUTER INC.
version: 1.0
serial: [REMOVED]
width: 64 bits
capabilities: smbios-2.7 dmi-2.7 vsyscall32
configuration: boot=normal chassis=notebook family=K sku=ASUS-NotebookSKU uuid=[REMOVED]
*-core
description: Motherboard
product: K55A
vendor: ASUSTeK COMPUTER INC.
physical id: 0
version: 1.0
serial: [REMOVED]
slot: MIDDLE
*-firmware
description: BIOS
vendor: American Megatrends Inc.
physical id: 0
version: K55A.407
date: 12/25/2012
size: 64KiB
capacity: 6080KiB
capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecification uefi
*-cache:0
description: L2 cache
physical id: 8
slot: CPU Internal L2
size: 512KiB
capacity: 512KiB
capabilities: internal write-through unified
*-cache:1
description: L1 cache
physical id: 9
slot: CPU Internal L1
size: 128KiB
capacity: 128KiB
capabilities: internal write-through data
*-cache:2
description: L3 cache
physical id: a
slot: CPU Internal L3
size: 3MiB
capacity: 3MiB
capabilities: internal write-back unified
*-memory
description: System Memory
physical id: b
slot: System board or motherboard
size: 4GiB
*-bank:0
description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns)
product: ASU1600S11-4G-EDEG
vendor: Kingston
physical id: 0
serial: [REMOVED]
slot: ChannelA-DIMM0
size: 4GiB
width: 64 bits
clock: 1600MHz (0.6ns)
*-bank:1
description: DIMM [empty]
product: [Empty]
vendor: [Empty]
physical id: 1
serial: [REMOVED]
slot: ChannelA-DIMM1
*-bank:2
description: DIMM [empty]
product: [Empty]
vendor: [Empty]
physical id: 2
serial: [REMOVED]
slot: ChannelB-DIMM0
*-bank:3
description: DIMM [empty]
product: [Empty]
vendor: [Empty]
physical id: 3
serial: [REMOVED]
slot: ChannelB-DIMM1
*-cpu
description: CPU
product: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
vendor: Intel Corp.
physical id: c
bus info: cpu@0
version: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
slot: SOCKET 0
size: 1200MHz
capacity: 3800MHz
width: 64 bits
clock: 100MHz
capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms cpufreq
configuration: cores=2 enabledcores=2 threads=4
*-pci
description: Host bridge
product: 3rd Gen Core processor DRAM Controller
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 09
width: 32 bits
clock: 33MHz
*-display
description: VGA compatible controller
product: 3rd Gen Core processor Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:45 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64)
*-usb:0
description: USB controller
product: 7 Series/C210 Series Chipset Family USB xHCI Host Controller
vendor: Intel Corporation
physical id: 14
bus info: pci@0000:00:14.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pm msi xhci bus_master cap_list
configuration: driver=xhci_hcd latency=0
resources: irq:40 memory:f7e00000-f7e0ffff
*-communication
description: Communication controller
product: 7 Series/C210 Series Chipset Family MEI Controller #1
vendor: Intel Corporation
physical id: 16
bus info: pci@0000:00:16.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=mei_me latency=0
resources: irq:44 memory:f7e1a000-f7e1a00f
*-usb:1
description: USB controller
product: 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2
vendor: Intel Corporation
physical id: 1a
bus info: pci@0000:00:1a.0
version: 04
width: 32 bits
clock: 33MHz
capabilities: pm debug ehci bus_master cap_list
configuration: driver=ehci-pci latency=0
resources: irq:16 memory:f7e18000-f7e183ff
*-multimedia
description: Audio device
product: 7 Series/C210 Series Chipset Family High Definition Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=snd_hda_intel latency=0
resources: irq:46 memory:f7e10000-f7e13fff
*-pci:0
description: PCI bridge
product: 7 Series/C210 Series Chipset Family PCI Express Root Port 1
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: c4
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:16
*-pci:1
description: PCI bridge
product: 7 Series/C210 Series Chipset Family PCI Express Root Port 2
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: c4
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:17 memory:f7d00000-f7dfffff
*-network
description: Wireless interface
product: AR9485 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: [REMOVED]
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.13.0-30-generic firmware=N/A ip=[REMOVED] latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:17 memory:f7d00000-f7d7ffff memory:f7d80000-f7d8ffff
*-pci:2
description: PCI bridge
product: 7 Series/C210 Series Chipset Family PCI Express Root Port 4
vendor: Intel Corporation
physical id: 1c.3
bus info: pci@0000:00:1c.3
version: c4
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:19 ioport:e000(size=4096) memory:f7c00000-f7cfffff ioport:f0000000(size=1048576)
*-generic
description: Unassigned class
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
version: 01
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list
configuration: driver=rtsx_pci latency=0
resources: irq:41 memory:f7c00000-f7c0ffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0.2
bus info: pci@0000:03:00.2
logical name: eth0
version: 0a
serial: [REMOVED]
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-1_0.0.3 06/18/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:42 ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
*-usb:2
description: USB controller
product: 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1
vendor: Intel Corporation
physical id: 1d
bus info: pci@0000:00:1d.0
version: 04
width: 32 bits
clock: 33MHz
capabilities: pm debug ehci bus_master cap_list
configuration: driver=ehci-pci latency=0
resources: irq:23 memory:f7e17000-f7e173ff
*-isa
description: ISA bridge
product: HM76 Express Chipset LPC Controller
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 04
width: 32 bits
clock: 33MHz
capabilities: isa bus_master cap_list
configuration: driver=lpc_ich latency=0
resources: irq:0
*-storage
description: SATA controller
product: 7 Series Chipset Family 6-port SATA Controller [AHCI mode]
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
version: 04
width: 32 bits
clock: 66MHz
capabilities: storage msi pm ahci_1.0 bus_master cap_list
configuration: driver=ahci latency=0
resources: irq:43 ioport:f0b0(size=8) ioport:f0a0(size=4) ioport:f090(size=8) ioport:f080(size=4) ioport:f060(size=32) memory:f7e16000-f7e167ff
*-serial UNCLAIMED
description: SMBus
product: 7 Series/C210 Series Chipset Family SMBus Controller
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 04
width: 64 bits
clock: 33MHz
configuration: latency=0
resources: memory:f7e15000-f7e150ff ioport:f040(size=32)
*-scsi:0
physical id: 1
logical name: scsi0
capabilities: emulated
*-disk
description: ATA Disk
product: KINGSTON SH103S3
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 526A
serial: [REMOVED]
size: 111GiB (120GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=d8069d3f-80ce-456e-8392-d8aa875ac53c sectorsize=512
*-volume:0
description: Linux swap volume
vendor: Linux
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
version: 1
serial: [REMOVED]
size: 3904MiB
capacity: 3904MiB
capabilities: nofs swap initialized
configuration: filesystem=swap pagesize=4095
*-volume:1
description: BIOS Boot partition
vendor: EFI
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
serial: [REMOVED]
capacity: 1023KiB
capabilities: nofs
*-volume:2
description: EXT4 volume
vendor: Linux
physical id: 3
bus info: scsi@0:0.0.0,3
logical name: /dev/sda3
logical name: /
version: 1.0
serial: [REMOVED]
size: 97GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
configuration: created=2014-05-21 14:41:15 filesystem=ext4 lastmountpoint=/ modified=2014-07-15 13:03:38 mount.fstype=ext4 mount.options=rw,noatime,errors=remount-ro,data=ordered mounted=2014-07-15 13:03:38 state=mounted
*-volume:3
description: Windows FAT volume
vendor: mkfs.fat
physical id: 4
bus info: scsi@0:0.0.0,4
logical name: /dev/sda4
logical name: /boot/efi
version: FAT32
serial: [REMOVED]
size: 198MiB
capacity: 209MiB
capabilities: boot fat initialized
configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.options=rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro state=mounted
*-scsi:1
physical id: 2
logical name: scsi2
capabilities: emulated
*-cdrom
description: DVD-RAM writer
product: CDDVDW SN-208BB
vendor: TSSTcorp
physical id: 0.0.0
bus info: scsi@2:0.0.0
logical name: /dev/cdrom
logical name: /dev/sr0
version: AS02
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=nodisc
答案1
你可以在权力中找到它
=> 显示电池状态 => 目前
如果这不起作用请尝试
重新安装指示器电源
sudo apt-get purge indicator-power
sudo apt-get install indicator-power
如果你有配置编辑器
com => appmenu => power => 右键点击 =>
如果你没有则显示
别的
sudo apt-get install dconf-editor
重新开始
答案2
您是否尝试将图标设置为“始终开启”?请参阅这里。
如果您知道要手动运行什么才能恢复图标,则可以编写一个脚本,在设备恢复时调用该脚本。我运行 Xubuntu,因此对我来说有一个 xfce-power-manager。也许对您来说它是 gnome-power-manager?
如果这样可以恢复图标,那么类似这样的脚本/etc/pm/sleep.d/11_power
可能会有所帮助。尝试以下操作:
case "${1}" in
resume|thaw)
gnome-power-manager
;;
esac
确保其可执行sudo chmod +x /etc/pm/sleep.d/11_power
答案3
在关机状态下安装电池时是否还插着电源?如果在首次打开电脑时电脑没有检测到电池,那么这几乎就是电池坏了。
答案4
转到“设置”>“电源”> 在“菜单栏中显示电池状态”下,确保将其设置为“当有电池时”