SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm not a particularly big fan of KDE or Xfce (no disrespect, just my taste), so I usually end up with Openbox (or similar). This serves me well on a workstation (for the most part), but on a laptop for work and daily use this is lacking. I need a power manager that takes care of my computer, but I don't want to include/install KDE or Xfce, so I started making my own power manager.
I have been working on the first stable release for a while now, and have come to a point where I'm satisfied with the features and stability. So, without further adieu I introduce powerkit 1.0.0 RC1.
powerkit is a lightweight full featured power manager for Slackware, for use with alternative desktop environments and window managers, like Fluxbox, Blackbox, FVWM, WindowMaker, Openbox, Lumina and others.
* Enables applications to inhibit the screen saver (org.freedesktop.ScreenSaver)
* Enables applications to inhibit suspend actions (org.freedesktop.PowerManagement)
* (Hybrid)Sleep/Hibernate/Shutdown/Lock screen on lid action
* Inhibit lid action if external monitor(s) is connected
* Automatically suspend ((hybrid)sleep/hibernate)
* Hibernate/Shutdown on critical battery
* Simple configuration GUI
* XScreenSaver support
* Backlight support
Basically it implements the "fancy" (power) features that exists in KDE/Xfce, but for any WM/DE, with minimal requirements (within reason).
I hope this application/project will be useful for Slackware and it's users. Remember to read the documentation before usage (https://github.com/rodlie/powerkit/b...ster/README.md). Report any issues in this thread or on Github/Gitlab, all feedback is appreciated.
Sounds interesting. I will give it a try. I also use Openbox and have created some scripts for power management, which serve me well, but I am always willing to test new stuff. Thanks for sharing! (And this is clearly more complete than my scripts, anyway.)
Last edited by montagdude; 10-25-2018 at 05:51 PM.
I started out with scripts too, but after a while I wanted/needed features that wasn't feasible to do with scripts, so here we are. I hope you like the application (if not tell me why, and maybe I can improve something).
Nice, I'll give this a spin on my -current with Fluxbox (its running with xfce-power-manager currently but I found it rather clunky in some parts.) Thanks!
I rebuilt it from source with debug flags. Here is the backtrace for the segfault:
Code:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5f5b580 in QVariant::QVariant(QVariant const&) () from /usr/lib64/qt/lib/libQtCore.so.4
(gdb) bt
#0 0x00007ffff5f5b580 in QVariant::QVariant(QVariant const&) ()
at /usr/lib64/qt/lib/libQtCore.so.4
#1 0x00007ffff7248da8 in QDBusPendingReplyData::argumentAt(int) const ()
at /usr/lib64/qt/lib/libQtDBus.so.4
#2 0x00007ffff7bcabdd in QDBusPendingReply<QString, void, void, void, void, void, void, void>::argumentAt<0>() const (this=0x7fffffffd7d8) at /usr/lib64/qt/include/QtDBus/qdbuspendingreply.h:176
#3 0x00007ffff7bc9a99 in QDBusPendingReply<QString, void, void, void, void, void, void, void>::value() const (this=0x7fffffffd7d8) at /usr/lib64/qt/include/QtDBus/qdbuspendingreply.h:181
#4 0x00007ffff7bc5ef0 in PowerKit::find() (this=0x6e5660) at powerkit.cpp:177
#5 0x00007ffff7bc745c in PowerKit::scan() (this=0x6e5660) at powerkit.cpp:283
#6 0x00007ffff7bc6fbc in PowerKit::setup() (this=0x6e5660) at powerkit.cpp:268
#7 0x00007ffff7bc4a8d in PowerKit::PowerKit(QObject*) (this=0x6e5660, parent=0x7fffffffdd20)
at powerkit.cpp:26
#8 0x000000000040d5fe in ()
#9 0x000000000040c89e in ()
#10 0x00007ffff4f487d0 in __libc_start_main () at /lib64/libc.so.6
#11 0x000000000040c429 in ()
Also, this is kind of strange, but when I built it from source (using your SlackBuild) with CONFIG+=debug and CFLAGS="-g -fPIC", I initially got an error loading the libPowerkit.so shared library. It seems it did not get installed properly. After manually installing it in /usr/lib64, I get this segfault. The strange thing is that it did not complain about the shared library when using the package you provided or when building it with CONFIG+=release and CFLAGS="-O2 -fPIC", even though as far as I can tell, libPowerkit.so was not installed then either.
I should note that I have a bit of a frankensystem right now, because awhile ago I was using Dlackware with systemd, then I removed Gnome, but I still have systemd because I haven't taken the time to do a proper reinstall yet. These issues don't seem related to that, but there's always a chance.
Last edited by montagdude; 10-26-2018 at 08:18 AM.
Hmm, will look into this. Note that the library is built static on release (you an override with CONFIG+=install_lib), in debug the library is shared (for ease of development).
systemd could be a problem (I only test/support consolekit+upower on Slackware). The application checks for logind first, then consolekit, then upower. Does the logind D-Bus service work on your installation?
I have tested powerkit on slackware(64) 14.2 (consolekit+upower0.9), FreeBSD 11.2 (consolekit+upower0.9) and Ubuntu 18.04 (logind+upower0.99).
@montagdude: The segfault has been fixed (in git 1.0/master), but there is something strange with your setup since powerkit can't get a proper response from upower. Could you list the installed version of systemd/logind/consolekit/upower so I can try to replicate this issue?
@montagdude: The segfault has been fixed (in git 1.0/master), but there is something strange with your setup since powerkit can't get a proper response from upower. Could you list the installed version of systemd/logind/consolekit/upower so I can try to replicate this issue?
I have systemd 231 and upower 0.9.23. However, I'm not sure if upower is working correctly with Dlackware systemd (or if it is even supposed to).
Ok, systemd/logind requires upower 0.99.x to my knowledge. But upower should still work (but some features may not work). I will try to setup a installation with systemd (any SlackBuilds available?) and upower 0.9.x and see if I can do some workarounds.
Ok, systemd/logind requires upower 0.99.x to my knowledge. But upower should still work (but some features may not work). I will try to setup a installation with systemd (any SlackBuilds available?) and upower 0.9.x and see if I can do some workarounds.
Okay, but don't spend too much time on that just on my account, seeing I have an unsupported frankensystem and I'm planning to reinstall Slackware proper eventually anyway.
This looks interesting, but I normally use desktop environments like Cinnamon and XFCE so I don't have a direct need for it and have not tested it since I don't have any alternative WM's installed.
HOWEVER, if it can suspend to RAM after a predetermined time of system inactivity while running within any DE/WM on a desktop PC, say like how a screensaver runs after a given amount of time, I could totally have a use for it. (and totally would be using it)
I find that this feature is lacking in any (of the few) Linux distros that I have tried, and is the only thing that is keeping me from completely ditching Windows for good is because I like my HTPC to suspend after not using it for say, 15 minutes.
SO, does your program have this feature, or could it be easily implemented?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.