this implements the suspend/hibernate buttons within the shutdown dialog in kde (as in kubuntu).
Created attachment 132694 [details, diff] display suspend/resume buttons (from kubuntu)
Created attachment 132695 [details, diff] patch to ksmserver configure to make the kubuntu patch work with kde split ebuilds on gentoo
Created attachment 132696 [details] updated ksmserver ebuild
Created attachment 132697 [details] ksmserver-3.5.7_suspend_hibernate.tar.bz2 (ebuild + both patches)
to make use of this emerge with USE=dbus hal if you don't see any icons next to the suspend/hibernate buttons, make sure you use an icon set that provides the files suspend.png and hibernate.png.
Sorry but this is not a proper place for such requests. If you want such feature, then ask upstream to integrate it - http://bugs.kde.org/
(In reply to comment #6) > Sorry but this is not a proper place for such requests. Probably some other people are also interested in this feature, so I think its ok to have a working ebuild in the bugzilla. > If you want such > feature, then ask upstream to integrate it - http://bugs.kde.org/ done that: http://bugs.kde.org/show_bug.cgi?id=150532
Jakub is right but Upstream is unlikely to implement this in 3.5.8 which will be tagged tomorrow. 3.5.8 is supposed to be the last 3.5 release, though, and I'm interested in this. Re-opening.
(In reply to comment #8) > "..Upstream is unlikely to implement this in 3.5.8.." Unfortunately. From the kde bugzilla: "KDE3.5.x is feature-frozen, and KDE4 will use Solid, therefore this patch cannot go to mainline, sorry. I'll keep this open as a general wish for KDE4." Since kde 3.5 will most likely not change that much in the future, this patch should be easy to maintain out of the tree.
(In reply to comment #9) > Since kde 3.5 will most likely not change that much in the future, this patch > should be easy to maintain out of the tree. As I said, I want this feature, too, and will add the patch when I have the time to clean it up a little. Don't hold your breath but I'll get to it. :-)
Created attachment 146428 [details] ksmserver-3.5.8 with suspend/resume buttons updated ebuild
the suse guys are doing something quite similar but use a different patch. i am not sure if i should upload the patches here, so i just provide an url to the source rpm: http://suse.inode.at/opensuse/distribution/10.3/repo/src-oss/suse/src/kdebase3-3.5.7-87.src.rpm the file name is "ksmserver-suspend.diff". they do also add tooltips to the buttons (filename "ksmserver-tooltips.diff") - i didnt give it a try but it could be nice.
Created attachment 146469 [details] ksmserver-3.5.8 with suspend/resume buttons (and hal check) i stumbled across an error with hal-0.5.10 and a missing laptop use flag (suspend/hibernate wont work then). i added a check to the ebuild.
fyi hal-0.5.10 only supports pm-utils (see /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux) which breaks uswusp
if you use uswsusp or tuxonice you have to use the current git version of pm-utils to make it work again. see http://bugs.gentoo.org/show_bug.cgi?id=214329
Created attachment 154045 [details, diff] display suspend/resume buttons
Created attachment 154047 [details, diff] configure should handle --with-hal and --with-dbus
Created attachment 154049 [details] ksmserver-3.5.9 with suspend/resume buttons (and hal check)
Created attachment 154051 [details, diff] changes made to ksmserver-3.5.9 ebuild
sys-apps/hal-0.5.11-r1 does only provide "power_management.can_suspend" and "power_management.can_hibernate", so you might want to fix this in "ksmserver-3.5.9-ksmserver_suspend.diff". Besides that the patches work wonderfully. A note to newbies: You can configure some options in ~/.kde/share/config/power-managerrc. You can add options like: disableSuspend=0 disableHibernate=0 lockOnResume=1
(In reply to comment #20) > sys-apps/hal-0.5.11-r1 does only provide "power_management.can_suspend" and > "power_management.can_hibernate", so you might want to fix this in > "ksmserver-3.5.9-ksmserver_suspend.diff". power_management.can_suspend_to_ram and power_management.can_suspend_to_disk are actually deprecated and were removed from hal. i will update the ksmserver patch. thank you for the feedback!
Created attachment 165845 [details, diff] display suspend/resume buttons use can_suspend and can_hibernate instead of can_suspend_to_ram and can_suspend_to_disk
Hi Robert, I'm using TuxOnIce to suspend to disk which consists of the TuxOnIce kernel patch and the "hibernate" script (sys-power/hibernate-script). In order to Suspend-To-Ram or Suspend-To-Disk one has to execute "hibernate-ram" or "hibernate-disk" on the command line which takes care of all the userspace stuff before starting tuxonice to write the image to disk and suspend and it reactivates everything on a resume. Would it be possible to extend the ksmserver patch (maybe via ebuild use flag or configuration option) to also support the hibernate-script instead of suspending through hal which didn't work on my system? This would be really great, cause I found no other way to add the hibernate/shutdown options in kdm with tuxonice. I would do it myself if I could program in C but unfortunately I'm a perl addict. Thanks in advance for any work on this. You could e-mail me if you want me to test something out. Best regards, Marc
(In reply to comment #23) > Would it be possible to extend the ksmserver patch (maybe via ebuild use flag > or configuration option) to also support the hibernate-script instead of > suspending through hal which didn't work on my system? I just read your comment. Sorry for being that late, Marc! In the meantime I went away from Gentoo on my workstation (and use kde4), so I am not using the patch anymore. Answering your question: One probably just has to change KSMShutdownDlg::slotSuspend and KSMShutdownDlg::slotHibernate to execute the TuxOnIce binaries, but I would suggest to rewrite the whole patch then because the whole dbus/hal stuff would not be needed.
KDE3 is on its way out and KDE4 includes this option, so I'm closing as WONTFIX.