diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-19 15:22:37 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-19 15:22:37 -0400 |
commit | 1b3a24268a6b3e030550a00c0ddfdcee37db56ff (patch) | |
tree | 54076649ef31a1fd9d3eb0ae5425e24d4808b507 /libLumina/LuminaOS-FreeBSD.cpp | |
parent | Add support to LuminaOS for checking/starting the system suspend functionality. (diff) | |
download | lumina-1b3a24268a6b3e030550a00c0ddfdcee37db56ff.tar.gz lumina-1b3a24268a6b3e030550a00c0ddfdcee37db56ff.tar.bz2 lumina-1b3a24268a6b3e030550a00c0ddfdcee37db56ff.zip |
Clean up the new suspend support in Lumina, and add it to the system "log out" menu as an option (if supported on that system).
Diffstat (limited to 'libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r-- | libLumina/LuminaOS-FreeBSD.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index e294cf25..c9874605 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -173,18 +173,18 @@ void LOS::systemRestart(){ //start reboot sequence //Check for suspend support bool LOS::systemCanSuspend(){ - //Check the supported CPU sleep states and ensure that S3 is listed - QStringList info = LUtils::getCmdOutput("sysctl -ae").filter("hw.acpi.supported_sleep_state="); - bool ok = false; - if(!info.isEmpty()){ - ok = info.first().section("=",1,1).split(" ").contains("S3"); + //This will only function on PC-BSD + //(permissions issues on standard FreeBSD unless setup a special way) + bool ok = QFile::exists("/usr/local/bin/pc-sysconfig"); + if(ok){ + ok = LUtils::getCmdOutput("pc-sysconfig systemcansuspend").join("").toLower().contains("true"); } return ok; } //Put the system into the suspend state void LOS::systemSuspend(){ - LUtils::runCmd("acpiconf -s 3"); + QProcess::startDetached("pc-sysconfig suspendsystem"); } //Battery Availability |