Bug 438866 - plasma-systemmonitor state not saved
Summary: plasma-systemmonitor state not saved
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.22.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-18 13:52 UTC by Mac Michaels
Modified: 2021-08-24 15:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
attachment-21202-0.html (2.12 KB, text/html)
2021-07-01 16:14 UTC, Mac Michaels
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mac Michaels 2021-06-18 13:52:25 UTC
SUMMARY
System Monitor in plasma 5.21/5.22 does not save the state after user logout.
The selected panel returns to the "Overview" instead of "History" I was using.
System Monitor resets Activity setting to be visible on only the first activity after user logout.

STEPS TO REPRODUCE
1. Start X11 version of Plasma from SDDM
2. Start System Monitor application
3. Move System Monitor to the desired screen (I have 2 video displays on my system)
4. Select History panel in System Monitor
5. Change Show in Activities (on right click title bar menu) to "All Activities"
6. Switch to another activity or logout.

OBSERVED RESULT
1. Switch to another activity:
  System Monitor does not appear.
2. Switch back to original activity:
  System Monitor History panel is visible
  (right click title bar menu) "All Activities" is not selected.
3. User logout then login from SDDM:
  System Monitor Overview panel is visible, but moved back to the default video display device at the originally created location.


EXPECTED RESULT
"All Activities" to remain selected when switching activity or logout then login.
System Monitor to be visible in all activities.
Selected panel "History" to remain selected after logout then login.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Gentoo Linux
(available in About System)
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Kernel Version: 5.10.27-gentoo(64-bit)
Graphics Platform: X11
Processors: 8 x Intel Core i74770K CPU @3.50GHz
Memory: 15.5 GiB FAM
Graphics Processor: Mesa DRI Intel HD Graphics 4600
Comment 1 David Edmundson 2021-07-01 14:51:04 UTC
Can I confirm if you are closing plasma-system monitor and logging out, or this is about when using session restore?

Do other applications restore activities correctly?
Comment 2 Mac Michaels 2021-07-01 16:14:51 UTC
Created attachment 139787 [details]
attachment-21202-0.html

I do not close plasma system monitor before logging out.

My system has 2 displays with different resolutions arranged side-by-side.
I do not power off or disconnet any displays ever, because that will 
rearrange everything.

The login session restore starts SystemMonitor on the wrong screen with 
the initial default page "Overview" instead of the last selected page 
"History". Activies are set to whichever activity is selected when I 
login (which was the one active when I logged out).

All other application's activities are properly set by session restore.

On 7/1/21 9:51 AM, David Edmundson wrote:
> https://bugs.kde.org/show_bug.cgi?id=438866
>
> David Edmundson <kde@davidedmundson.co.uk> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|REPORTED                    |NEEDSINFO
>                   CC|                            |kde@davidedmundson.co.uk
>           Resolution|---                         |WAITINGFORINFO
>
> --- Comment #1 from David Edmundson <kde@davidedmundson.co.uk> ---
> Can I confirm if you are closing plasma-system monitor and logging out, or this
> is about when using session restore?
>
> Do other applications restore activities correctly?
>
Comment 3 David Edmundson 2021-08-24 14:01:19 UTC
Git commit 37a338b8c9368c60f57f649142a3c016f27129aa by David Edmundson.
Committed on 24/08/2021 at 14:01.
Pushed by davidedmundson into branch 'master'.

Session management support

For session restoration we just need to remember which page we're on,
which is already supported as a command line argument.

This patch repurposes that and explicitly sets the restart command on
session save.

M  +10   -13   src/Configuration.cpp
M  +2    -1    src/Configuration.h
M  +28   -0    src/main.cpp

https://invent.kde.org/plasma/plasma-systemmonitor/commit/37a338b8c9368c60f57f649142a3c016f27129aa