How to: switch to swap and turn off ZRAM (Pop!_OS)
- User
How to: switch to swap and turn off ZRAM (Pop!_OS)
- Assistant
- User
leo@pop-os ~> swapon --show NAME TYPE SIZE USED PRIO /swapfile file 4G 0B -2 /dev/zram0 partition 7.7G 830.4M 1000 leo@pop-os ~>
- Assistant
The output you're seeing indicates that both a swap file and ZRAM are currently active on your Pop!_OS system. If your goal is to disable ZRAM completely and rely solely on the traditional swap file, you'll need to ensure ZRAM won't be used. It seems like the swap file is correctly set up, so we'll focus on ensuring ZRAM is disabled. Let's go through the steps once more to disable ZRAM and confirm it stays that way:
Reconfirm Disabling ZRAM
-
Stop All Swaps Temporarily:
Run this command to stop all swaps, clearing ZRAM temporarily:
-
- User
leo@pop-os ~> systemctl list-unit-files | grep zram pop-default-settings-zram.service enabled enabled
- Assistant
The output indicates that there's a
pop-default-settings-zram.servicewhich is enabled. This is what's initializing ZRAM on your system. To disable ZRAM and prevent it from being used upon reboot, you will need to disable this service. Here’s how you can do that:Disable the ZRAM Service
-
Disable the Service:
Run the following command to disable the
pop-default-settings-zram.service:bashsudo systemctl disable pop-default-settings-zram.serviceThis command prevents the ZRAM service from starting automatically at boot.
-
Stop the Service:
To stop the currently running ZRAM service without rebooting, use:
-
- User
Are you sure this will not murder my system?
- Assistant
Disabling ZRAM and switching to a swap file should not harm your system under normal circumstances, but it's important to understand the implications and ensure that your system configuration aligns with your workload requirements.