The weird battery behavior I have been seeing in Qubes 4.0.4 only occurs after the first suspend, and seems related to all ACPI events no longer occuring. If I reboot, everything works fine. For example:
- From a powered down state, power on.
- xfce4-power-manager and upowerd all handle un/plugging the charger properly. The battery percentage seems to make sense. The
Fn+F5andFn+F6keys work properly to change the screen brightness. - Close the laptop lid which triggers a suspend.
- Open the laptop lid. The laptop stays suspended. Press the power button, the laptop resumes from suspend to the login screen.
- Notice that xfce4-power-manager and upowerd no longer handle un/plugging the charger properly. The
Fn+F5andFn+F6keys no longer work. - Reboot, back to behavior at #1.
I’m wondering if this is a problem with the embedded controller. I don’t know if getting the librem-ec-acpi-dkms driver installed would resolve this problem. I gave it a go but ran into problems trying to get it built for Fedora-25 (what dom0 is using).
Related output from journalctl -b | grep --ignore-case "acpi":
### System boot
Jun 29 18:16:57 dom0 kernel: ACPI: Early table checksum verification disabled
Jun 29 18:16:57 dom0 kernel: ACPI: RSDP 0x00000000000F0000 000024 (v02 COREv4)
Jun 29 18:16:57 dom0 kernel: ACPI: XSDT 0x0000000099B510E0 000064 (v01 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: FACP 0x0000000099B54B80 000114 (v06 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: DSDT 0x0000000099B51280 0038FE (v02 COREv4 COREBOOT 20110725 INTL 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: FACS 0x0000000099B51240 000040
Jun 29 18:16:57 dom0 kernel: ACPI: FACS 0x0000000099B51240 000040
Jun 29 18:16:57 dom0 kernel: ACPI: SSDT 0x0000000099B54CA0 002130 (v02 COREv4 COREBOOT 0000002A CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: MCFG 0x0000000099B56DD0 00003C (v01 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: TCPA 0x0000000099B56E10 000032 (v02 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: LPIT 0x0000000099B56E50 000094 (v00 COREv4 COREBOOT 0000002A CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: APIC 0x0000000099B56EF0 0000B2 (v03 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: RMAD 0x0000000099B56FB0 000088 (v01 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: HPET 0x0000000099B57040 000038 (v01 COREv4 COREBOOT 00000000 CORE 20200925)
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving FACP table memory at [mem 0x99b54b80-0x99b54c93]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving DSDT table memory at [mem 0x99b51280-0x99b54b7d]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving FACS table memory at [mem 0x99b51240-0x99b5127f]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving FACS table memory at [mem 0x99b51240-0x99b5127f]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving SSDT table memory at [mem 0x99b54ca0-0x99b56dcf]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving MCFG table memory at [mem 0x99b56dd0-0x99b56e0b]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving TCPA table memory at [mem 0x99b56e10-0x99b56e41]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving LPIT table memory at [mem 0x99b56e50-0x99b56ee3]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving APIC table memory at [mem 0x99b56ef0-0x99b56fa1]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving RMAD table memory at [mem 0x99b56fb0-0x99b57037]
Jun 29 18:16:57 dom0 kernel: ACPI: Reserving HPET table memory at [mem 0x99b57040-0x99b57077]
Jun 29 18:16:57 dom0 kernel: ACPI: Local APIC address 0xfee00000
Jun 29 18:16:57 dom0 kernel: ACPI: PM-Timer IO Port: 0x1808
Jun 29 18:16:57 dom0 kernel: ACPI: Local APIC address 0xfee00000
Jun 29 18:16:57 dom0 kernel: ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
Jun 29 18:16:57 dom0 kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
Jun 29 18:16:57 dom0 kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
Jun 29 18:16:57 dom0 kernel: ACPI: IRQ0 used by override.
Jun 29 18:16:57 dom0 kernel: ACPI: IRQ9 used by override.
Jun 29 18:16:57 dom0 kernel: Using ACPI (MADT) for SMP configuration information
Jun 29 18:16:57 dom0 kernel: ACPI: HPET id: 0x8086a701 base: 0xfed00000
Jun 29 18:16:57 dom0 kernel: ACPI: Core revision 20190816
Jun 29 18:16:57 dom0 kernel: ACPI: bus type PCI registered
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Module Device)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Processor Device)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(3.0 _SCP Extensions)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Processor Aggregator Device)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Linux-Dell-Video)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
Jun 29 18:16:57 dom0 kernel: ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
Jun 29 18:16:57 dom0 kernel: ACPI: 2 ACPI AML tables successfully acquired and loaded
Jun 29 18:16:57 dom0 kernel: ACPI: EC: EC started
Jun 29 18:16:57 dom0 kernel: ACPI: EC: interrupt blocked
Jun 29 18:16:57 dom0 kernel: ACPI: \_SB_.PCI0.LPCB.EC0_: Used as first EC
Jun 29 18:16:57 dom0 kernel: ACPI: \_SB_.PCI0.LPCB.EC0_: GPE=0x50, EC_CMD/EC_SC=0x66, EC_DATA=0x62
Jun 29 18:16:57 dom0 kernel: ACPI: \_SB_.PCI0.LPCB.EC0_: Boot DSDT EC used to handle transactions
Jun 29 18:16:57 dom0 kernel: ACPI: Interpreter enabled
Jun 29 18:16:57 dom0 kernel: ACPI: (supports S0 S3 S5)
Jun 29 18:16:57 dom0 kernel: ACPI: Using IOAPIC for interrupt routing
Jun 29 18:16:57 dom0 kernel: PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
Jun 29 18:16:57 dom0 kernel: PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
Jun 29 18:16:57 dom0 kernel: ACPI: Enabled 1 GPEs in block 00 to 7F
Jun 29 18:16:57 dom0 kernel: ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
Jun 29 18:16:57 dom0 kernel: acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
Jun 29 18:16:57 dom0 kernel: acpi PNP0A08:00: _OSC: OS now controls [PME AER PCIeCapability LTR]
Jun 29 18:16:57 dom0 kernel: ACPI: EC: interrupt unblocked
Jun 29 18:16:57 dom0 kernel: ACPI: EC: event unblocked
Jun 29 18:16:57 dom0 kernel: ACPI: \_SB_.PCI0.LPCB.EC0_: GPE=0x50, EC_CMD/EC_SC=0x66, EC_DATA=0x62
Jun 29 18:16:57 dom0 kernel: ACPI: \_SB_.PCI0.LPCB.EC0_: Boot DSDT EC used to handle transactions and events
Jun 29 18:16:57 dom0 kernel: ACPI: bus type USB registered
Jun 29 18:16:57 dom0 kernel: PCI: Using ACPI for IRQ routing
Jun 29 18:16:57 dom0 kernel: pnp: PnP ACPI init
Jun 29 18:16:57 dom0 kernel: system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
Jun 29 18:16:57 dom0 kernel: system 00:01: Plug and Play ACPI device, IDs PNP0103 PNP0c01 (active)
Jun 29 18:16:57 dom0 kernel: system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active)
Jun 29 18:16:57 dom0 kernel: pnp 00:03: Plug and Play ACPI device, IDs PNP0b00 (active)
Jun 29 18:16:57 dom0 kernel: pnp 00:04: Plug and Play ACPI device, IDs PNP0303 PNP030b (active)
Jun 29 18:16:57 dom0 kernel: pnp 00:05: Plug and Play ACPI device, IDs PNP0f13 (active)
Jun 29 18:16:57 dom0 kernel: pnp 00:06: Plug and Play ACPI device, IDs PNP0c31 (active)
Jun 29 18:16:57 dom0 kernel: pnp: PnP ACPI: found 7 devices
Jun 29 18:16:57 dom0 kernel: ACPI: AC Adapter [AC] (on-line)
Jun 29 18:16:57 dom0 kernel: ACPI: Power Button [PWRB]
Jun 29 18:16:57 dom0 kernel: ACPI: Sleep Button [SLPB]
Jun 29 18:16:57 dom0 kernel: ACPI: Lid Switch [LID0]
Jun 29 18:16:57 dom0 kernel: ACPI: Power Button [PWRF]
Jun 29 18:16:57 dom0 kernel: hpet_acpi_add: no address or irqs in _CRS
Jun 29 18:16:57 dom0 kernel: battery: ACPI: Battery Slot [BAT0] (battery present)
Jun 29 18:16:59 dom0 kernel: ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
Jun 29 18:16:59 dom0 kernel: acpi device:03: registered as cooling_device6
### Suspend via lid close
Jun 29 18:17:20 dom0 kernel: xen_acpi_processor: Uploading Xen processor PM info
Jun 29 18:17:20 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU1
Jun 29 18:17:20 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU3
Jun 29 18:17:20 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU5
Jun 29 18:17:20 dom0 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-backlight@backlight:acpi_video0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 29 18:17:20 dom0 systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Jun 29 18:17:20 dom0 systemd[1]: Started Load/Save Screen Backlight Brightness of backlight:acpi_video0.
### Resume via lid open and power button press
Jun 29 18:23:21 dom0 kernel: ACPI: EC: interrupt blocked
Jun 29 18:23:21 dom0 kernel: ACPI: Preparing to enter system sleep state S3
Jun 29 18:23:21 dom0 kernel: ACPI: EC: event blocked
Jun 29 18:23:21 dom0 kernel: ACPI: EC: EC stopped
Jun 29 18:23:21 dom0 kernel: Modules linked in: loop ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter joydev snd_hda_codec_hdmi snd_soc_skl hid_multitouch snd_soc_hdac_hda snd_hda_ext_core snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_sst_dsp iTCO_wdt snd_soc_acpi_intel_match snd_soc_acpi iTCO_vendor_support snd_hda_codec_generic ledtrig_audio snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine ath9k snd_hda_intel snd_intel_nhlt ath9k_common snd_hda_codec ath9k_hw snd_hda_core snd_hwdep snd_seq mac80211 snd_seq_device x86_pkg_temp_thermal intel_powerclamp coretemp snd_pcm ath snd_timer cfg80211 snd rfkill intel_lpss_pci pcspkr intel_lpss r8169 i2c_i801 soundcore libarc4 idma64 int340x_thermal_zone intel_soc_dts_iosf pinctrl_cannonlake pinctrl_intel intel_hid sparse_keymap xen_acpi_processor xenfs ip_tables dm_thin_pool dm_persistent_data libcrc32c dm_bio_prison dm_crypt i915 nvme crct10dif_pclmul crc32_pclmul crc32c_intel i2c_algo_bit drm_kms_helper ghash_clmulni_intel xhci_pci drm
Jun 29 18:23:21 dom0 kernel: ACPI: Low-level resume complete
Jun 29 18:23:21 dom0 kernel: ACPI: EC: EC started
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: Uploading Xen processor PM info
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU1
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU1
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU3
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU3
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (CX): Hypervisor error (-14) for ACPI CPU5
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU5
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU7
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU9
Jun 29 18:23:21 dom0 kernel: xen_acpi_processor: (_PXX): Hypervisor error (-19) for ACPI CPU11
Jun 29 18:23:21 dom0 kernel: ACPI: Waking up from system sleep state S3
Jun 29 18:23:21 dom0 kernel: ACPI: EC: interrupt unblocked
Jun 29 18:23:21 dom0 kernel: ACPI: EC: event unblocked
Related Arch Linux bug (0 and 1) describing the same behavior, root cause was a problem with the proprietary Samsung embedded controller: “The problem is that Samsung’s embedded controller stops sending GPE events if it still is waiting for previous GPE events to be queried from it.”