From 20a1e5ad1ba50f97a00f65f3f3753517d622755f Mon Sep 17 00:00:00 2001 From: Erich Eickmeyer Date: Tue, 31 Aug 2021 07:45:55 -0700 Subject: [PATCH] Fix KDE Plasma logout and info for extended logout time (#24) * Fix KDE Plasma logout Previous implementation did not save user session on logout. * Add information for extended logout time nvidia-settings-460 and nvidia-prime 460 introduced an extended wait as, while switching prime, update-initramfs is invoked. This creates some time where the system updates the initramfs before logout. To prevent people assuming it's freezing, this additional information is needed. --- usr/bin/mate-optimus-applet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/mate-optimus-applet b/usr/bin/mate-optimus-applet index dd0085a..28f919e 100755 --- a/usr/bin/mate-optimus-applet +++ b/usr/bin/mate-optimus-applet @@ -124,7 +124,7 @@ def confirm_ignore(*args): return Gtk.ResponseType.CANCEL def confirm_gpu_switch(gpu): - message = _('Do you want to switch GPU now?') + ' ' + _('You need to log out and then log back in to switch the GPU to') + ' ' + gpu + message = _('Do you want to switch GPU now?') + ' ' + _('You need to log out and then log back in to switch the GPU to') + ' ' + gpu + _('. \n\nLogout may take up to a minute to complete while your system is configured.') dialog = Gtk.MessageDialog(None, Gtk.DialogFlags.MODAL, Gtk.MessageType.INFO, Gtk.ButtonsType.NONE, message) dialog.set_deletable(False) @@ -147,7 +147,7 @@ def session_logout(): elif current_desktop.startswith('gnome'): subprocess.Popen(["gnome-session-quit", "--logout"]) elif current_desktop.startswith('kde'): - subprocess.Popen(["qdbus", "org.kde.ksmserver", "/KSMServer", "logout", "0", "0", "0"]) + subprocess.Popen(["qdbus", "org.kde.ksmserver", "/KSMServer", "logout", "0", "3", "3"]) elif current_desktop.startswith('lxqt'): subprocess.Popen(["lxqt-leave", "--logout"]) elif current_desktop.startswith('x-cinnamon'):