4

I have a Lenovo T430 on which I've been running Ubuntu on since 2016. Recently I've experienced an increasing number of apparently random crashes where everything freezes indefinitely and nothing short a hard reboot has any effect.

The problem started when I was running Ubuntu 16.04 and persisted (or got slightly worse) after a fresh install of 20.04. I have replaced my RAM and hard drive with no improvement. (I've run BIOS, hard drive and RAM tests which showed no problem.)

Sometimes it runs fine for several days, however at other times it crashes multiple times in a row.

It happens very randomly, sometimes even when my computer is not in use, but most often with Firefox + YouTube and other video or JavaScript heavy applications. If audio is playing when it freezes, it continues playing the last half second over and over.

The only time it happens totally reliably is when trying to play a H.264 video in VLC. Other codecs play mostly fine. (I tried enabling VLC debug logging but nothing showed up for the task of playing the videos that crashed it.)

The only time that it reliably doesn't occur is when started in recovery mode. (Then playing the same video in VLC is no problem.) Ubuntu 20.04 also runs fine when booting from a USB drive.

I've spent hours looking at various logs without finding anything that seemed relevant.

  • CPU: Intel® CPU @ 2.60GHz × 4
  • BIOS version: G1ET17WW (0.17)
  • GPU: Intel HD Graphics 4000 (IVB GT2)
  • RAM: 11.6 GB
  • GNOME Version: 3.36.8
  • Windowing system: x11
  • Kernel: 5.8.0-44-generic

Here is various information that I've seen requested on other similar questions.

Results of swapon --show :

NAME      TYPE SIZE USED PRIO
/swapfile file   2G   0B   -2

Results of blkid :

/dev/sda2: LABEL="system" UUID="69efbbf3-98d7-4173-b6c7-e72136f35001" TYPE="ext4" PARTLABEL="system" PARTUUID="4aad3c63-c551-40ef-9d2f-ad79166be270"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="swap" UUID="b2a9ac94-dd4a-465b-8889-3e7ccb9af0af" TYPE="swap" PARTLABEL="swap" PARTUUID="9cb305f2-1f73-4bb7-8da6-42a6124c8ee7"
/dev/sda3: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="089D-C851" TYPE="vfat" PARTLABEL="efi" PARTUUID="180dac3f-322e-4023-a3c0-9bc4ed90a32b"
/dev/sdb: LABEL="fs-data" UUID="0199caea-12da-401a-bdf4-6b1cc96677d4" TYPE="ext4"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
/dev/loop21: TYPE="squashfs"
/dev/loop22: TYPE="squashfs"
/dev/loop23: TYPE="squashfs"
/dev/loop24: TYPE="squashfs"
/dev/loop25: TYPE="squashfs"
/dev/loop26: TYPE="squashfs"
/dev/loop27: TYPE="squashfs"
/dev/loop28: TYPE="squashfs"

Results of lshw -c video :

  *-display                
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:32 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:5000(size=64) memory:c0000-dffff

Results of fstab :

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=69efbbf3-98d7-4173-b6c7-e72136f35001 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation

 UUID=089D-C851  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
UUID=0199caea-12da-401a-bdf4-6b1cc96677d4 /media/fm/fs-data auto nosuid,nodev,nofail,x-gvfs-show 0 0

Update 1:

video section from lsmod (once 'size' and 'used by' values are removed the result is identical between recovery mode, USB boot and normal boot)

uvcvideo            
video               thinkpad_acpi,i915                                                                                                                                       
videobuf2_common    videobuf2_v4l2,uvcvideo                                                                                                                                  
videobuf2_memops    videobuf2_vmalloc                                                                                                                                        
videobuf2_v4l2      uvcvideo                                                                                                                                                 
videobuf2_vmalloc   uvcvideo                                                                                                                                                 
videodev            videobuf2_v4l2,uvcvideo,videobuf2_common

Update 2:

The problem does not occur after swapping my hard-drive into a different ThinkPad. This leads me to believe that it is a BIOS or hardware problem and not strictly caused by the kernel.

Update 3 with further details:

(These details are from using the same HDD/Ubuntu install in a different ThinkPad, while the original one is in therapy at the shop after a crash in the middle of an attempted BIOS update.)

The swapfile setup and kernel are the same, but the problem is mostly gone (though it still hangs occasionally) so I think issue is primarily hardware/BIOS related.

Results of swapon -s :

Filename                Type        Size    Used    Priority
/swapfile                               file        2097148 0   -2

Results of free -h :

              total        used        free      shared  buff/cache   available
Mem:          7.6Gi       3.1Gi       1.7Gi       810Mi       2.9Gi       3.5Gi
Swap:         2.0Gi          0B       2.0Gi

Results of fdisk -l :

Disk /dev/loop0: 162.48 MiB, 170360832 bytes, 332736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 161.4 MiB, 168857600 bytes, 329800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 138.77 MiB, 145489920 bytes, 284160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop3: 99.21 MiB, 104026112 bytes, 203176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop4: 55.39 MiB, 58073088 bytes, 113424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop5: 175.101 MiB, 184532992 bytes, 360416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop6: 161.42 MiB, 169254912 bytes, 330576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop7: 55.48 MiB, 58159104 bytes, 113592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 860 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 43B5902C-6EA9-4EB8-86AD-B643C582109B

Device        Start        End    Sectors  Size Type
/dev/sda1   1048576   49233919   48185344   23G Linux swap
/dev/sda2  49233920 1953523711 1904289792  908G Linux filesystem
/dev/sda3      2048    1048575    1046528  511M Microsoft basic data

Partition table entries are not in disk order.

Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000LM015-2E81
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/loop8: 98.36 MiB, 103129088 bytes, 201424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop9: 175.38 MiB, 183885824 bytes, 359152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop10: 175.37 MiB, 183881728 bytes, 359144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop11: 162.89 MiB, 170778624 bytes, 333552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop12: 64.79 MiB, 67915776 bytes, 132648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop13: 164.65 MiB, 172634112 bytes, 337176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop14: 51.2 MiB, 53501952 bytes, 104496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop15: 217.92 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop16: 64.36 MiB, 67477504 bytes, 131792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop17: 64.6 MiB, 67170304 bytes, 131192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop18: 32.28 MiB, 33845248 bytes, 66104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop19: 218.102 MiB, 229629952 bytes, 448496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop20: 31.9 MiB, 32595968 bytes, 63664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop21: 64.34 MiB, 67461120 bytes, 131760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop22: 164.65 MiB, 172630016 bytes, 337168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop23: 137.17 MiB, 143831040 bytes, 280920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop24: 20.45 MiB, 21434368 bytes, 41864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop25: 190.73 MiB, 199974912 bytes, 390576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop26: 175.101 MiB, 184532992 bytes, 360416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop27: 51.4 MiB, 53522432 bytes, 104536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop28: 20.5 MiB, 21487616 bytes, 41968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
8
  • Take a look at this solution which resolves a similar issue. There is apparently a problem within the 5.8-line kernel which is resolved in 5.11. The solution includes instructions on how to patch your system until 5.11 ships for the LTS (and/or 21.04 in a few weeks).
    – user1091774
    Feb 27, 2021 at 4:52
  • Your problem is that you're running with two swaps... one /swapfile, and one swap partition. Edit your question and show me free -h and swapon -s and sudo fdisk -l. Start comments to me with @heynnema or I'll miss them.
    – heynnema
    Mar 6, 2021 at 15:52
  • Thanks for looking at this @heynnema I have added the info you suggested and it seems clear that the swapfile isn't working. (And I don't know how to fix it!) But, I'm not sure how this relates to my comments about swapping the harddrive into a different machine.
    – SuprMan
    Mar 7, 2021 at 2:57
  • Please see my answer. If it's helpful, and helps to resolve the problem(s), please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks!
    – heynnema
    Mar 7, 2021 at 4:47
  • Does this answer your question? Ubuntu Bionic Beaver freezes randomly
    – Raffa
    Mar 7, 2021 at 9:32

3 Answers 3

1

The only time that it reliably doesn't occur is when started in recovery mode. (Then playing the same video in VLC is no problem.) Ubuntu 20.04 also runs fine when booting from USB drive.

That suggest to me a video driver problem, if my suspicions are correct and it uses just a basic generic driver for the recovery and install disk mode boots. Then on the installed to disk it uses a different driver specific to the intel video card, then the mystery is solved. Try using sudo lsmod and look for differences, on all them modes of booting, in the loaded modules.

2
  • I too am suspicious of the video driver. Strangely the output from lsmod seems to be the same for all lines that mention 'video'. I have added that section the question. If there are other. Is there some other way to look for possible video driver differences?
    – SuprMan
    Feb 27, 2021 at 6:17
  • Indeed they are the same, according to that link in the comment above it is the kernel that needs updating. The second answer has the procedure to upgrade to a new one with the fix in it. Who knows if the same as your problem but worth a try.
    – user1179897
    Feb 27, 2021 at 6:46
1

BIOS

Lenovo T430

bios-version: G1ET17WW (0.17)

You have a very old BIOS. A newer BIOS is available here or here.

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

Note: Have good backups before updating the BIOS.

/swapfile & swap partition /dev/sda1

You have both a 2G /swapfile, and a swap partition on /dev/sda1. Although swapon -s shows only the /swapfile being used, we need to change the /swapfile size to 4G for your configuration, and use gparted to delete the swap partition /dev/sda1.

Note: Incorrect use of the dd command 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 8G RAM and 4G swap

Edit /dev/fstab, use 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

And delete the leading space on this line...

UUID=089D-C851  /boot/efi       vfat    umask=0077      0       1

Save the file. Then...

reboot                    # reboot and verify operation

Then use gparted to delete /dev/sda1 swap partition.

Then reboot again.

Samsung SSD 860

Make sure the firmware is up to date. Use the Samsung Magician software which can be downloaded here.

memory size

You show your memory as... Memory: 11.6 GiB

But free -h shows your memory as... Mem: 7.6Gi

Which is accurate?

0

Installed ffmpeg which resolved this issue for me. https://linuxhint.com/install-ffmpeg-ubuntu/

1
  • A link only answer usually gets removed by the system. If that link has some info that will help it needs to be in the answer body not just a link.
    – David
    Oct 26, 2022 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .