Bug 256402 - emulators/virtualbox-ose: Guest hw.acpi.battery.rate is accelrated 47-fold over host
Summary: emulators/virtualbox-ose: Guest hw.acpi.battery.rate is accelrated 47-fold ov...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Virtualbox Team (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-06-03 14:04 UTC by Jason W. Bacon
Modified: 2023-08-18 20:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (vbox)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2021-06-03 14:04:20 UTC
When running on a laptop host:

Host:    hw.acpi.battery.rate: 17946
Guest:   hw.acpi.battery.rate: 851050

This causes false warnings and possible automatic shutdown of the guest, depending on the battery monitor running.
Comment 1 Jason W. Bacon freebsd_committer freebsd_triage 2023-02-18 22:59:30 UTC
Still seeing this issue with 13.1-RELEASE and virtualbox-ose-6.1.36.

Tried changing kern.hz and kern.timecounter.hardware.  Neither had any effect.

Any suggestions appreciated.
Comment 2 Daniel Tameling 2023-02-25 15:35:59 UTC
I don't know whether this option is even available but check what you have set as Paravirtualization and try other options. This once fixed a time drift for me in a Linux guest on a Windows host.
Comment 3 Jason W. Bacon freebsd_committer freebsd_triage 2023-02-25 21:48:02 UTC
(In reply to Daniel Tameling from comment #2)

Thanks, no luck.  Tried every possible paravirtualization setting, as well as every other system setting.  None had any effect, except disabling I/O APIC, which caused a panic at boot.

For now I had to remove xfce-battery-plugin, which was shutting down the system as soon as I log into any GUI, since the plugin registered itself for autostart.  Lumina and LXQT were launching it as well.
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2023-02-25 21:49:36 UTC
(In reply to Jason W. Bacon from comment #3)

BTW, there is no clock drift.  It's just the batter rate that's off.
Comment 5 Jason W. Bacon freebsd_committer freebsd_triage 2023-02-26 00:41:53 UTC
More info:

I have verified that the problem occurs with FreeBSD 13.1-RELEASE and 13.2-BETA2 guests on a FreeBSD 13.1-RELEASE host, Lenovo T430, CPU specs below.

A Debian 11 guest on the same laptop works fine.

An identical FreeBSD 13.2-BETA2 guest on my Mac works fine under VirtualBox 7.

===

CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (2594.25-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306a9  Family=0x6  Model=0x3a  Stepping=9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features=0x281<FSGSBASE,SMEP,ERMS>
  Structured Extended Features3=0x9c000400<MD_CLEAR,IBPB,STIBP,L1DFL,SSBD>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)