SUMMARY Some autostart applications have issues when using session restore. I've seen this with two applications, each with different behavior: 1. StreamController (flatpack installed via Discover) 2. DesktopVideoUpdater (part of the decklink package from Blackmagic Design) STEPS TO REPRODUCE 1. Set Session Restore to "On last login" 2. Have affected application(s) installed and configured to autostart 3. Logout and log back into KDE OBSERVED RESULT The different applications had different behavior. 1. StreamController: the application crashes on startup and appears not to start 2. DesktopVideoUpdater: "prior" instances of the application tagged with a --session argument are started and a new instance of the application (not tagged with --session) is also started creating duplicate processes. EXPECTED RESULT 1. StreamController: the application starts as expected (works this way without Session Restore) 2. DesktopVideoUpdater: prior instances of the application are not restored, i.e. only one instance is running regardless of restarts. SOFTWARE/OS VERSIONS (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.18.0 Qt Version: 6.9.2 ADDITIONAL INFORMATION DesktopVideoUpdater is autostarted via a .desktop file in /etc/xdg/autostart placed there by the package. This autostart entry doesn't appear in the System Settings/Autostart section, but I presume that's by design. StreamController is autostarted via a .desktop file in ~/.config/autostart. I presume this is placed there by the application when its own autostart setting is enabled. This autostart entry does appear in the System Settings/Autostart section. I suspect DesktopVideoUpdater is intended to be a GUI application based on its man page, but no window ever appears and the application remains running until logout. This may be intended as a "background task" or "system tray" application that simply isn't properly implemented. Both these packages may require additional hardware. The decklink package (containing DesktopVideoUpdater) probably requires a Blackmagic Design Decklink, Intensity, or Multibridge video editing card. StreamController may function without a Stream Deck appliance, but I'm not sure. My current workaround is to set Session Restore to "Start with an empty session."
> 2. DesktopVideoUpdater: "prior" instances of the application tagged with a --session argument are started and a new instance of the application (not tagged with --session) is also started creating duplicate processes. This indicates to me that this program wants to be restored in this way and tells us to save this command. Please check ~/.config/ksmserverrc if these instances appear in there > StreamController is autostarted via a .desktop file in ~/.config/autostart. I presume this is placed there by the application when its own autostart setting is enabled. This autostart entry does appear in the System Settings/Autostart section. Can't you just remove this via settings? Long term we should maybe offer the ability to disable autostarting things that are in /etc/xdg/autostart
If you keep session restore on but tell these apps to not autostart, do they still have issues?
(In reply to David Redondo from comment #1) > > 2. DesktopVideoUpdater: "prior" instances of the application tagged with a --session argument are started and a new instance of the application (not tagged with --session) is also started creating duplicate processes. > > This indicates to me that this program wants to be restored in this way and > tells us to save this command. Please check ~/.config/ksmserverrc if these > instances appear in there I see entries for DesktopVideoUpdater. I will attach the file as it sits now. > > StreamController is autostarted via a .desktop file in ~/.config/autostart. I presume this is placed there by the application when its own autostart setting is enabled. This autostart entry does appear in the System Settings/Autostart section. > > Can't you just remove this via settings? Indeed I can remove the StreamController autostart configuration from StreamController settings. Attempting to remove autostart configuration using KDE System Settings doesn't work correctly, but that's an understandable conflict that I don't care about. > Long term we should maybe offer the ability to disable autostarting things > that are in /etc/xdg/autostart Would you like me to submit that request somewhere?
Created attachment 185665 [details] Current .config/ksmserverrc file
(In reply to Nate Graham from comment #2) > If you keep session restore on but tell these apps to not autostart, do they > still have issues? DesktopVideoUpdater restarts on login as expected as long as the application had started. An entry for the application is placed in .config/ksmserverrc. StreamController does not restart on login even if I manually open the application. No entry for this application is placed in ksmserverrc. I did notice this interesting behavior: I turned autostart on for StreamController while keeping session restore on. The _first_ time I logout and log back in, StreamController starts. Every subsequent time, StreamController does not start. No entry is placed in ksmserverrc
DesktopVideoUpdater explicitely asks to be restarted and it's package (distro?) also places a file in /etc/xdg/autostart. We are doing what is requested if anything that's a bug in DesktopVideoUpdater.
(In reply to David Redondo from comment #6) > DesktopVideoUpdater explicitely asks to be restarted and it's package > (distro?) also places a file in /etc/xdg/autostart. We are doing what is > requested if anything that's a bug in DesktopVideoUpdater. What about DesktopVideoUpdater is requesting to be restarted as part of a session restart (API, settings, configuration, etc.)? I believe there are bugs in this software so having documentation that leads to what can be fixed would be helpful.
I'm fairly certain this is closed-source software and I wouldn't be surprised if the explicit restart request of this fashion is not being done correctly, so I'm just wanting to understand how the mechanism works so I can file that report.
> hat about DesktopVideoUpdater is requesting to be restarted as part of a session restart it tells us that via XSMP https://www.x.org/releases/X11R7.7/doc/libSM/xsmp.html , otherwise it wouldn't end up in ksmserverrc