Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3200

Beginners Questions • [Solved] Problem with enabling / starting zram service

$
0
0
Hello Debians.
wanted to try using swap memory enhancing service called zram - but cant get it working properly i think.
I am having a bit of trouble enabling / starting zram service ,

loaded the module with - sudo modprobe zram

checked if it loaded correct - lsmod | grep zram
got the answer -
zram 40960 0
zsmalloc 28672 1 zram

created the servicefile zram.service in etc/systemd/system with -
[Unit] Description=ZRAM Swap Service [Service] Type=oneshot ExecStart=/sbin/modprobe zram ExecStart=/bin/bash -c "echo lz4 > /sys/block/zram0/comp_algorithm" ExecStart=/bin/bash -c "echo 2G > /sys/block/zram0/disksize" ExecStart=/sbin/mkswap /dev/zram0 ExecStart=/sbin/swapon /dev/zram0 [Install] WantedBy=multi-user.target

reloaded systemd to register the new service - sudo systemctl daemon-reload

activated service to make it autostart - sudo systemctl enable zram.service
but got this message - Failed to enable unit: File zram.service: Bad message

started the service - sudo systemctl start zram.service
but got this message - Failed to start zram.service: Unit zram.service failed to load properly, please adjust/correct and reload service manager: Bad message
See system logs and 'systemctl status zram.service' for details.

log entry:
08:50:49 sudo: lindis : TTY=pts/0 ; PWD=/home/lindis ; USER=root ; COMMAND=/usr/bin/systemctl start zram.service
08:47:13 sudo: lindis : TTY=pts/0 ; PWD=/home/lindis ; USER=root ; COMMAND=/usr/bin/systemctl enable zram.service
08:46:50 sudo: lindis : TTY=pts/0 ; PWD=/home/lindis ; USER=root ; COMMAND=/usr/bin/systemctl daemon-reload


tried to run to see to see if zram is active and used as swap - swapon --show
but got this message - zsh: command not found: swapon

So i guess that command is not available to use or not excisting.

Cant figure out what is not correct.

Code:

System:  Kernel: 6.1.0-30-amd64 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 Desktop: Cinnamon v: 5.6.8    tk: GTK v: 3.24.38 dm: GDM3 Distro: Debian GNU/Linux 12 (bookworm)Machine:  Type: Laptop System: GOOGLE product: Cyan v: 1.0 serial: <superuser required> Chassis: type: 9    serial: <superuser required>  Mobo: GOOGLE model: Cyan v: 1.0 serial: <superuser required> UEFI: coreboot    v: MrChromebox-2408.1 date: 09/14/2024Battery:  ID-1: BAT0 charge: 24.7 Wh (84.3%) condition: 29.3/40.5 Wh (72.3%) volts: 12.1 min: 11.6    model: SANYO AC15A3J serial: <filter> status: dischargingCPU:  Info: dual core model: Intel Celeron N3060 bits: 64 type: MCP arch: Airmont rev: 4 cache:    L1: 112 KiB L2: 2 MiB  Speed (MHz): avg: 1178 high: 1719 min/max: 480/2480 cores: 1: 1719 2: 637 bogomips: 6400  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmxGraphics:  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics    driver: i915 v: kernel arch: Gen-8 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2    bus-ID: 00:02.0 chip-ID: 8086:22b1  Device-2: Chicony HD WebCam type: USB driver: uvcvideo bus-ID: 1-4:2 chip-ID: 04f2:b490  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 driver: X: loaded: modesetting    unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0 screens: 1  Screen-1: 0 s-res: 1366x768 s-dpi: 96  Monitor-1: eDP-1 model: AU Optronics 0x405c res: 1366x768 dpi: 136 diag: 294mm (11.6")  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 400 (BSW) direct-render: YesAudio:  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:2284  API: ALSA v: k6.1.0-30-amd64 status: kernel-api  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: pluginNetwork:  Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel pcie: speed: 2.5 GT/s lanes: 1    bus-ID: 02:00.0 chip-ID: 8086:095a  IF: wlp2s0 state: up mac: <filter>Bluetooth:  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-5:3    chip-ID: 8087:0a2a  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2    sub-v: 1000Drives:  Local Storage: total: 58.84 GiB used: 28.29 GiB (48.1%)  ID-1: /dev/mmcblk0 vendor: HP model: DF4032 size: 29.12 GiB serial: <filter>  ID-2: /dev/mmcblk1 vendor: Silicon Motion model: SM32G size: 29.72 GiB serial: <filter>Partition:  ID-1: / size: 26.58 GiB used: 18.37 GiB (69.1%) fs: ext4 dev: /dev/dm-0    mapped: acer--mini--vg-root  ID-2: /boot size: 455.1 MiB used: 149.4 MiB (32.8%) fs: ext2 dev: /dev/mmcblk0p2  ID-3: /boot/efi size: 511 MiB used: 5.8 MiB (1.1%) fs: vfat dev: /dev/mmcblk0p1Swap:  ID-1: swap-1 type: partition size: 976 MiB used: 1.2 MiB (0.1%) priority: -2 dev: /dev/dm-1    mapped: acer--mini--vg-swap_1Sensors:  System Temperatures: cpu: 47.0 C mobo: N/A  Fan Speeds (RPM): N/ARepos:  Packages: 2120 pm: dpkg pkgs: 2090 pm: flatpak pkgs: 21 pm: snap pkgs: 9  Active apt repos in: /etc/apt/sources.list    1: deb http: //ftp.se.debian.org/debian/ bookworm main contrib non-free non-free-firmware    2: deb http: //deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware    3: deb http: //ftp.se.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware    4: deb http: //ftp.se.debian.org/debian/ bookworm-proposed-updates contrib non-free-firmware main non-free  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list    1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable mainInfo:  Processes: 218 Uptime: 1h 0m Memory: 3.77 GiB used: 2.1 GiB (55.8%) Init: systemd v: 252  target: graphical (5) default: graphical Compilers: gcc: 12.2.0 alt: 12 Client: Cinnamon v: 5.6.8  inxi: 3.3.26

Happy for any help. :)

Statistics: Posted by lindis68 — 2025-01-20 08:31 — Replies 9 — Views 176



Viewing all articles
Browse latest Browse all 3200

Trending Articles