1

Hi,

Have below issue with CachyOS KDE Plasma:
When RAM memory is used up, swap is not activating?
(instead, OS is closing all open applications)

Any ideas on how to troubleshoot the above?
Thanks!

SS

❯ swapon --show
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 23.2G 0B 100

~

❯ inxi -Farz
System:
Kernel:7.0.9-1-cachyosarch:x86_64bits:64compiler:clangv:22.1.5
clocksource:tscavail:hpet,acpi_pm
parameters:initrd=\initramfs-linux-cachyos.img
root=UUID=4a3d9d3c-4153-46ba-9cfb-b061ebbc24c0 rw
cryptdevice=UUID=c990f5ad-1e3c-4a74-aed4-331f38790b2b:luks-c990f5ad-1e3c-4a74-aed4-331f38790b2b
zswap.enabled=0 nowatchdog quiet splash
Desktop:KDE Plasmav:6.6.5tk:Qtv:N/Ainfo:frameworksv:6.26.0
wm:kwin_x11vt:2dm:SDDMDistro:CachyOSbase:Arch Linux
Machine:
Type:Mini-pcMobo:AZWmodel:SER8v:V10serial:<superuser required>
part-nu:75uuid:<superuser required>Firmware:UEFIvendor:American
Megatrends LLC.v:HPT.8xxx.SER8.V035.P8C0M0C15.14.Linkdate:06/26/2025
CPU:
Info: model:AMD Ryzen 7 8845HS w/ Radeon 780M Graphicsbits:64
type:MT MCParch:Zen 4gen:4level:v4note:checkbuilt:2022+
process:TSMC n5 (5nm)family:0x19 (25)model-id:0x75 (117)stepping:2
microcode:0xA70520A
Topology: cpus:1xdies:1clusters:1cores:8threads:16tpc:2
smt:enabledcache: L1:512 KiBdesc:d-8x32 KiB; i-8x32 KiBL2:8 MiB
desc:8x1024 KiBL3:16 MiBdesc:1x16 MiB
Speed (MHz): avg:1354min/max:419/5138boost:enabledscaling:
driver:amd-pstate-eppgovernor:powersavecores: 1:13542:13543:1354
4:13545:13546:13547:13548:13549:135410:135411:135412:1354
13:135414:135415:135416:1354bogomips:121370
Flags-basic:avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a
ssse3 svm
Vulnerabilities:
Type:gather_data_samplingstatus:Not affected
Type:ghostwritestatus:Not affected
Type:indirect_target_selectionstatus:Not affected
Type:itlb_multihitstatus:Not affected
Type:l1tfstatus:Not affected
Type:mdsstatus:Not affected
Type:meltdownstatus:Not affected
Type:mmio_stale_datastatus:Not affected
Type:old_microcodestatus:Not affected
Type:reg_file_data_samplingstatus:Not affected
Type:retbleedstatus:Not affected
Type:spec_rstack_overflowmitigation:Safe RET
Type:spec_store_bypassmitigation:Speculative Store Bypass disabled via
prctl
Type:spectre_v1mitigation:usercopy/swapgs barriers and __user pointer
sanitization
Type:spectre_v2mitigation:Enhanced / Automatic IBRS; IBPB:
conditional; STIBP: always-on; PBRSB-eIBRS: Not affected; BHI: Not
affected
Type:srbdsstatus:Not affected
Type:tsamitigation:Clear CPU buffers
Type:tsx_async_abortstatus:Not affected
Type:vmscapemitigation:IBPB before exit to userspace
Graphics:
Device-1:Advanced Micro Devices [AMD/ATI] HawkPoint1driver:amdgpu
v:kernelarch:RDNA-3code:Phoenixprocess:TSMC n4 (4nm)built:2023+
pcie: gen:4speed:16 GT/slanes:16ports: active:DP-1,HDMI-A-1
empty:DP-2, DP-3, DP-4, DP-5, DP-6, Writeback-1bus-ID:65:00.0
chip-ID:1002:1900class-ID:0300temp:34.0 C
Display:x11server:``X.Org``v:21.1.22with:Xwaylandv:24.1.11
compositor:kwin_x11driver: X: loaded:amdgpuunloaded:modesetting
alternate:fbdev,vesadri:radeonsigpu:amdgpudisplay-ID::0screens:1
Screen-1:0s-res:1920x1080s-dpi:96s-size:507x285mm (19.96x11.22")
s-diag:582mm (22.9")
Monitor-1:DP-1mapped:DisplayPort-0pos:primary
model:LG (GoldStar) Ultra HDserial:<filter>built:2023res:
mode:1920x1080hz:60scale:100% (1)dpi:81gamma:1.2
size:600x340mm (23.62x13.39")diag:690mm (27.2")ratio:16:9modes:
max:3840x2160min:640x480
Monitor-2:HDMI-A-1mapped:HDMI-A-0model:LG (GoldStar) TV SSCR2
serial:<filter>built:2020res:1920x1080dpi:61gamma:1.2
size:1600x900mm (62.99x35.43")diag:1836mm (72.3")ratio:16:9modes:
max:3840x2160min:720x400
API:EGLv:1.5hw: drv:amd radeonsiplatforms: device:0drv:radeonsi
device:1drv:swrastgbm: drv:radeonsisurfaceless: drv:radeonsix11:
drv:radeonsiinactive:wayland
API:OpenGLv:4.6vendor:amd mesav:26.1.0-arch2.1glx-v:1.4
direct-render:yesrenderer:AMD Radeon 780M Graphics (radeonsi phoenix ACO
DRM 3.64 7.0.9-1-cachyos)device-ID:1002:1900memory:7.81 GiB
unified:yes
API:Vulkanv:1.4.350layers:6device:0type:integrated-gpuname:AMD
Radeon 780M Graphics (RADV PHOENIX)driver:mesa radvv:26.1.0-arch2.1
device-ID:1002:1900surfaces:N/A
Info: Tools: api:clinfo, eglinfo, glxinfo, vulkaninfo
de:kscreen-console,kscreen-doctorwl:wayland-info
x11:xdpyinfo, xprop, xrandr
Audio:
Device-1:Advanced Micro Devices [AMD/ATI] Radeon High Definition Audio
driver:snd_hda_intelv:kernelpcie: gen:4speed:16 GT/slanes:16
bus-ID:65:00.1chip-ID:1002:1640class-ID:0403
Device-2:Advanced Micro Devices [AMD] Audio Coprocessor
driver:snd_pci_psv:kernelalternate:snd_pci_acp3x, snd_rn_pci_acp3x,
snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x,
snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh,
snd_sof_amd_acp63, snd_sof_amd_acp70pcie: gen:4speed:16 GT/slanes:16
bus-ID:65:00.5chip-ID:1022:15e2class-ID:0480
Device-3:Advanced Micro Devices [AMD] Ryzen HD Audio
driver:snd_hda_intelv:kernelpcie: gen:4speed:16 GT/slanes:16
bus-ID:65:00.6chip-ID:1022:15e3class-ID:0403
API:ALSAv:k7.0.9-1-cachyosstatus:kernel-api
tools:alsactl,alsamixer,amixer
Server-1:sndiodv:N/Astatus:offtools:aucat,midicat,sndioctl
Server-2:JACKv:1.9.22status:offtools:N/A
Server-3:PipeWirev:1.6.5status:activewith: 1:pipewire-pulse
status:active2:wireplumberstatus:active3:pipewire-alsatype:plugin
tools:pactl,pw-cat,pw-cli,wpctl
Network:
Device-1:Realtek RTL8125 2.5GbEdriver:r8169v:kernelpcie: gen:2
speed:5 GT/slanes:1port:f000bus-ID:01:00.0chip-ID:10ec:8125
class-ID:0200
IF:enp1s0state:upspeed:1000 Mbpsduplex:fullmac:<filter>
Device-2:Intel Wi-Fi 6 AX200driver:iwlwifiv:kernelpcie: gen:2
speed:5 GT/slanes:1bus-ID:02:00.0chip-ID:8086:2723class-ID:0280
IF:wlan0state:downmac:<filter>
IF-ID-1:wg0-mullvadstate:unknownspeed:N/Aduplex:N/Amac:N/A
Info: services:NetworkManager,systemd-timesyncd
Bluetooth:
Device-1:Intel AX200 Bluetoothdriver:btusbv:0.8type:USBrev:2.0
speed:12 Mb/slanes:1mode:1.1bus-ID:1-5:9chip-ID:8087:0029
class-ID:e001
Report:btmgmtID:hci0rfk-id:2state:upaddress:<filter>bt-v:5.2
lmp-v:11status: discoverable:nopairing:noclass-ID:6c0104
Drives:
Local Storage: total:931.51 GiBused:454.52 GiB (48.8%)
SMART Message:Unable to run smartctl. Root privileges required.
ID-1:/dev/nvme0n1maj-min:259:0vendor:Crucialmodel:CT1000P3PSSD8
size:931.51 GiBblock-size: physical:512 Blogical:512 Bspeed:63.2 Gb/s
lanes:4tech:SSDserial:<filter>fw-rev:P9CR411temp:31.9 C
scheme:GPT
Partition:
ID-1:/raw-size:929.5 GiBsize:913.83 GiB (98.31%)
used:454.26 GiB (49.7%)fs:ext4dev:/dev/dm-0maj-min:253:0
mapped:luks-c990f5ad-1e3c-4a74-aed4-331f38790b2b
ID-2:/bootraw-size:2 GiBsize:2 GiB (99.80%)used:265.5 MiB (13.0%)
fs:vfatdev:/dev/nvme0n1p1maj-min:259:1
Swap:
Kernel: swappiness:0 (default 60)cache-pressure:50 (default 100)
zswap:no
ID-1:swap-1type:zramsize:23.21 GiBused:0 KiB (0.0%)priority:100
comp:zstdavail:lzo-rle,lzo,lz4,lz4hc,deflate,842dev:/dev/zram0
Sensors:
System Temperatures: cpu:40.8 Cmobo:39.0 Cgpu:amdgputemp:35.0 C
Fan Speeds (rpm):N/A
Repos:
Packages:1552pm:pacmanpkgs:1528libs:405tools:octopi,parupm:rpm
pkgs:0pm:flatpakpkgs:24
Active pacman repo servers in:/etc/pacman.d/cachyos-mirrorlist
1: https://us-mnz.soulharsh007.dev/cachyos/repo/$arch/$repo``
2: https://mirror.krfoss.org/cachyos/repo/$arch/$repo``
3: https://cachyos.doridian.net/repo/$arch/$repo``
4: https://ca.mirror.cx/cachyos/repo/$arch/$repo``
5: https://cdn77.cachyos.org/repo/$arch/$repo``
6: https://us.cachyos.org/repo/$arch/$repo``
7: https://mirror5.krfoss.org/cachyos/repo/$arch/$repo``
8: https://cdn.lansing2600.org/cachyos/repo/$arch/$repo``
9: https://at.cachyos.org/repo/$arch/$repo``
10: https://mirror.lesviallon.fr/cachy/repo/$arch/$repo``
11: https://mirror.hb9hil.org/cachyos/repo/$arch/$repo``
12: https://mirrors.lansing2600.org/cachyos/repo/$arch/$repo``
13: https://mirror.mergedcloud.de/cachyos/repo/$arch/$repo``
14: https://cachyos-mirror.m1k.cloud/repo/$arch/$repo``
15: https://mirror.zyner.org/mirror/cachyos/repo/$arch/$repo``
16: https://nl.mirror.cx/cachyos/repo/$arch/$repo``
17: https://wan.metrosg.ru/cachyos/repo/$arch/$repo``
18: https://cachyos.next-works.it/repo/$arch/$repo``
19: https://mirror2.keiminem.com/cachyos/repo/$arch/$repo``
20: https://mirror.nju.edu.cn/cachyos/repo/$arch/$repo``
21: https://archlinux.gay/cachy/repo/$arch/$repo``
22: https://mirrors.ustc.edu.cn/cachyos/repo/$arch/$repo``
23: https://no.mirror.cx/cachyos/repo/$arch/$repo``
24: https://mirror.jura12.ru/repo/$arch/$repo``
Active pacman repo servers in:/etc/pacman.d/cachyos-v4-mirrorlist
1: https://us-mnz.soulharsh007.dev/cachyos/repo/$arch_v4/$repo``
2: https://mirror.krfoss.org/cachyos/repo/$arch_v4/$repo``
3: https://cachyos.doridian.net/repo/$arch_v4/$repo``
4: https://ca.mirror.cx/cachyos/repo/$arch_v4/$repo``
5: https://cdn77.cachyos.org/repo/$arch_v4/$repo``
6: https://us.cachyos.org/repo/$arch_v4/$repo``
7: https://mirror5.krfoss.org/cachyos/repo/$arch_v4/$repo``
8: https://cdn.lansing2600.org/cachyos/repo/$arch_v4/$repo``
9: https://at.cachyos.org/repo/$arch_v4/$repo``
10: https://mirror.lesviallon.fr/cachy/repo/$arch_v4/$repo``
11: https://mirror.hb9hil.org/cachyos/repo/$arch_v4/$repo``
12: https://mirrors.lansing2600.org/cachyos/repo/$arch_v4/$repo``
13: https://mirror.mergedcloud.de/cachyos/repo/$arch_v4/$repo``
14: https://cachyos-mirror.m1k.cloud/repo/$arch_v4/$repo``
15: https://mirror.zyner.org/mirror/cachyos/repo/$arch_v4/$repo``
16: https://nl.mirror.cx/cachyos/repo/$arch_v4/$repo``
17: https://wan.metrosg.ru/cachyos/repo/$arch_v4/$repo``
18: https://cachyos.next-works.it/repo/$arch_v4/$repo``
19: https://mirror2.keiminem.com/cachyos/repo/$arch_v4/$repo``
20: https://mirror.nju.edu.cn/cachyos/repo/$arch_v4/$repo``
21: https://archlinux.gay/cachy/repo/$arch_v4/$repo``
22: https://mirrors.ustc.edu.cn/cachyos/repo/$arch_v4/$repo``
23: https://no.mirror.cx/cachyos/repo/$arch_v4/$repo``
24: https://mirror.jura12.ru/repo/$arch_v4/$repo``
Active pacman repo servers in:/etc/pacman.d/mirrorlist
1: https://archlinux.cachyos.org/repo/$repo/os/$arch``
2: https://arch.mirror.constant.com/$repo/os/$arch``
3: https://arch-mirror.wtako.net/$repo/os/$arch``
4: https://fastly.mirror.pkgbuild.com/$repo/os/$arch``
5: https://mirror.osbeck.com/archlinux/$repo/os/$arch``
6: https://nl.mirrors.cicku.me/archlinux/$repo/os/$arch``
7: https://mirror.quantum5.ca/archlinux/$repo/os/$arch``
8: https://ch.mirrors.cicku.me/archlinux/$repo/os/$arch``
9: https://es.mirrors.cicku.me/archlinux/$repo/os/$arch``
10: https://it.mirrors.cicku.me/archlinux/$repo/os/$arch``
11: https://ru.mirrors.cicku.me/archlinux/$repo/os/$arch``
12: https://mirror.franscorack.com/archlinux/$repo/os/$arch``
13: https://at.arch.niranjan.co/$repo/os/$arch``
14: https://al.arch.niranjan.co/$repo/os/$arch``
15: https://at.arch.mirror.kescher.at/$repo/os/$arch``
16: https://geo.mirror.pkgbuild.com/$repo/os/$arch``
17: https://archlinux.mirror-services.net/archlinux/$repo/os/$arch``
18: https://tr.arch.niranjan.co/$repo/os/$arch``
19: https://mirror.mangohost.net/archlinux/$repo/os/$arch``
20: https://theswissbay.ch/archlinux/$repo/os/$arch``
21: https://mirror.1ago.be/archlinux/$repo/os/$arch``
22: https://mirror.archlinux.si/$repo/os/$arch``
23: https://mirror.tux.si/arch/$repo/os/$arch``
24: https://mirror.lu.stratonexus.net/archlinux/$repo/os/$arch``
25: https://mirror.juniorjpdj.pl/archlinux/$repo/os/$arch``
26: https://jp.mirrors.cicku.me/archlinux/$repo/os/$arch``
27: https://archlinux.mailtunnel.eu/$repo/os/$arch``
28: https://archlinux.koyanet.lv/archlinux/$repo/os/$arch``
29: https://ftp.ek-cer.hu/pub/mirrors/ftp.archlinux.org/$repo/os/$arch``
30: https://repo.br.ee/arch/$repo/os/$arch``
31: https://no.mirror.cx/archlinux/$repo/os/$arch``
32: https://ftp.energotel.sk/pub/linux/arch/$repo/os/$arch``
33: https://mirror.neuf.no/archlinux/$repo/os/$arch``
34: https://umea.mirror.pkgbuild.com/$repo/os/$arch``
35: https://mirrors.pidginhost.com/arch/$repo/os/$arch``
36: https://hu.mirror.frigyes.dev/archlinux/$repo/os/$arch``
37: https://tw.mirrors.cicku.me/archlinux/$repo/os/$arch``
38: https://mirrors.dotsrc.org/archlinux/$repo/os/$arch``
39: https://mirrors.xtom.ee/archlinux/$repo/os/$arch``
40: https://mirrors.uni-plovdiv.net/archlinux/$repo/os/$arch``
41: https://mirror.timtal.com.tr/archlinux/$repo/os/$arch``
42: https://gluttony.sin.cvut.cz/arch/$repo/os/$arch``
43: https://mirror.es.cdn-perfprod.com/archlinux/$repo/os/$arch``
44: https://taipei.mirror.pkgbuild.com/$repo/os/$arch``
45: https://repo.hyron.dev/archlinux/$repo/os/$arch``
46: https://ftp.linux.edu.lv/archlinux/$repo/os/$arch``
47: https://mirror.group.one/archlinux/$repo/os/$arch``
48: https://lidsol.fi-b.unam.mx/archlinux/$repo/os/$arch``
49: https://archlinux.grena.ge/$repo/os/$arch``
50: https://mirror.xtom.com.hk/archlinux/$repo/os/$arch``
51: https://gsl-syd.mm.fcix.net/archlinux/$repo/os/$arch``
52: https://repository.su/archlinux/$repo/os/$arch``
53: https://us.arch.niranjan.co/$repo/os/$arch``
54: https://mirror.dkm.cz/archlinux/$repo/os/$arch``
55: https://mirrors.saswata.cc/archlinux/$repo/os/$arch``
56: https://mirror.funami.tech/arch/$repo/os/$arch``
57: https://mirror.telepoint.bg/archlinux/$repo/os/$arch``
58: https://au.arch.niranjan.co/$repo/os/$arch``
59: https://berlin.mirror.pkgbuild.com/$repo/os/$arch``
60: https://mirror.kku.ac.th/archlinux/$repo/os/$arch``
61: https://md.arch.niranjan.co/$repo/os/$arch``
62: https://mirrors.jlu.edu.cn/archlinux/$repo/os/$arch``
63: https://mirror.sinirlan.net/archlinux/$repo/os/$arch``
64: https://in.arch.niranjan.co/$repo/os/$arch``
65: https://mirror.xeonbd.com/archlinux/$repo/os/$arch``
66: https://fi.arch.niranjan.co/$repo/os/$arch``
67: https://sg.arch.niranjan.co/$repo/os/$arch``
68: https://arch.midov.pl/arch/$repo/os/$arch``
69: https://ro.arch.niranjan.co/$repo/os/$arch``
70: https://uk.arch.niranjan.co/$repo/os/$arch``
71: https://mirror.aria-on-the-planet.es/archlinux/$repo/os/$arch``
72: https://ams.nl.mirrors.bjg.at/arch/$repo/os/$arch``
73: https://download.nus.edu.sg/mirror/archlinux/$repo/os/$arch``
74: https://mirror.trapmaid.org/archlinux/$repo/os/$arch``
75: https://mirror.mrleong.net/archlinux/$repo/os/$arch``
76: https://mirrors.aliyun.com/archlinux/$repo/os/$arch``
77: https://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch``
78: https://mirror.abderraziq.com/archlinux/$repo/os/$arch``
79: https://london.mirror.pkgbuild.com/$repo/os/$arch``
80: https://arch.yhtez.xyz/$repo/os/$arch``
81: https://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch``
82: https://mirror.moson.org/arch/$repo/os/$arch``
83: https://mirror.cyberbits.eu/archlinux/$repo/os/$arch``
Info:
Memory: total:24 GiBavailable:23.22 GiBused:8.23 GiB (35.4%)
Processes:491Power: uptime:14mstates:freeze,mem,disksuspend:s2idle
wakeups:0hibernate:platformavail:shutdown, reboot, suspend, test_resume
image:9.23 GiBservices:org_kde_powerdevil, power-profiles-daemon,
upowerdInit:systemdv:260default:graphicaltool:systemctl
Compilers: clang:22.1.5gcc:16.1.1Shell:fishv:4.7.1
running-in:konsoleinxi:3.3.40

2

Show us your config?

cat /etc/systemd/zram-generator.conf 

Also have you configured anything like vm.swappiness anywhere?
(Boot options or sysctl.conf.d or anything else.)

Hi,

Thanks for helping!

Get below:

❯ cat /etc/systemd/zram-generator.conf
cat: /etc/systemd/zram-generator.conf: No such file or directory

Sorry, I think I may have changed the swappiness some time ago

5

Well thats odd .. thats how zram is set up by default.

Maybe check if the generator thing is installed?

pacman -Qs zram-generator

For a list of all the possible config files see this and look in those places;

And for a more full system info and some logs and such you could do;

sudo cachyos-bugreport.sh

Or if not then a more full inxi (and with important parts like IP/MAC hidden! - you may wish to change or remove your original inxi! and always include z with shared inxi commands.);

inxi -Farz

❯ pacman -Qs zram-generator
local/zram-generator 1.2.1-1.1
Systemd unit generator for zram devices

I think I did definitely change the swapiness.

7

OK we can look at that, ex;

sysctl vm.swappiness

But I still think we need to find where/how your zram-generator is configured.

And create/edit it for a decent config.

Yes, it is set to “0”

How to change above to default value?

❯ sysctl vm.swappiness
vm.swappiness = 0

9

Well again we should probably find where/how you set it to 0 in the first place.

Instead of just dropping multiple files for different options in various places across the system.

So I suggest finding that.

In the same way I suggest finding that zram-generator.conf file.

We want to find both of those (where is swapiness set? where is zram-generator conf?) things before moving forward.

PS.

For generator you may run the following;

bash -c 'for file in /usr/lib/systemd/zram-generator.conf /usr/local/lib/systemd/zram-generator.conf /etc/systemd/zram-generator.conf /run/systemd/zram-generator.conf /usr/lib/systemd/zram-generator.conf.d/*.conf /usr/local/lib/systemd/zram-generator.conf.d/*.conf /etc/systemd/zram-generator.conf.d/*.conf /run/systemd/zram-generator.conf.d/*.conf; do [[ -f $file ]] && echo "$file exists!"; done'

For swappiness;

bash -c 'for dir in /usr/lib/udev/rules.d /etc ; do grep -isR swappiness "$dir"; done'

These will hopefully tell us where those options are applied.

10

Since you have ZRAM enabled, you most likely set swappiness to 0 in one of these files:

  • /usr/lib/udev/rules.d/30-zram.rules
  • /etc/udev/rules.d/30-zram.rules
  • /etc overrules /usr/lib, both overrule any other typical sources of swappiness

The zram-generator.conf will be here, since the /etc one is absent:

  • /usr/lib/systemd/zram-generator.conf

It was “0” in above, changed to “150”

I guess it is working now

12

Double check with sysctl vm.swappiness (after a reboot since changing udev), if that returns 150 then all is good.

Yes, all good - thanks for the help!

14

We still wanted to see the file and its contents.

Same for any other related config files.

Or we can assume everything else is perfect and optimized for zram.

Though of course that files existence and configuration was not default and that setting had been changed .. and not in the usual way.

Lacking that though I guess I will point out this which shows the higher value suggestions for zram;

Glad you got it sorted.

Just so you know, 150 for swappiness might be higher than you want.
I think a lot of distros tended to default in the past at 100 or 60.
In comparison, I have 16 GiB of RAM and I used to set my swappiness to 10.
But I can’t remember the math, and I don’t know your system, so maybe 150 is just fine.

16

Please refer to the link supplied above..