Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194873 - kde suspend/hibernate buttons in shutdown dialog (kubuntu ksmserver patch)
Summary: kde suspend/hibernate buttons in shutdown dialog (kubuntu ksmserver patch)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-06 02:17 UTC by Robert A.
Modified: 2009-10-30 11:16 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
display suspend/resume buttons (from kubuntu) (kubuntu_76_ksmserver_suspend.diff,9.03 KB, patch)
2007-10-06 02:19 UTC, Robert A.
Details | Diff
patch to ksmserver configure to make the kubuntu patch work with kde split ebuilds on gentoo (ksmserver_suspend_configure.diff,3.74 KB, patch)
2007-10-06 02:20 UTC, Robert A.
Details | Diff
updated ksmserver ebuild (ksmserver-3.5.7.ebuild,1.03 KB, text/plain)
2007-10-06 02:20 UTC, Robert A.
Details
ksmserver-3.5.7_suspend_hibernate.tar.bz2 (ebuild + both patches) (ksmserver-3.5.7_suspend_hibernate.tar.bz2,5.61 KB, application/octet-stream)
2007-10-06 02:23 UTC, Robert A.
Details
ksmserver-3.5.8 with suspend/resume buttons (ksmserver-3.5.8-r1.ebuild,1.12 KB, text/plain)
2008-03-17 23:45 UTC, Robert A.
Details
ksmserver-3.5.8 with suspend/resume buttons (and hal check) (ksmserver-3.5.8-r1.ebuild,1.34 KB, text/plain)
2008-03-18 11:37 UTC, Robert A.
Details
display suspend/resume buttons (ksmserver-3.5.9-ksmserver_suspend.diff,9.03 KB, patch)
2008-05-23 11:02 UTC, Robert A.
Details | Diff
configure should handle --with-hal and --with-dbus (ksmserver-3.5.9-suspend_configure.diff,3.74 KB, patch)
2008-05-23 11:05 UTC, Robert A.
Details | Diff
ksmserver-3.5.9 with suspend/resume buttons (and hal check) (ksmserver-3.5.9.ebuild,1.25 KB, text/plain)
2008-05-23 11:06 UTC, Robert A.
Details
changes made to ksmserver-3.5.9 ebuild (ksmserver-3.5.9-suspend.ebuild.diff,1.44 KB, patch)
2008-05-23 11:09 UTC, Robert A.
Details | Diff
display suspend/resume buttons (ksmserver-3.5.9-ksmserver_suspend.diff,9.02 KB, patch)
2008-09-19 14:00 UTC, Robert A.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert A. 2007-10-06 02:17:53 UTC
this implements the suspend/hibernate buttons within the shutdown dialog in kde (as in kubuntu).
Comment 1 Robert A. 2007-10-06 02:19:13 UTC
Created attachment 132694 [details, diff]
display suspend/resume buttons (from kubuntu)
Comment 2 Robert A. 2007-10-06 02:20:06 UTC
Created attachment 132695 [details, diff]
patch to ksmserver configure to make the kubuntu patch work with kde split ebuilds on gentoo
Comment 3 Robert A. 2007-10-06 02:20:48 UTC
Created attachment 132696 [details]
updated ksmserver ebuild
Comment 4 Robert A. 2007-10-06 02:23:01 UTC
Created attachment 132697 [details]
ksmserver-3.5.7_suspend_hibernate.tar.bz2 (ebuild + both patches)
Comment 5 Robert A. 2007-10-06 02:25:26 UTC
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.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-10-06 07:29:00 UTC
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/
Comment 7 Robert A. 2007-10-06 09:58:38 UTC
(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

Comment 8 Wulf Krueger (RETIRED) gentoo-dev 2007-10-06 11:41:34 UTC
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.
Comment 9 Robert A. 2007-11-06 14:00:28 UTC
(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.

Comment 10 Wulf Krueger (RETIRED) gentoo-dev 2007-11-06 16:36:03 UTC
(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. :-)
Comment 11 Robert A. 2008-03-17 23:45:58 UTC
Created attachment 146428 [details]
ksmserver-3.5.8 with suspend/resume buttons

updated ebuild
Comment 12 Robert A. 2008-03-17 23:54:34 UTC
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.
Comment 13 Robert A. 2008-03-18 11:37:17 UTC
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.
Comment 14 Robert A. 2008-03-22 19:39:12 UTC
fyi hal-0.5.10 only supports pm-utils (see /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux) which breaks uswusp
Comment 15 Robert A. 2008-03-23 02:34:21 UTC
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
Comment 16 Robert A. 2008-05-23 11:02:53 UTC
Created attachment 154045 [details, diff]
display suspend/resume buttons
Comment 17 Robert A. 2008-05-23 11:05:11 UTC
Created attachment 154047 [details, diff]
configure should handle --with-hal and --with-dbus
Comment 18 Robert A. 2008-05-23 11:06:54 UTC
Created attachment 154049 [details]
ksmserver-3.5.9 with suspend/resume buttons (and hal check)
Comment 19 Robert A. 2008-05-23 11:09:00 UTC
Created attachment 154051 [details, diff]
changes made to ksmserver-3.5.9 ebuild
Comment 20 Daniel Klaffenbach 2008-09-19 09:24:01 UTC
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
Comment 21 Robert A. 2008-09-19 13:02:46 UTC
(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!
Comment 22 Robert A. 2008-09-19 14:00:33 UTC
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
Comment 23 Marc Elser 2009-01-22 06:30:16 UTC
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
Comment 24 Robert A. 2009-07-16 08:04:33 UTC
(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.
Comment 25 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2009-10-30 11:16:26 UTC
KDE3 is on its way out and KDE4 includes this option, so I'm closing as WONTFIX.