3

Please, keep in mind that I've just recently started using Linux - Ubuntu as my OS, so if you need anything else related to information of PC/System etc..., please ask me and I will update the question with required info. Thanks in advance!


Problem:

This is one of the scenarios that happens to me and it's pretty much common:

If I open browser (no matter if it's Mozilla or any other browser), but I am currently using Brave browser, and I go on youtube and watch video / play music. After some time, my laptop which is running Ubuntu 20.04 - (I'll post more detailed info on system later on in this post) - randomly freezes and starts playing sound from that youtube video in a loop (So, I hear the sound from the video on youtube that was playing, to be more precise, the last 2/3 of a second of that video).

So when that happens laptop becomes completely unresponsive to any key komands and also mouse freezes. After that happen I have to shut down everything with the Power Off button located on my laptop.


Question: Does anyone know how to solve this problem or why's this happening and is there a way of fixing this?

id: 
str1ng
description:    Notebook
product:    HP Pavilion dv8 Notebook PC (VL131EA#UUZ)
vendor: Hewlett-Packard
version:    039D200000241220001020000
serial: CNF94387ZG
width:  64 bits
capabilities:   smbios-2.6 dmi-2.6 smp vsyscall32
configuration:  
boot    =   normal
chassis =   notebook
family  =   103C_5335KV
sku =   VL131EA#UUZ
uuid    =   434E4639-3433-3837-5A47-00269E7F1C54
id: 
core
description:    Motherboard
product:    7001
vendor: Hewlett-Packard
physical id:    
0
version:    35.35
serial: CNF94387ZG
slot:   Base Board Chassis Location
id: 
firmware
description:    BIOS
vendor: Hewlett-Packard
physical id:    
0
version:    F.25
date:   05/31/2010
size:   1MiB
capacity:   1536KiB
capabilities:   pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification
id: 
memory
description:    System Memory
physical id:    
16
slot:   System board or motherboard
size:   6GiB
id: 
bank:0
description:    SODIMM DDR3 Synchronous 1067 MHz (0,9 ns)
product:    DON'T WANNA GIVE INFO
vendor: Samsung
physical id:    
0
serial: DON'T WANNA GIVE INFO
slot:   Bottom - Slot 1
size:   4GiB
width:  64 bits
clock:  1067MHz (0.9ns)
id: 
bank:1
description:    SODIMM DDR3 Synchronous 1067 MHz (0,9 ns)
product:    DON'T WANNA GIVE INFO
physical id:    
1
serial: 6525C446
slot:   Bottom - Slot 2
size:   2GiB
width:  64 bits
clock:  1067MHz (0.9ns)
id: 
cpu
description:    CPU
product:    Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
vendor: Intel Corp.
physical id:    
1f
bus info:   
cpu@0
version:    Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
slot:   CPU
size:   997MHz
capacity:   1734MHz
width:  64 bits
clock:  1066MHz
capabilities:   lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida flush_l1d cpufreq
configuration:  
cores   =   4
enabledcores    =   4
threads =   8
id: 
display
description:    VGA compatible controller
product:    GT216M [GeForce GT 230M]
vendor: NVIDIA Corporation
physical id:    
0
bus info:   
pci@0000:01:00.0
version:    a2
width:  64 bits
clock:  33MHz
capabilities:   pm msi pciexpress vga_controller bus_master cap_list rom
configuration:  
driver  =   nvidia
latency =   0
resources:  
irq :   38
memory  :   d2000000-d2ffffff
memory  :   c0000000-cfffffff
memory  :   d0000000-d1ffffff
ioport  :   6000(size=128)
memory  :   c0000-dffff
id: 
disk
description:    ATA Disk
product:    DON'T WANNA GIVE INFO
physical id:    
0.0.0
bus info:   
scsi@0:0.0.0
logical name:   
/dev/sda
version:    0003
serial: DON'T WANNA GIVE INFO
size:   931GiB (1TB)
capabilities:   partitioned partitioned:dos
configuration:  
ansiversion =   5
logicalsectorsize   =   512
sectorsize  =   4096
signature   =   ac4c8fed

Here's the command that one of users requested

 ~$ free -h
                  total        used        free      shared  buff/cache   available
    Mem:          5,8Gi       2,3Gi       428Mi       236Mi       3,1Gi       3,0Gi
    Swap:         2,0Gi       0,0Ki       2,0Gi
    str1ng@str1ng:~$ swapon -s
    Filename                Type        Size    Used    Priority
    /swapfile                               file        2097148 780 -2
:~$ 
str1ng
  • 165

2 Answers2

1

SWAP

Your /swapfile is too small at 2G, we'll 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 6G 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
heynnema
  • 73,649
0

Just gathering together a few related bug reports and solutions that apparently worked:

For me, what seems to have worked is to turn off Intel Turbo Boost, and also to switch my laptop to "battery-saving" mode, which I guess just reduces CPU usage a bit.

My laptop had been working fine for more than a year, so it could just be that my CPU fan/vent is clogged up with dust, but I haven't checked that yet.

joe
  • 153