You have been subscribed to a public bug: When the laptop has been idle for more than the allotted "Automatic Suspend / On Battery Power" time period, and is then unplugged, it will instantly go to sleep, despite not being on battery power for that time period. Often my laptop comes unplugged as I'm picking it up, putting my laptop instantly to sleep just as I'm about to use it. (This will also cause an issue for someone picking up their laptop and intentionally unplugging it before moving to a new location to use it.) Because I am running intensive computational software which fails when the laptop goes to sleep, I often lose hours worth of work when I forget to use the touch pad or press a key before I pick up my laptop after setting it down for 15 minutes. As a workaround, I have had to disable automatic suspend altogether.
Proposed Solution: Treat the unplugging event as a user interaction and reset the "Automatic Suspend / On Battery Power" timer from that moment. ------------------------------------------ Ubuntu Release Info: Description: Ubuntu 20.04.2 LTS Release: 20.04 Package Version: Not sure which package. I thought it was gnome-power-management, but `apt-cache policy gnome-power-management` doesn't recognize the package. What I expect to happen: Laptop does not go to sleep instantly when it comes unplugged as I'm picking it up. What happened instead: Laptop sleeps immediately when it comes unplugged, despite a full battery. Laptop works fine and runs for hours on battery power after being woken up again, proving this is not a battery issue. ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: gnome-power-manager 3.32.0-2 ProcVersionSignature: Ubuntu 5.4.0-66.74-generic 5.4.86 Uname: Linux 5.4.0-66-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.20.11-0ubuntu27.16 Architecture: amd64 CasperMD5CheckResult: skip CurrentDesktop: ubuntu:GNOME Date: Sun Feb 28 14:04:57 2021 InstallationDate: Installed on 2019-03-03 (727 days ago) InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210) SourcePackage: gnome-power-manager UpgradeStatus: Upgraded to focal on 2020-10-10 (141 days ago) ** Affects: gnome-power-manager (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug focal -- HIbernate timer starts from last activity instead of laptop unplug event https://bugs.launchpad.net/bugs/1917250 You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-power-manager in Ubuntu. -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs