0

Consider that I'm using two users at distinct times on my PC. They both need ram that causes swapping if I switch from one to the other.

One solution is to log-out of one user and then log-in to (Gnome|KDE|xfce|...) the other and hope that everything is restored. This seems time-consuming to check all opened correctly.

Instead of these, is it possible to hibernate and resume the session so that the session can continue easily?

kelalaka
  • 165

1 Answers1

1

No. It does not work that way. Hibernating is working on a hardware level, not session.

If you are bothered by manually starting applications - auto-start them. All modern WM has ability to auto-start application, and majority of application have ability to restore its last working state.

The probable solution could be a virtual machine - put one (or both) users in a separate VM instances and they would be independent from each other and you would be able to hibernate an instance which is not needed right now. But most likely, the hardware, which would allow a VM for normal user work, would not need to shut one session to free resources for another one...

But ultimately - if your task requires so much memory that you have to shut down parallel processes - increase physical RAM on the machine. It is cheap. Not free, but cheap. Or buy a second machine.

White Owl
  • 5,129
  • Thanks, for the answer. I was rather looking for a solution as I intended that is not necessarily related to system-level hibernation. Like suspends all processes store them to disk and later resume ( though the integration to desktop manager is another problem) I've done more searches I've found that while it is possible for a single process though there are some problems. Therefore it seems really problematic to do for arbitrary processes. Well, chrome failed me many times about the tabs! – kelalaka Sep 21 '22 at 16:18
  • Try https://criu.org/Main_Page – gapsf Sep 21 '22 at 19:02