Save session in order to keep windows open on Garuda Cinnamon

Hi, any help to save session in order to keep windows open in Garuda Cinnamon?

garuda-inxi
System:
  Kernel: 6.8.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=e38ee0d4-0c6f-4526-9adf-c7cf1a1f23b5 rw rootflags=subvol=@
    quiet loglevel=3 ibt=off
  Desktop: Cinnamon v: 6.0.4 tk: GTK v: 3.24.41 wm: Muffin v: 6.0.1 tools:
    avail: cinnamon-screensaver,xautolock vt: 7 dm: LightDM v: 1.32.0
    Distro: Garuda base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: VIQYx v: INVALID
    serial: <superuser required> Chassis: type: 10 v: INVALID
    serial: <superuser required>
  Mobo: LENOVO model: VIQY0Y1 v: 31900006WIN8 STD MBR IPG
    serial: <superuser required> part-nu: LENOVO_BI_IDEAPAD
    uuid: <superuser required> UEFI: LENOVO v: 74CN26WW(107T22)
    date: 05/09/2013
Battery:
  ID-1: BAT1 charge: 42.4 Wh (100.0%) condition: 42.4/56.4 Wh (75.2%)
    power: 655.4 W volts: 12.2 min: 10.8 model: LENOVO PABAS0241231 type: Li-ion
    serial: <filter> status: full
CPU:
  Info: model: Intel Core i7-4700MQ bits: 64 type: MT MCP arch: Haswell
    gen: core 4 level: v3 note: check built: 2013-15 process: Intel 22nm
    family: 6 model-id: 0x3C (60) stepping: 3 microcode: 0x28
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 2813 high: 3400 min/max: 800/3400 scaling:
    driver: intel_cpufreq governor: performance cores: 1: 2230 2: 2182 3: 3400
    4: 3400 5: 2395 6: 3400 7: 2104 8: 3400 bogomips: 38310
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Lenovo
    driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm built: 2013 ports:
    active: VGA-1,eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:0416
    class-ID: 0300
  Device-2: NVIDIA GK107M [GeForce GT 750M] vendor: Lenovo driver: nvidia
    v: 470.239.06 alternate: nouveau,nvidia_drm non-free: series: 470.xx+
    status: legacy-active (EOL~2024-09-xx) arch: Kepler code: GKxxx
    process: TSMC 28nm built: 2012-2018 pcie: gen: 1 speed: 2.5 GT/s lanes: 8
    link-max: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:0fe4 class-ID: 0300
  Device-3: Realtek Lenovo EasyCamera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-1:2 chip-ID: 0bda:58b9
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 23.2.6 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,intel,nv,vesa
    dri: crocus gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2966x900 s-dpi: 96 s-size: 784x238mm (30.87x9.37")
    s-diag: 819mm (32.26")
  Monitor-1: VGA-1 pos: left model: LG (GoldStar) 20EN33 serial: <filter>
    built: 2013 res: 1600x900 hz: 60 dpi: 92 gamma: 1.2
    size: 443x249mm (17.44x9.8") diag: 508mm (20") ratio: 16:9 modes:
    max: 1600x900 min: 720x400
  Monitor-2: eDP-1 pos: primary,right model: LG Display 0x033a built: 2011
    res: 1366x768 hz: 60 dpi: 101 gamma: 1.2 size: 344x194mm (13.54x7.64")
    diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
  API: EGL v: 1.5 hw: drv: intel crocus drv: nvidia platforms: device: 0
    drv: nvidia device: 2 drv: crocus device: 3 drv: swrast surfaceless:
    drv: swrast x11: drv: crocus inactive: gbm,wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.5-arch1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 4600 (HSW
    GT2) device-ID: 8086:0416 memory: 1.46 GiB unified: yes
  API: Vulkan v: 1.3.279 layers: 4 device: 0 type: integrated-gpu name: Intel
    HD Graphics 4600 (HSW GT2) driver: mesa intel v: 24.0.5-arch1.1
    device-ID: 8086:0416 surfaces: xcb,xlib device: 1 type: discrete-gpu
    name: NVIDIA GeForce GT 750M driver: nvidia v: 470.239.06
    device-ID: 10de:0fe4 surfaces: xcb,xlib device: 2 type: cpu name: llvmpipe
    (LLVM 17.0.6 256 bits) driver: mesa llvmpipe v: 24.0.5-arch1.1 (LLVM
    17.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 00:03.0
    chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20
    class-ID: 0403
  Device-3: NVIDIA GK107 HDMI Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 8 link-max: lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403
  Device-4: Kingston HyperX QuadCast
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 3-4.4.2:9 chip-ID: 0951:16df class-ID: 0300
    serial: <filter>
  API: ALSA v: k6.8.5-zen1-1-zen status: kernel-api tools: N/A
  Server-1: PipeWire v: 1.0.4 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Qualcomm Atheros QCA8171 Gigabit Ethernet vendor: Lenovo
    driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000
    bus-ID: 08:00.0 chip-ID: 1969:10a1 class-ID: 0200
  IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Broadcom BCM4352 802.11ac Dual Band Wireless Network Adapter
    vendor: Lenovo driver: wl v: kernel modules: bcma pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 09:00.0 chip-ID: 14e4:43b1 class-ID: 0280
  IF: wlp9s0 state: down mac: <filter>
  Info: services: NetworkManager,systemd-timesyncd
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
    v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4.2:6
    chip-ID: 0a12:0001 class-ID: e001
  Report: btmgmt ID: hci1 rfk-id: 3 state: up address: <filter> bt-v: 4.0
    lmp-v: 6 status: discoverable: no pairing: no class-ID: 6c010c
  Device-2: Lite-On BCM20702A0 driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-7:5 chip-ID: 04ca:200b
    class-ID: fe01 serial: <filter>
  Report: ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 4.0 lmp-v: 6
    status: discoverable: no pairing: no class-ID: 6c010c
Drives:
  Local Storage: total: 2.27 TiB used: 1.36 TiB (59.6%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT500MX500SSD1
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 023 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT2000MX500SSD1
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 023 scheme: GPT
Partition:
  ID-1: / raw-size: 100.42 GiB size: 100.42 GiB (100.00%)
    used: 23.79 GiB (23.7%) fs: btrfs dev: /dev/sdb4 maj-min: 8:20
  ID-2: /boot/efi raw-size: 1.86 GiB size: 1.86 GiB (99.80%)
    used: 584 KiB (0.0%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
  ID-3: /home raw-size: 309.96 GiB size: 309.96 GiB (100.00%)
    used: 141.99 GiB (45.8%) fs: btrfs dev: /dev/sdb5 maj-min: 8:21
  ID-4: /var/log raw-size: 100.42 GiB size: 100.42 GiB (100.00%)
    used: 23.79 GiB (23.7%) fs: btrfs dev: /dev/sdb4 maj-min: 8:20
  ID-5: /var/tmp raw-size: 100.42 GiB size: 100.42 GiB (100.00%)
    used: 23.79 GiB (23.7%) fs: btrfs dev: /dev/sdb4 maj-min: 8:20
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 15.35 GiB used: 845.2 MiB (5.4%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 20.12 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sdb3 maj-min: 8:19
Sensors:
  System Temperatures: cpu: 70.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 15.35 GiB used: 4.73 GiB (30.8%)
  Processes: 326 Power: uptime: 10h 28m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 0 hibernate: platform avail: shutdown,
    reboot, suspend, test_resume image: 6.11 GiB services: csd-power,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1432 libs: 412 tools: octopi,paru Compilers:
    gcc: 13.2.1 Shell: garuda-inxi default: fish v: 3.7.1
    running-in: gnome-terminal inxi: 3.3.34
Garuda (2.6.25-1):
  System install date:     2024-02-04
  Last full system update: 2024-04-14
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       No/Undetected
  Failed units:          

Saving the session before you power off the device is also known as hibernation. The basic steps for setting this up are here: Power management/Suspend and hibernate - ArchWiki

It looks like you already have an adequate swap device set up for this, so you are off to a good start. Set a “resume=UUID=” kernel parameter in your Grub config that points to this device.

You will also need to set up a dracut config with the correct modules, and then rebuild the initramfs for each kernel that you use.

This person’s post is a good example for how to set this up correctly:

See here they have set the kernel parameter for their resume device:

Don’t forget to regenerate the Grub configuration file after you set this up.

sudo update-grub

Here is where they have set up the necessary dracut config to add the hibernation modules:

After setting up this config, you must regenerate the initramfs:

sudo dracut-rebuild

After that you should be able to hibernate, which will save your session and keep your windows open when you shut down your computer.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.