0

I had been using Lubuntu for quite a long period of time. I am having a moderate hardware in my computer. The older versions of Lubuntu were just fine. But the latest 20.04.1 LTS seems to have some sort of a bug as may a times it goes into some sort of memory overload.

I find the HDD usage light on my PC staying on continuously, then the PC gets slow and then ultimately it freezes. I do not have any options at that time than to restart my pc. It is quite annoying in the sense that I have to redo many of the works which were lost in this process.

It is not that I do heavy processes. I had seen this issue usually when my browser is on and at the same time suppose I am working on a document file (just writing texts on to .odt files or so) or writing a C program in gedit.( Just an example of the situation).

My pc configuration is as shown:

abhishek@abhishek:~$ neofetch
            .-/+oossssoo+/-.               abhishek@abhishek 
        `:+ssssssssssssssssss+:`           ----------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.1 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Kernel: 5.4.0-47-generic 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Uptime: 3 mins 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Packages: 2001 (dpkg) 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Shell: bash 5.0.17 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Resolution: 1280x1024 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   DE: LXQt 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Openbox 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM Theme: Lubuntu Arc 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Theme: Arc-Darker [GTK3] 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Icons: Adwaita [GTK3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Terminal: qterminal 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal Font: Ubuntu Mono 14 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel Core 2 Duo E7200 (2) @ 2.364GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: Intel 82945G/GZ 
      -+sssssssssssssssssyyyssss+-         Memory: 443MiB / 2984MiB 
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

abhishek@abhishek:~$

Apparently I found that the same issue is faced by few others as well. Here as well as here.

Now in the second question it is said that the system hangs in every 10-15 secs, but that is not the case in my system. The freeze occurs randomly. And for this answer here to the second question which is different from that of mine, the answer does not explain in detail what each command is supposed to do and the commands to revert back if incase it does not work.

I feel that this a bug in the os itself. What are the ways to overcome it?

Edit: Below is the output on running free -h

abhishek@abhishek:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          2.9Gi       671Mi       1.3Gi       141Mi       997Mi       2.0Gi
Swap:            0B          0B          0B
abhishek@abhishek:~$ 

However on running grep -i swap /etc/fstab I got no output.

abhishek@abhishek:~$ grep -i swap /etc/fstab
abhishek@abhishek:~$

The output of gparted

  • Do you have a swap file or partition? free will show you, and man mkswap swapon will show you how to create some. With your 3GiB of RAM, I'm unsure that old "1.5xRAM" still applies. – waltinator Sep 20 '20 at 15:53
  • Please elaborate. I am not accustomed to the commands – Abhishek Ghosh Sep 20 '20 at 16:47
  • Edit your question and show me (in the terminal) the free -h and grep -i swap /etc/fstab command outputs (use copy/paste, not screenshots), and I can make a better recommendation. Start comments to me with @heynnema or I'll miss them. – heynnema Sep 20 '20 at 19:31
  • Are you running Lubuntu or Ubuntu? – heynnema Sep 20 '20 at 19:39
  • @heynnema I am running Lubuntu and I have edited my answer with outputs of the commands as you asked.. – Abhishek Ghosh Sep 20 '20 at 20:11
  • @AbhishekGhosh You have no swap! Go ahead and do my answer. Report back. – heynnema Sep 20 '20 at 20:47
  • 1
  • 1
    You haven't allocated a lot of disk space to Lubuntu; and Lubuntu will use swapfiles . The recommended minimum is 25GB for Ubuntu desktop https://help.ubuntu.com/community/Installation/SystemRequirements, lighter flavors like Lubuntu reduce RAM & cpu cycle requirements, but don't reduce disk space suggestions. Free space is required come release-upgrade time, and if you don't intend adding apps, will clean install instead of upgrade, smaller space can be used (as blogs often recommend), but it's 25gb recommended for a reason. – guiverc Sep 20 '20 at 22:28

1 Answers1

2

You have no swap!

~$ free -h

              total        used        free      shared  buff/cache   available
Mem:          2.9Gi       671Mi       1.3Gi       141Mi       997Mi       2.0Gi
Swap:            0B          0B          0B

Let's create a /swapfile...

Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.

In the terminal...

Note: instructions reduced from a 4G, to a 1G /swapfile, due to disk space issues.

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=1024

sudo chmod 600 /swapfile # set proper file protections sudo mkswap /swapfile # init /swapfile sudo swapon /swapfile # turn on swap free -h # confirm 3G RAM and 1G swap

Add this /swapfile line at the end of /etc/fstab... and confirm no other “swap” lines...

To edit, use sudo -H gedit /etc/fstab or sudo pico /etc/fstab

/swapfile    none    swap    sw      0   0

reboot                    # reboot and verify operation
heynnema
  • 70,711
  • I am having dual boot on the system. And the Lubuntu partion is 16 GiB and currently 2.9 GiB is the free space available on the partition. So what to do. – Abhishek Ghosh Sep 20 '20 at 21:05
  • 1
    @AbhishekGhosh That can also cause your problem. Not enough space allocated to Lubuntu. You'll need to repartition by reducing your Windows partition and increasing your Lubuntu partition. Edit your question with a screenshot of gparted and I'll take a look for you. – heynnema Sep 20 '20 at 21:10
  • 1
    @AbhishekGhosh I've modified my answer to accommodate your disk space requirements. However, know that your disk is full, and you still need to delete/backup some stuff off of the disk, and then repartition, to give Lubuntu a larger partition. Do my answer now. – heynnema Sep 20 '20 at 21:25