Skip to content

Commit

Permalink
Fix KDE Plasma logout and info for extended logout time (#24)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
eeickmeyer authored Aug 31, 2021
1 parent 1b483fc commit 20a1e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/bin/mate-optimus-applet
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'):
Expand Down

0 comments on commit 20a1e5a

Please sign in to comment.