fredldotme / prime-indicator

PRIME Indicator - indicator applet for NVIDIA Optimus laptops
GNU General Public License v2.0
45 stars 31 forks source link

Does not log out in KDE5 #19

Closed poVoq closed 7 years ago

poVoq commented 9 years ago

I have installed this from the ppa under Kubuntu 15.04 (KDE5 desktop) and it works fine overall, however when I click "quick switch graphics" and click on ok for the log-out question it does not log out automatically. If I however log out manually then the correct switch of the GPU is done by this app.

jeroenev commented 8 years ago

Same issue here on LXDE in peppermint OS 7 (it also uses the panels and start menu from XFCE but idk if that makes a difference)

andrebrait commented 7 years ago

Hi there, guys. I can look into this for you. I may add logout mechanisms for KDE and LXDE, I just need to find out how to make the user log out from the command line on these DEs.

poVoq commented 7 years ago

Can confirm that this works on a fairly recent KDE5: "qdbus org.kde.ksmserver /KSMServer logout 0 0 0"

see full description here: http://superuser.com/questions/395820/how-to-properly-end-a-kde-session-from-shell-without-root-privileges

andrebrait commented 7 years ago

I'm adding support to KDE 4 and 5 in my fork as I post this. I'll be merging it on the master branch in the next hour or so.

andrebrait commented 7 years ago

Done. I'll soon add a pop up window to notify about the desktop not being supported at this time.

poVoq commented 7 years ago

@andrebrait In KDE5 (with your fork) the app indicator gets duplicated (but not tripled when used once more strangely enough) when I use the quick-switch feature. After restarting it is only a single entry again. Otherwise it works great, thanks! Oh and it would be nice if the install script would also start it directly, or at least indicate that you need to restart/relogin for it to work or something, as otherwise you are left a bit wondering until a restart.

andrebrait commented 7 years ago

I think that for KDE the indicator has to be constructed in another way. The one used in Mint has some KDE specific code. I'll also modify the installer to offer to run the indicator when it finishes, after the autostart option.

Before logging out, I think I'll kill the application. It might be easier than writing some KDE specific code. Please check my code again in the next few minutes!

poVoq commented 7 years ago

@andrebrait : I uninstalled the previous version using the script and reinstalled the new one with the supposed fix, but the indicator still gets duplicated in KDE. P.S.: Maybe you can enable issues in your repo, as this one seems dead and your fork sufficiently advanced to treat it as a project by itself?

andrebrait commented 7 years ago

@poVoq: I enabled issues over there. I'll find the KDE specific code in the Mint indicator and use it with mine, but that'll take a few days as I'm studying for a test.