Re: kde and ups
Charles Polisher via slackware <[email protected]> Tue, 16 Jan 2018 08:34:32 -0800
| Newsgroups | gmane.linux.slackware |
|---|---|
| Message-ID | <[email protected]> |
Noel Butler wrote:
> OK, so who has found the magic cure for KDE to shutdown immediately upon
> a shutdown command?
>
> it seems kde only wants to exit gracefully (or should we say,
> slllllllooooooooowwwwwwwlllyyyyyyy) noprmally I'm OK with this, but on a
> UPS poweroff it needs to exit there and then.
>
> it takes 6 f---ing minutes for KDE 4 to exit, even on a "logout" from
> normal session, if the desktop has been up for a couple of days or more
> just trying to logout from a startx session, even a command line
> shutdown, telinit 0, whatever, takes forever for KDE to go to black
> screen and more forever till it exits back to console to be shutdown.
<snip>
My experience with Slackware (current) is much better with xfce.
Slackware takes 1 minute to boot, 30 secs to launch xfce, 2 secs
to exit xfce. After "xwmconfig kde", starting kde with startx takes
about 1 minute. After selecting "log out", and after confirming this
with a second log out dialog box, KDE exits in about 30 seconds.
Could it be KDE is hanging on a confirmation dialog that no user
will ever see, until some lengthy timeout expires? You might
try setting your UPS to shutdown KDE using:
qdbus org.kde.ksmserver /KSMServer logout <confirm> <type> <mode>
<confirm> := 0 "Don't confirm, shutdown without asking"
<type> := 0 "Only log out of KDE",
:= 1 "Log out and halt the machine"
<mode> := 0 "Sched shutdown after all sesions exit"
:= 2 "Force shutdown now"
(The constants are defined in /usr/include/kworkspace/kworkspace.h).
Possibly you'd want to issue the shutdown in two steps, first
attempt to shutdown gracefully with:
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
Then after a maximum of perhaps 60 seconds elapsed, if the machine
hasn't shut down, issue:
qdbus org.kde.ksmserver /KSMServer logout 0 1 2
After another minute or so, if the machine still hasn't
halted, force a shutdown with /sbin/shutdown.
Best luck,
--
Chuck Polisher
--
slackware mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/slackware