Failed to start Manage swap spaces on zram, files and partitions..; ModuleNotFoundError: No module named 'sysv_ipc'

After updating Manjaro and during next boot, I have noticed failure to start swap.

systemctl status systemd-swap.service
sudo journalctl -rg swap

systemd[1]: Starting Manage swap spaces on zram, files and partitions…
systemd-swap[1122]: Traceback (most recent call last):
systemd-swap[1122]: File “/usr/bin/systemd-swap”, line 24, in
systemd-swap[1122]: import sysv_ipc
systemd-swap[1122]: ModuleNotFoundError: No module named ‘sysv_ipc’
systemd[1]: systemd-swap.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: systemd-swap.service: Failed with result ‘exit-code’.
systemd[1]: Failed to start Manage swap spaces on zram, files and partitions…

sudo modprobe sysv_ipc

modprobe: FATAL: Module sysv_ipc not found in directory /lib/modules/6.11.11-1-MANJARO

sudo lsmod|grep -E “ipc|sysv”

→ empty output

Python is missing sysv_ipc?

$ swapon;zramctl

→ empty output

Kernel: 6.11.11-1-MANJARO arch: x86_64

I doubt that this was the issue previously, so it is some system bug. Which commands to run please to fix this?

I can uninstall using “sudo pamac remove systemd-swap” and then install “sudo pamac install zram-generator” but question is how to configure it. When I have tried to “sudo cp /usr/share/doc/zram-generator/zram-generator.conf.example /etc/systemd/zram-generator.conf && systemctl daemon-reload && sudo systemctl start /dev/zram0” it failed “Job for dev-zram0.device timed out.” with no more detail in journalctl output.

UPDATE: this may work to rebuild the package as suggested by the reply below:

It looks like you are using this:

GitHub - nefelim4ag/systemd-swap: Script for creating hybrid swap space from zram swaps, swap files and swap partitions.

probably built from some AUR PKGBUILD which might no longer exist or the package needs to be rebuilt.

Just for info: I use zramswap - the github page gives another recommendation → zram-generator

/usr/bin/systemd-swap doesn’t exist in my system and is not in any package from the repos - the module sysv_ipc also doesn’t exist.

6 Likes

Hi. I was encountering the same error as you when I realized my swap file was not available anymore. Some I did some digging yesterday and I found out a few python modules had not been properly rebuilt when updating to the latest Python version (3.13). The problem comes from python-sysv_ipc package.

However, even when I rebuilt the package, it was not doing it correctly. I had to remove the source folder from pikaur’s cache (I use pikaur, you may use another one to manage AUR packages), otherwise it was using a previous configuration (3.12), thus installing the files in the wrong folder (/usr/lib/python3.12/site-packages/sysv_ipc). Make sure you build from a clean folder and you should be fine.

Unlisted until if/when the OP eventually responds.

Switch to some other tool to manage your zswap/zram - see my post.

There is no point in trying to keep using that now old tool that the OP probably used - and you as well, it seems.

3 Likes

OP abandoned the thread. :man_shrugging: