Page 1 of 1
Swap Partition or file and where?
Posted: Thu Feb 20, 2025 6:42 pm
by JesusLinux
Hello,
Just some general advice here:
I'm planning on installing MX Linux on another laptop.
This machine has on 120GB SSD and a 500GB HDD also 8GB RAM.
It has Win10 currently installed. Still don't know if I want to dual boot with MX Linux or ditch Win 10 completely.
Since the SSD is not that big, should I have a Swap Partition or Swap File?
And for performance where should it be located? On SSD or HDD?
The other laptops that I have MXL installed I only have one SSD with swap partition.
So check if this is ok:
120GB SSD:
/boot.efi - 200MB or 500MB?
/root - 111 GB (average)
/swap partition - 8GB (same has RAM)?
500GB HDD:
/home - most of the space
/swap partition 8 GB?
Thanks for any advice...
Re: Swap Partition or file and where?
Posted: Thu Feb 20, 2025 6:53 pm
by j2mcgreg
MX requires some type of swap space because a number of our applications expect it to be in place and may crash when it's absent. In normal operation it likely will never be used, but it has to be there. Under these conditions, I think that for most users a swap file is sufficient.
Re: Swap Partition or file and where?
Posted: Thu Feb 20, 2025 6:56 pm
by CharlesV
You are going to hear LOTS of differences on this one :-)
My two cents...
- Definitely on the SSD
- Personally, with that size ssd... I would do a file. (ie you can easily decrease / increase size if you need more or want to experiment!
- Size is going to matter as to what / how your going to run. With 8gb of ram, if your doing anything 'real' with images, videos, VM's.. then you will need more... and it will come from the swap. I would suggest starting with an 8gb of ram. ( almost twice that if your going to hibernate! )
Exp: My 'normal operating' means I have around 12gb in use. ( 4 to 12gb is my 'normal usage' ) .. but if I get really busy or video editing.. then it is pretty easy for me to gobble up 16 to 20gb)
Re: Swap Partition or file and where?
Posted: Thu Feb 20, 2025 7:37 pm
by JesusLinux
CharlesV wrote: Thu Feb 20, 2025 6:56 pm
You are going to hear LOTS of differences on this one :-)
My two cents...
- Definitely on the SSD
- Personally, with that size ssd... I would do a file. (ie you can easily decrease / increase size if you need more or want to experiment!
- Size is going to matter as to what / how your going to run. With 8gb of ram, if your doing anything 'real' with images, videos, VM's.. then you will need more... and it will come from the swap. I would suggest starting with an 8gb of ram. ( almost twice that if your going to hibernate! )
Exp: My 'normal operating' means I have around 12gb in use. ( 4 to 12gb is my 'normal usage' ) .. but if I get really busy or video editing.. then it is pretty easy for me to gobble up 16 to 20gb)
I don't use hibernate ever.
This laptop is old from around 2011. My oldest laptop is from 2007 (running MX with 3 GB RAM and 6GB Swap partition), my newest is from 2017 with 16 GB RAM running Win10.
I have 5 laptops 2 of them are running MX. The other 3 I plan to install MX. On my newest laptop I intend to upgrade to W11 (the "unsupported way" because of CPU) if I can or ditch it entirely.
These laptops some have SSD+HDD some only SSD.
All my linux installations I've used swap partition. Never swap file.
I'm a casual user browsing web, streaming apps 99%. I don't use heavy stuff on image/sound editing. And no games. Still playing on PS3 lol.
Re: Swap Partition or file and where?
Posted: Thu Feb 20, 2025 11:13 pm
by Pierre
the Swap Partition is the traditional way.
however, an swap file is easier to adjust - size wise.
you do need an swap area that is at least equal in size to the PCs memory,
- if you plan to use hibernation at all.
my PCs do seem to be using the traditional methods
- of separate partitions for / home, /swap, /root, etc etc
Re: Swap Partition or file and where?
Posted: Thu Feb 20, 2025 11:33 pm
by DukeComposed
JesusLinux wrote: Thu Feb 20, 2025 7:37 pm
CharlesV wrote: Thu Feb 20, 2025 6:56 pm
You are going to hear LOTS of differences on this one :-)
I don't use hibernate ever.
This laptop is old from around 2011. My oldest laptop is from 2007 (running MX with 3 GB RAM and 6GB Swap partition), my newest is from 2017 with 16 GB RAM running Win10.
I'll side with Charles on this one and say that swap advice is a very diverse, and divisive, subject. I'll stop short of calling it a holy war, but ordinary folks get strangely attached to their swap opinions in ways that just don't happen with Linux kernel schedulers.
I'll try to stick to the facts.
It's a fact that swap files are easier to resize than swap partitions. This comes from the fact that partitions exist in a partition table and swap files exist within existing partitions. If you make a 500 MB swap partition and decide later on you want 1 GB of swap, you will probably need to move partitions around and shrink the space you're already allocated, if you can[0]. If you have a 500 MB swap file and you want to make it a 1 GB swap file, you just delete the one file and make a bigger one.
If you do not hibernate, you don't need the 1x, 1.5x, or 2x total system DRAM swap suggestions. Gigantic swap files are for people who hibernate because hibernation quickly dumps system memory to disk so you can unthaw the system faster. If you never hibernate, you can probably get away with a modestly-sized swap file. On a machine with 16 GB of DRAM I have a swap dataset[1] of 512 GB and performance is fine. Granted, I don't do a lot of real-time weather system modeling, password cracking, or high-end gaming, but 1/32nd of my total DRAM is a good ratio for swap in order for me to avoid system lock ups while not wasting huge swaths of disk space I'll never actually use. According to htop, this laptop's been on for 41 minutes using terminal, Thunar, and Remmina and it's still at zero bytes of swap used. Not even starting my bespoke Emacs[2] config makes that number budge.
And that's the weird thing about swap space. You almost never need it. But on those rare occasions you need some, boy do you ever need it. You may not need much, but when you need it, you need it.
So your choices are these:
- Set your swap space for, say, 512 MB and forget about it until it becomes a problem
- Set your swap space for, say, 1 GB and forget about it until it becomes a problem
- Set your swap space for, say, 2 GB and forget about it until it becomes a problem
- Et cetera
You can worry about optimizing this and finding that one perfect, magical number or you can make a decision you're comfortable with today and, as long as it's not 0 bytes of swap, you can always revisit the situation later. Either with a lot of effort using partitions or a lot less effort using files.
[0] XFS is a common Linux file system that does not permit shrinking. If you make a 1 GB XFS file system, you can grow it to 2 GB, but you cannot make it 999 MB or smaller. You'd have to copy the data off of the partition, delete it, and recreate a new, smaller XFS partition. Then you'd have to copy the data back.
[1] It's not quite a file. It's not quite a partition. It's ZFS.
[2] Emacs has been fairly called "Eighty Megs And Constantly Swapping" by fans and detractors alike. These days it's closer to 800.
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 1:36 am
by Eadwine Rose
"and forget about it until it becomes a problem" <-- to me that IS a problem, 'cause I would not sit easy with that. But YMMV of course.
That swap partition is easiest, and if it is big enough (I have 8gb, I don't use hybernate or stuff like that, all is fine) it will never become a problem.
My harddrive is 500Gb, before that had 250gb. My partitions are like so:
500mb efi
80gb root (40 on the 250 drive)
8Gb swap
the rest is home
Standard user here, nothing fancy, been using this install for quite a while now. 1mb in use on the efi, 26gb used on root, nothing on swap that I have ever seen, and the home has about 1/3rd in use.
Just my 2 cts.

Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 2:31 am
by AK-47
One thing to be mindful of is security. Swap files store the raw contents of your memory in disk, which could leak keys and such that have not been cleared by applications upon exit (either due to bugs, or due to them crashing, etc). Normally keys tend to be stored in special memory which the kernel marks as non-swappable, but there are a variety of reasons that this may not be the case.
If you are concerned about this (and this especially is important for SSD users as it is impossible to erase just the swap file with 100% certainty), you should look into zram, which needs no swap file. Fedora has this enabled by default, and it actually works extremely well, due to the excellent compressibility (even with a mediocre algorithm) of raw memory content. Especially with hibernation, where even the special non-swappable memory will get swapped out.
You are better off making your root partition 20GB and let MX create the swap file there. On a modern system there should be negligible difference in performance, if your system swaps so often as for that to be noticeable, you need to download more RAM.
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 3:38 am
by rambo919
I have experience with the OS slowing down to a crawl because the /swap was not on an SSD. It does not always use it but when it does it wants speed over space.
I don't even remember what the problems were but I had headaches when I used a swapfile instead of a /swap partition... maybe those are fixed now I dunno.
At the end of the day its best even if you dont want to to either experiment or just do what feels easiest or best.
Another thing to consider though is if the firmware does not already do so you might wanna leave 10-20% of the SSD capacity un-allocated to any partition, this provisioning prevents it from getting so full it starts to damage it. SSD's (especially the early one's) are flakey like this.
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 3:09 pm
by JesusLinux
rambo919 wrote: Fri Feb 21, 2025 3:38 am
I have experience with the OS slowing down to a crawl because the /swap was not on an SSD. It does not always use it but when it does it wants speed over space.
I don't even remember what the problems were but I had headaches when I used a swapfile instead of a /swap partition... maybe those are fixed now I dunno.
At the end of the day its best even if you dont want to to either experiment or just do what feels easiest or best.
Another thing to consider though is if the firmware does not already do so you might wanna leave 10-20% of the SSD capacity un-allocated to any partition, this provisioning prevents it from getting so full it starts to damage it. SSD's (especially the early one's) are flakey like this.
That's my concern.
I want the best performance possible. And putting Swap Partition on HDD may slow down the system.
Also I have been reading about swap partition location on SSD has excessive wear on the storage...
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 3:12 pm
by JesusLinux
Eadwine Rose wrote: Fri Feb 21, 2025 1:36 am
"and forget about it until it becomes a problem" <-- to me that IS a problem, 'cause I would not sit easy with that. But YMMV of course.
That swap partition is easiest, and if it is big enough (I have 8gb, I don't use hybernate or stuff like that, all is fine) it will never become a problem.
My harddrive is 500Gb, before that had 250gb. My partitions are like so:
500mb efi
80gb root (40 on the 250 drive)
8Gb swap
the rest is home
Standard user here, nothing fancy, been using this install for quite a while now. 1mb in use on the efi, 26gb used on root, nothing on swap that I have ever seen, and the home has about 1/3rd in use.
Just my 2 cts.
The setup I have in mind is about that.
But I put /home on 500GB HDD.
All the other partitions on 120GB SSD including 8GB swap.
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 3:23 pm
by Eadwine Rose
Never used two drives to install on, interesting. Good luck on the endeavor!
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 5:37 pm
by AK-47
One drive for system and one for home is a sensible choice for safety. Also now you can get 1TB SSDs for a reasonable price.
If you are swapping on so regularly it is affecting your performance as to need it to be on an SSD, you could either get more RAM or have a look at the swappiness setting:
Code: Select all
$ sysctl vm.swappiness
vm.swappiness = 15
$ sudo sysctl vm.swappiness = 0
The lower this value, the more expensive the kernel assumes the swap is. Zero means don't swap until the physical memory is exhausted.
https://github.com/torvalds/linux/blob/ ... ctl/vm.rst
The gods of Linux documentation wrote:This control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.
Keep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap's random IO. An optimal value will require experimentation and will also be workload-dependent.
The default value is 60.
For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).
At 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.
To make it permanent, add the line to /etc/sysctl.conf:
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 7:12 pm
by JesusLinux
AK-47 wrote: Fri Feb 21, 2025 5:37 pm
One drive for system and one for home is a sensible choice for safety. Also now you can get 1TB SSDs for a reasonable price.
If you are swapping on so regularly it is affecting your performance as to need it to be on an SSD, you could either get more RAM or have a look at the swappiness setting:
Code: Select all
$ sysctl vm.swappiness
vm.swappiness = 15
$ sudo sysctl vm.swappiness = 0
The lower this value, the more expensive the kernel assumes the swap is. Zero means don't swap until the physical memory is exhausted.
https://github.com/torvalds/linux/blob/ ... ctl/vm.rst
The gods of Linux documentation wrote:This control is used to define the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200. At 100, the VM assumes equal IO cost and will thus apply memory pressure to the page cache and swap-backed pages equally; lower values signify more expensive swap IO, higher values indicates cheaper.
Keep in mind that filesystem IO patterns under memory pressure tend to be more efficient than swap's random IO. An optimal value will require experimentation and will also be workload-dependent.
The default value is 60.
For in-memory swap, like zram or zswap, as well as hybrid setups that have swap on faster devices than the filesystem, values beyond 100 can be considered. For example, if the random IO against the swap device is on average 2x faster than IO from the filesystem, swappiness should be 133 (x + 2x = 200, 2x = 133.33).
At 0, the kernel will not initiate swap until the amount of free and file-backed pages is less than the high watermark in a zone.
To make it permanent, add the line to /etc/sysctl.conf:
I think my "swappines" is set to 10 on the other machines.
The RAM on my laptops is at max capacity.
Since these machines are old buying a larger SSD is out of the question since for 4 out of my 5 laptops are pre 2015. A larger SSD is worth much more than the laptops.
That's why I bought the cheapest Kingston SSD...
Re: Swap Partition or file and where?
Posted: Fri Feb 21, 2025 10:40 pm
by AK-47
@JesusLinux Let's see what you are working with here. Can you please run the Quick System Info utility on the machine you are trying to set up and post the QSI report to the forum.
Re: Swap Partition or file and where?
Posted: Sat Feb 22, 2025 1:36 am
by Pierre
another thought is, that I;ve usually set an Swap Partition . .
- to either 2Gb or to 4Gb in size -
and yet have Never seen any use-age above ~800 Gb in System Monitor.
Re: Swap Partition or file and where?
Posted: Sat Feb 22, 2025 4:28 pm
by JesusLinux
AK-47 wrote: Fri Feb 21, 2025 10:40 pm
@JesusLinux Let's see what you are working with here. Can you please run the Quick System Info utility on the machine you are trying to set up and post the QSI report to the forum.
Code: Select all
Snapshot created on: 20250202_2320
System:
Kernel: 6.1.0-28-amd64 [6.1.119-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: lang=en_US
kbd=pt tz=Europe/Lisbon
Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
dm: LightDM v: 1.32.0 Distro: MX-23.3_x64 Libretto August 15 2024 base: Debian GNU/Linux 12
(bookworm)
Machine:
Type: Laptop System: Hewlett-Packard product: HP Pavilion g6 Notebook PC
v: 0791100000205610000620100 serial: <superuser required> Chassis: type: 10
serial: <superuser required>
Mobo: Hewlett-Packard model: 1840 v: 56.32 serial: <superuser required> UEFI-[Legacy]: Insyde
v: F.27 date: 09/07/2016
CPU:
Info: model: Intel Pentium B970 bits: 64 type: MCP arch: Sandy Bridge level: v2 built: 2010-12
process: Intel 32nm family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x28
Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
L2: 512 KiB desc: 2x256 KiB L3: 2 MiB desc: 1x2 MiB
Speed (MHz): avg: 846 high: 894 min/max: 800/2300 scaling: driver: intel_cpufreq
governor: ondemand cores: 1: 894 2: 798 bogomips: 9179
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities:
Type: gather_data_sampling status: Not affected
Type: itlb_multihit status: KVM: VMX unsupported
Type: l1tf mitigation: PTE Inversion
Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: reg_file_data_sampling status: Not affected
Type: retbleed status: Not affected
Type: spec_rstack_overflow status: Not affected
Type: spec_store_bypass status: Vulnerable
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling; PBRSB-eIBRS: Not
affected; BHI: Not affected
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard
driver: i915 v: kernel arch: Gen-6 code: Sandybridge process: Intel 32nm built: 2011 ports:
active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0106 class-ID: 0300
Device-2: AMD Thames [Radeon HD 7500M/7600M Series] vendor: Hewlett-Packard driver: N/A
alternate: radeon, amdgpu arch: TeraScale-2 code: Evergreen process: TSMC 32-40nm built: 2009-15
pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6840
class-ID: 0300
Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 362x204mm (14.25x8.03") s-diag: 416mm (16.36")
Monitor-1: LVDS-1 model: LG Display 0x02f2 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: OpenGL v: 3.3 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 2000 (SNB GT1)
direct-render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 7
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 class-ID: 0403
API: ALSA v: k6.1.0-28-amd64 status: kernel-api tools: alsamixer,amixer
Server-1: PipeWire v: 1.0.0 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: Ralink vendor: Hewlett-Packard driver: rt2800pci v: 2.3.0 modules: wl pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 07:00.0 chip-ID: 1814:539a class-ID: 0280
IF: wlan0 state: up mac: <filter>
Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 08:00.0 chip-ID: 10ec:8136
class-ID: 0200
IF: eth0 state: down mac: <filter>
Drives:
Local Storage: total: 747.93 GiB used: 0 KiB (0.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HTS545050A7E380 size: 465.76 GiB block-size:
physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: A7A0
scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37240G size: 223.57 GiB block-size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 1103 scheme: MBR
ID-3: /dev/sdc maj-min: 8:32 type: USB model: N/A size: 58.59 GiB block-size: physical: 512 B
logical: 512 B type: N/A serial: <filter> rev: 2.00 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
Message: No partition data found.
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 51.0 C mobo: N/A
Fan Speeds (RPM): N/A
Repos:
Packages: 2291 pm: dpkg pkgs: 2282 libs: 1159
tools: apt,apt-get,aptitude,gnome-software,nala,synaptic pm: rpm pkgs: 0 pm: flatpak pkgs: 9
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb https://ftp.rnl.tecnico.ulisboa.pt/pub/mxlinux-packages/mx/repo/ bookworm main non-free
Active apt repos in: /etc/apt/sources.list.d/spotify.list
1: deb http://repository.spotify.com stable non-free
Info:
Processes: 216 Uptime: 5m wakeups: 2 Memory: 7.65 GiB used: 2.12 GiB (27.7%) Init: SysVinit
v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
Video Tweaks:
Detected possible Hybrid Graphics
I'm running this session live from a USB snapshot from other laptop. I want to use this installation snapshot.
I managed to upgrade from Win 10 to Win 11 on this machine and it's fine so far. Slower compared to W10.
I want to dual boot W11 with MX Linux.
In case W11 goes crazy I delete it.
This snapshot is from a laptop with only one SSD. So /root and /home are in the same partition.
Re: Swap Partition or file and where?
Posted: Sat Feb 22, 2025 5:30 pm
by JesusLinux
Pierre wrote: Sat Feb 22, 2025 1:36 am
another thought is, that I;ve usually set an Swap Partition . .
- to either 2Gb or to 4Gb in size -
and yet have Never seen any use-age above ~800 Gb in System Monitor.
In an old laptop with only 3GB RAM I have 6 GB Swap partition.
On a laptop with 8GB RAM I have 8 GB Swap partition...
Both only have one SSD drive.
Re: Swap Partition or file and where?
Posted: Sat Feb 22, 2025 11:30 pm
by JesusLinux
Ok, I installed MX on dual-boot with Win11.
I can boot on both OSes however MX Linux is booting in init instead of systemd so I can't use sudo for upgrades and basic commands.
What is going on?
Here's the info:
Code: Select all
jesuslinux@B-970:~
$ sudo apt update && apt upgrade && flatpak upgrade
[sudo] password for jesuslinux:
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 3787 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
jesuslinux@B-970:~
$ sudo apt-get update && apt-get upgrade && flatpak upgrade
Hit:1 http://deb.debian.org/debian bookworm-updates InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo bookworm InRelease
Hit:6 http://repository.spotify.com stable InRelease
Reading package lists... Done
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
jesuslinux@B-970:~
$ ps -p 1 -o comm=
init
System info:
Code: Select all
Snapshot created on: 20250202_2320
System:
Kernel: 6.1.0-30-amd64 [6.1.124-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-30-amd64 root=UUID=<filter> ro quiet splash
Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
dm: LightDM v: 1.32.0 Distro: MX-23.3_x64 Libretto August 15 2024 base: Debian GNU/Linux 12
(bookworm)
Machine:
Type: Laptop System: Hewlett-Packard product: HP Pavilion g6 Notebook PC
v: 0791100000205610000620100 serial: <superuser required> Chassis: type: 10
serial: <superuser required>
Mobo: Hewlett-Packard model: 1840 v: 56.32 serial: <superuser required> UEFI-[Legacy]: Insyde
v: F.27 date: 09/07/2016
CPU:
Info: model: Intel Pentium B970 bits: 64 type: MCP arch: Sandy Bridge level: v2 built: 2010-12
process: Intel 32nm family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB
L2: 512 KiB desc: 2x256 KiB L3: 2 MiB desc: 1x2 MiB
Speed (MHz): avg: 2295 min/max: 800/2300 scaling: driver: intel_cpufreq governor: ondemand
cores: 1: 2295 2: 2295 bogomips: 9179
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities:
Type: gather_data_sampling status: Not affected
Type: itlb_multihit status: KVM: VMX unsupported
Type: l1tf mitigation: PTE Inversion
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: reg_file_data_sampling status: Not affected
Type: retbleed status: Not affected
Type: spec_rstack_overflow status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW; STIBP: disabled; RSB
filling; PBRSB-eIBRS: Not affected; BHI: Not affected
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard
driver: i915 v: kernel arch: Gen-6 code: Sandybridge process: Intel 32nm built: 2011 ports:
active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0106 class-ID: 0300
Device-2: AMD Thames [Radeon HD 7500M/7600M Series] vendor: Hewlett-Packard driver: N/A
alternate: radeon, amdgpu arch: TeraScale-2 code: Evergreen process: TSMC 32-40nm built: 2009-15
pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6840
class-ID: 0300
Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 362x204mm (14.25x8.03") s-diag: 416mm (16.36")
Monitor-1: LVDS-1 model: LG Display 0x02f2 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: OpenGL v: 3.3 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 2000 (SNB GT1)
direct-render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 7
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 class-ID: 0403
API: ALSA v: k6.1.0-30-amd64 status: kernel-api tools: alsamixer,amixer
Server-1: PipeWire v: 1.0.0 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: Ralink vendor: Hewlett-Packard driver: rt2800pci v: 2.3.0 modules: wl pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 07:00.0 chip-ID: 1814:539a class-ID: 0280
IF: wlan0 state: up mac: <filter>
Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 08:00.0 chip-ID: 10ec:8136
class-ID: 0200
IF: eth0 state: down mac: <filter>
Drives:
Local Storage: total: 689.33 GiB used: 17.14 GiB (2.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G size: 223.57 GiB block-size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 1103 scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: Hitachi model: HTS545050A7E380 size: 465.76 GiB
block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter>
rev: A7A0 scheme: GPT
Partition:
ID-1: / raw-size: 69.34 GiB size: 67.7 GiB (97.64%) used: 10.93 GiB (16.1%) fs: ext4
dev: /dev/sda6 maj-min: 8:6
ID-2: /boot/efi raw-size: 200 MiB size: 196.9 MiB (98.44%) used: 1 KiB (0.0%) fs: vfat
dev: /dev/sda5 maj-min: 8:5
ID-3: /home raw-size: 195.31 GiB size: 191.19 GiB (97.89%) used: 6.21 GiB (3.2%) fs: ext4
dev: /dev/sdb2 maj-min: 8:18
Swap:
Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 8.59 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda7
maj-min: 8:7
Sensors:
System Temperatures: cpu: 53.0 C mobo: N/A
Fan Speeds (RPM): N/A
Repos:
Packages: 2291 pm: dpkg pkgs: 2282 libs: 1159
tools: apt,apt-get,aptitude,gnome-software,nala,synaptic pm: rpm pkgs: 0 pm: flatpak pkgs: 9
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb https://mirrors.ocf.berkeley.edu/mx-packages/mx/repo/ bookworm main non-free
Active apt repos in: /etc/apt/sources.list.d/spotify.list
1: deb http://repository.spotify.com stable non-free
Info:
Processes: 203 Uptime: 14m wakeups: 2 Memory: 7.65 GiB used: 2.11 GiB (27.6%) Init: SysVinit
v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
Re: Swap Partition or file and where?
Posted: Sat Feb 22, 2025 11:45 pm
by AK-47
Consider doing a system update (should update the kernel) and then enabling zramswap using the MX Service Manager.
If you want, you can increase the maximum allowable usage to 50% by editing /etc/default/zramswap and setting PERCENT=50 (remove the '#' preceding it). This is a percentage of your RAM that can be stored on the swap (the uncompressed contents, not the compressed one).