I've had an HP EliteBook 8740w for about 2 years, running various releases of Ubuntu. I'm currently running 12.04, and just noticed that Ubuntu won't run (for more than a few minutes) on batteries. The laptop is normally in a dock, on AC power. I recently took it on the road, and the system would log me off without warning. Today I did a test, and got it to log me off several times on battery (session never lasted more than 2 minutes without a crash). The same test on AC showed no reboots.

I looked through syslog and matched up the logoffs, and while I don't see it every time, most of them generate something like:
kernel: [  820.887144] pcieport 0000:00:03.0: AER: Multiple Uncorrected (Non-Fatal) error received: id=0018
kernel: [  820.887159] pcieport 0000:00:03.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, id=0018(Requester ID)
kernel: [  820.887166] pcieport 0000:00:03.0:   device [8086:d138] error status/mask=00004000/00000000
kernel: [  820.887173] pcieport 0000:00:03.0:    [14] Completion Timeout     (First)
kernel: [  820.887180] pcieport 0000:00:03.0: broadcast error_detected message
kernel: [  820.887184] pcieport 0000:00:03.0: broadcast mmio_enabled message
kernel: [  820.887187] pcieport 0000:00:03.0: broadcast resume message
kernel: [  820.887191] pcieport 0000:00:03.0: AER driver successfully recovered
gnome-session[4967]: Gdk-WARNING: gnome-session: Fatal IO error 11 (Resource temporarily unavailable) on X server :3.#012
Does this look like something that would cause a sudden log-off? Any idea why it doesn't happen on AC power?