diff options
author | Ken Moore <ken@ixsystems.com> | 2017-11-20 14:13:40 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-11-20 14:13:40 -0500 |
commit | 800a9c66b01b977dbb6fb365414fe3555fbadc2e (patch) | |
tree | e81dbd10db7277ef1eb437bb5d57f70cbdbed299 /src-qt5/core/libLumina | |
parent | Add a context menu "action" for settings the selected image files as the curr... (diff) | |
download | lumina-800a9c66b01b977dbb6fb365414fe3555fbadc2e.tar.gz lumina-800a9c66b01b977dbb6fb365414fe3555fbadc2e.tar.bz2 lumina-800a9c66b01b977dbb6fb365414fe3555fbadc2e.zip |
Cleanup some of the suspend-checking for FreeBSD.
Remove pc-sysconfig as an option for brightness control on FreeBSD
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index 4c801112..78fe5028 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -117,12 +117,12 @@ void LOS::setScreenBrightness(int percent){ bool success = false; // - try hardware setting first (TrueOS || or intel_backlight) bool remoteSession = !QString(getenv("PICO_CLIENT_LOGIN")).isEmpty(); - if( LUtils::isValidBinary("pc-sysconfig") && !remoteSession){ + /*if( LUtils::isValidBinary("pc-sysconfig") && !remoteSession){ //Use TrueOS tool (direct sysctl control) QString ret = LUtils::getCmdOutput("pc-sysconfig", QStringList() <<"setscreenbrightness "+QString::number(percent)).join(""); success = ret.toLower().contains("success"); qDebug() << "Set hardware brightness:" << percent << success; - } + }*/ if( !success && LUtils::isValidBinary("intel_backlight") && !remoteSession){ //Use the intel_backlight utility (only for Intel mobo/hardware?) if(0== LUtils::runCmd("intel_backlight", QStringList() <<QString::number(percent)) ){ @@ -271,8 +271,8 @@ void LOS::systemRestart(bool skipupdates){ //start reboot sequence //Check for suspend support bool LOS::systemCanSuspend(){ - QString state = LUtils::getCmdOutput("sysctl hw.acpi.suspend_state").join("").simplified(); - bool ok = LUtils::getCmdOutput("sysctl hw.acpi.supported_sleep_state").join("").split(" ",QString::SkipEmptyParts).contains(state); + QString state = LUtils::getCmdOutput("sysctl -n hw.acpi.suspend_state").join("").simplified(); + bool ok = LUtils::getCmdOutput("sysctl -n hw.acpi.supported_sleep_state").join("").split(" ",QString::SkipEmptyParts).contains(state); /*bool ok = QFile::exists("/usr/local/bin/pc-sysconfig"); if(ok){ ok = LUtils::getCmdOutput("pc-sysconfig systemcansuspend").join("").toLower().contains("true"); @@ -282,7 +282,7 @@ bool LOS::systemCanSuspend(){ //Put the system into the suspend state void LOS::systemSuspend(){ - QString state = LUtils::getCmdOutput("sysctl hw.acpi.suspend_state").join("").simplified(); + QString state = LUtils::getCmdOutput("sysctl -n hw.acpi.suspend_state").join("").simplified(); //QProcess::startDetached("pc-sysconfig suspendsystem"); QProcess::startDetached("acpiconf", QStringList() << "-s" << state ); } |