Did you set up the power management to run that way? The default is that the system runs slower on battery, but that setting can be overridden at the UEFI level or under Windows.
Is Windows factory installed, or did you do the installation manually?
Thank you for your help, ejn63.
It came with Ubuntu factory installed, not Windows, but I installed a different version of Ubuntu manually. I think it uses legacy BIOS, not UEFI.
Hardware: If the system intermittently doesn't recognize the AC adapter, it's likely a connection problem at the jack (either the adapter plug or the jack itself).
Software: it's impossible to say whether you've properly installed the power management drivers. I'd check with the ubuntu community on that one.