Solved Unable to wake up from Suspend after installing Uninterruptible Power Supply

Normally, I can wake up my desktop computer from suspend by simply tapping the power button, and then after one or two seconds I'm back at the Light DM login screen. This method for waking up my system worked very well for several months, but then starting this morning, whenever I hit the power button, the system does a complete reboot, and it is no longer waking up as it before.

The only new thing I've done to my system is that I've installed a new uninterruptible power supply (due to all of the heated related power failures in my area), so I'm wondering if it is possible that my new UPS is somehow interfering with the normal wake from suspend process, or is it likely something else?

Code:
Simon@Asus:~ $ sysctl hw.acpi.supported_sleep_state
hw.acpi.supported_sleep_state: S3 S4 S5
 
whenever I hit the power button, the system does a complete reboot
That sounds like it's been shutdown (i.e. turned off), not suspended.

I'm wondering if it is possible that my new UPS is somehow interfering
In general, no. One possibility is the UPS is running on battery (due to power loss) and when the battery is low, signalling the system to shutdown.

I'd check /var/log/messages to see what happened. If it's had a forced power down there should be a message, "Previous shutdown was unexpected." or something in that nature during boot up. If it's been "cleanly" shutdown it would have messages the system was shutting down, services being stopped, etc.
 
I can wake up my desktop computer from suspend by simply tapping the power button

Simon@Asus:~ $ sysctl hw.acpi.supported_sleep_state
hw.acpi.supported_sleep_state: S3 S4 S5
What does sysctl hw.acpi.power_button_state show?

To suspend/resume, it should show other than "S5" from the "supported_sleep_state" of your system. If this is not the case, the loader tunable can be set in /boot/loader.conf or /etc/sysctl.conf.

acpi(4)
Code:
     hw.acpi.supported_sleep_state
             Suspend states (S1–S5) supported by the BIOS.

             S1      Quick suspend to RAM.  The CPU enters a lower power
                     state, but most peripherals are left running.

             S2      Lower power state than S1, but with the same basic
                     characteristics.  Not supported by many systems.

             S3      Suspend to RAM.  Most devices are powered off, and the
                     system stops running except for memory refresh.

             S4      Suspend to disk.  All devices are powered off, and the
                     system stops running.  When resuming, the system starts
                     as if from a cold power on.  Not yet supported by FreeBSD
                     unless S4BIOS is available.

             S5      System shuts down cleanly and powers off.
 
Waking it by pressing the power button is a bit hit and miss, hold it in too long and you force power it off. Check your bios settings, probably under 'power management', for something like 'wake on usb' or 'wake on input device'. After enabling that, you should be able to wake it by hitting a key (eg, hit the shift key) or by moving the mouse, without needing to touch the power button. I think it's unlikely to be anything to do with the UPS.
 
Waking it by pressing the power button is a bit hit and miss, hold it in too long and you force power it off. Check your bios settings, probably under 'power management', for something like 'wake on usb' or 'wake on input device'. After enabling that, you should be able to wake it by hitting a key (eg, hit the shift key) or by moving the mouse, without needing to touch the power button. I think it's unlikely to be anything to do with the UPS.
Well, I usually only give the power button a very quick tap, and the wake from suspend would generally work fine under Windows 10, Ubuntu, and also under FreeBSD. Although I'm now only running FreeBSD, and no other operating systems are currently installed on my system. Also, I made some changes to rc.conf, sysctl.conf, and 60-xfce.rules and now the problem has gone away, and I can consistently wake my PC up from suspend by quickly hitting the power button. Just like before I added the UPS to the system.
 
It took me a few days of trial and error, but I was eventually able to restore the wake up function to my power button by making the below changes. Now my wake up function seems to working exactly the same as it did before I added the UPS.

Code:
====================================================
Below lines added to /etc/rc.conf:

kld_list="nvidia-modeset nvidia-drm cuse fusefs"

nvidia_suspend_enable="YES"
====================================================

Below line added to /etc/sysctl.conf:

hw.nvidia.registry.EnableMSI=1
====================================================

created the file /usr/local/etc/polkit-1/rules.d/60-xfce.rules and added the below lines to it:

polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.consolekit.system.restart" ||
         action.id == "org.freedesktop.consolekit.system.stop") &&
        subject.isInGroup("operator")) {
        return polkit.Result.YES;
    }
});
================================================================
 
That sounds like it's been shutdown (i.e. turned off), not suspended.


In general, no. One possibility is the UPS is running on battery (due to power loss) and when the battery is low, signalling the system to shutdown.

I'd check /var/log/messages to see what happened. If it's had a forced power down there should be a message, "Previous shutdown was unexpected." or something in that nature during boot up. If it's been "cleanly" shutdown it would have messages the system was shutting down, services being stopped, etc.
I don't see anything mentioning "unexpected" within my messages, and the only thing I could find was the below line which seems to mention a normal shutdown.

Code:
Jul  7 18:53:36 Asus shutdown[13386]: reboot by root:

However, now that I think about it, I think that I did delete the contents of /var/log/messages several times during my amateurish troubleshooting process, so I probably deleted any messages related to unexpected shutdowns. At any rate, it seems to be working for the time being.
 
Back
Top