Bug 412414 - Suspend single application
Summary: Suspend single application
Status: RESOLVED NOT A BUG
Alias: None
Product: kwayland
Classification: Frameworks and Libraries
Component: client (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-28 08:16 UTC by Lach Sławomir
Modified: 2019-10-07 13:33 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lach Sławomir 2019-09-28 08:16:17 UTC
SUMMARY
I wrote this post, because it could be overkill and maybe possible feature. Firstly, read Lachu's (my) post on this topic: https://forum.kde.org/viewtopic.php?f=83&t=162566 .

Idea is about allowing to hibernate applications, especially on activity stopping. This could be only related to application doesn't uses network connections. You must probably modify Wayland client libraries to intercept some request and modify some wayland/application state saved in library memory, so this could been reproduced during activity startup.

Many years ago I've read about user space tools to hibernate single Linux process. It could be used only for application, which doesn't use network, so X Windowing system makes this tool unusable for X applications, because X is designed to work in network. But I known Wayland is less Socket dependent, so we could intercept some Wayland request, which are sending via socket. Also, Wayland is designed for integrate Wayland server with Window Manager (this isn't forced of course, since Wayland Compositor still could support own window manager protocol/support, but this is idea to solve many X problems), so we could only intercept request KWin support. On X it could been harder, because X.org are independent project and we couldn't modify it's code in simple manner.

STEPS TO REPRODUCE
1. User order to stop activity
2. KWin show application, which use network and asks to close, stop it, change it activity or leave running in background
3. KWin hibernate each no network application to disk
4. User order to start activity again
5. KWin restart each hibernated activity

OBSERVED RESULT


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 Lach Sławomir 2019-09-28 08:19:05 UTC
Observed result:
Currently not such feature. There exist cli tool to hibernate Linux process, which doesn't use network, but it cannot hibernate X applications.

Expected result:
Everything could work in future, if user use wayland, so user could hibernate and restore app.

Platform:
GNU/Linux (it probably don't require any kernel features, maybe only check file description under /proc/app_pid/fd/<number> is a network socket or something).
Comment 2 David Edmundson 2019-10-07 13:33:07 UTC
Thanks for your comments.

As you note this is a massively difficult problem for any process that uses file descriptors. Things break down quite quickly. Wayland does not change much of this.

Maybe changes will come later, it is a requirement for plasma mobile, but it is not a bug we should track.