Score:0

My Ubuntu freezes everytime there's an update

za flag

Whenever there's a new update, my Ubuntu freezes and doesn't respond to anything.

The only thing that works is REISUB.

I hate to have to restart the machine because I setup my development environment and lose my browser tabs and other stuff.

A little history, I had installed nVidia drivers before and they consumed the battery because the GPU was constantly in use. After removing the drivers, the computer has always stayed quiet. I would usually get frozen whenever I opened anything that used graphics.

Now that issue is gone and I'm stuck with this one.

How can I solve this?

  • Ubuntu 20.04.2 LTS
  • Asus ROG FX 503VD
  • i5 7th gen

--- EDIT ---

enter image description here free -h

Rest of commands enter image description here

Graphics Driver Info (Not Installed) GTX 1050 Mobile

enter image description here

heynnema avatar
ru flag
Edit your question and show me `free -h` and `sysctl vm.swappiness` and `swapon -s` and `sudo dmidecode -s bios-version`. Start comments to me with @heynnema or I'll miss them.
chx101 avatar
za flag
@heynnema Done.
heynnema avatar
ru flag
Please see my initial answer. Report back.
Score:1
ru flag

BIOS

You have BIOS version FX503VD.308. Version 310 is available to download here.

Note: Confirm that I have the correct web page for your model #.

Note: Have good backups before updating the BIOS.

SWAP

Your /swapfile is too small at 2G. Let's increase it to 4G...

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

In the terminal...

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

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

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

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

NVIDIA

Not having Nvidia drivers installed means that you'll never get to properly use the advanced features of that video subsystem.

Tell me the model # of your video card, and let's look at what version driver is available.

Once installed, you can then switch between the desired video subsystem.

What version drivers appear in `Software & Updates?

chx101 avatar
za flag
BIOS+Swap changes successfully configured. However, I'm still unsure whether that will fix/has fixed the issue since I cannot reproduce it as it happens spontaneously when updates are available. And I've now noticed the fan is going crazy after updating the BIOS. :/
heynnema avatar
ru flag
@chx101 Install `freon` or `vitals` gnome-shell extensions and take a look at your temps. If you need to go back to .308 it can be downloaded at https://dlcdnets.asus.com/pub/ASUS/GamingNB/FX503VD/FX503VDAS308.zip. You could also contact asus support for help.
chx101 avatar
za flag
Hmm. After multiple reboots. It has simmered down. Although I did notice that the update enabled Secure Boot, which affected VirtualBox. But it seems to be ok now. BTW, I posted a picture of the Nvidia driver details in the question
heynnema avatar
ru flag
@chx101 With a new BIOS, you may have to set the BIOS "back to defaults" to assure that everything is right, and then go back and change any individual items, like Secure Boot, to your requirements. Any reason that you're not running a Nvidia driver?
chx101 avatar
za flag
The laptop initially came with Windows 10 and as a developer, it was irritating to have to setup my environment every time because of the forced stubborn Windows Updates that would restart my computer without my consent. So I switched to Linux (ZorinOS then Ubuntu). The reason for switching was because I thought ZorinOS did not properly handle the nVidia drivers since Windows comes with optimized drivers. The GPU I guess was in constant use and the fan was always loud and the whole computer was also always hot. It wasn't until a short time ago that I realized the whole time it was the drivers
chx101 avatar
za flag
After I removed all the nVidia drivers the battery has been able to last longer than before and no more overheating and loud fan noises. I didn't know how to fix it so I just left it there.
heynnema avatar
ru flag
@chx101 With Nvidia drivers installed, you can then switch between the normal internal video, and the higher-performance Nvidia, as desired/needed. Sounds like you were always in Nvidia mode. I totally agree about Windows updates!
chx101 avatar
za flag
For now, I'll accept it because I will most likely forget to get back here. I'll wait around and see if it does freeze again.
chx101 avatar
za flag
Does suspending increasing memory+swap usage? I found 15/16 GB used and 4GB/4GB swapusage. Wth?
heynnema avatar
ru flag
@chx101 No it shouldn't. You can try using the `free -h` command before/after suspending and see if it changes the used values. Otherwise use the `top` command to try and check for processes taking a lot of memory. What are you running on this computer? Bitcoin mining, or something else? You may have to increase your swap to 8G.
chx101 avatar
za flag
Yup. It froze again after coming from suspension. Upon restart, there was an update. So I'm not sure it was because of the update or suspension. :/. It's strange really,
heynnema avatar
ru flag
@chx101 Have you been using the `free -h` and `top` commands to monitor memory/swap usage? Did you install Nvidia drivers? You haven't told me what applications you use.
chx101 avatar
za flag
I only run Chrome, Firefox, IntelliJ, Skype. That's it. And I have not installed the drivers yet. So, obviously instances of Chrome + Firefox eat up a lot (most of the) RAM. But the computer rarely froze until I resumed from suspension, to the same state. And it happens when I least expect it hahah so I have no time to run ``htop``
chx101 avatar
za flag
Please also see this: https://imgur.com/5nz10Z2
heynnema avatar
ru flag
@chx101 Stop all running apps, to include Firefox/Chrome/Skype, and try to suspend/resume. Was your `htop` done when the system was running OK, or sometime close to, or at resume? I prefer to see `top` over `htop`. Funny enough it looks like your swap is not being used. Show me `cat /etc/fstab`.
chx101 avatar
za flag
*Was your htop done when the system was running OK, or sometime close to, or at resume?* Done as in...? I just leave it open and monitor the usage. It's always in the red range after some time (Open browser tabs, etc). Swap file gets in on the work once RAM usage is around 90%. So, in that screenshot above, that was after a restart. Also, I use the laptop for personal and work so I wish there was a better way instead of having to restart it.
heynnema avatar
ru flag
@chx101 Did you try my suggestion and see if suspend/resume works if there are no apps running?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.