Bug 510433 - Conflict between autostart applications and session restore
Summary: Conflict between autostart applications and session restore
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (other bugs)
Version First Reported In: 6.4.5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-09 17:37 UTC by Jonathan Paz
Modified: 2025-10-14 06:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Current .config/ksmserverrc file (806 bytes, text/plain)
2025-10-10 18:00 UTC, Jonathan Paz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Paz 2025-10-09 17:37:23 UTC
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."
Comment 1 David Redondo 2025-10-10 07:32:21 UTC
> 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
Comment 2 Nate Graham 2025-10-10 16:07:42 UTC
If you keep session restore on but tell these apps to not autostart, do they still have issues?
Comment 3 Jonathan Paz 2025-10-10 17:58:14 UTC
(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?
Comment 4 Jonathan Paz 2025-10-10 18:00:18 UTC
Created attachment 185665 [details]
Current .config/ksmserverrc file
Comment 5 Jonathan Paz 2025-10-10 18:06:17 UTC
(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
Comment 6 David Redondo 2025-10-13 08:02:11 UTC
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.
Comment 7 Jonathan Paz 2025-10-13 14:27:58 UTC
(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.
Comment 8 Jonathan Paz 2025-10-13 14:35:26 UTC
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.
Comment 9 David Redondo 2025-10-14 06:59:17 UTC
> 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