Ubuntu периодически зависает при загрузке

Я установил Ubuntu на свой ноутбук MSI GF63. Мои спецификации следующие: Intel Core i5 9300H (четырехъядерный) 8 ГБ ОЗУ nVidia GTX 1050 Intel 660p 512 ГБ SSD (подкачка 140 ГБ + 15 ГБ для Linux)

Моя система периодически зависает при загрузке. Если я играю музыку, запускаю nodeJS и Java Server, открываем Firefox и VS Code. Система периодически зависает. Я пытался держать htop в рабочем состоянии, чтобы увидеть, не столкнулся ли я с какими-либо узкими местами, но я не обнаружил, что ни ЦП, ни Память не исчерпали свою емкость во время этих случаев. Обычно звук не задерживается, музыка и вызовы остаются в основном включенными, хотя иногда он слегка заикается, но мышь не двигается и не работают клавиши Alt + Tab

Я попытался установить DRM KMS, как предложено в Здесь но безрезультатно Я попытался перейти на свой nVidia GPU, используя X-Server, но это тоже не помогло. У меня закончились варианты, так как я не могу диагностировать какие-либо узкие места.

➜  ~ free -h
              total        used        free      shared  buff/cache   available
Mem:           7.6G        6.5G        125M        573M        988M        270M
Swap:           15G        1.0G         14G
➜  ~ sysctl vm.swappiness
vm.swappiness = 60
➜  ~ grep -i swap /etc/fstab
# swap was on /dev/nvme0n1p6 during installation
UUID=a0c6ff2a-8e8c-428a-8ab6-37ca22bdb822 none            swap    sw              0       0

Команды расширения Gnome возвращают следующее:

➜ ls -al /usr/share/gnome-shell/extensions         
total 16
drwxr-xr-x 4 root root 4096 Feb  3 23:54 .
drwxr-xr-x 6 root root 4096 Feb  3 23:54 ..
drwxr-xr-x 3 root root 4096 Feb  3 23:54 ubuntu-appindicators@ubuntu.com
drwxr-xr-x 3 root root 4096 Feb  3 23:54 ubuntu-dock@ubuntu.com
➜ ls -al ~/.local/share/gnome-shell/extensions     
ls: cannot access '/home/maverick/.local/share/gnome-shell/extensions': No such file or directory

top output при новой перезагрузке

top output when lag was observed without excessive load

free -h вывод при задержке наблюдался без чрезмерной нагрузки

              total        used        free      shared  buff/cache   available
Mem:           7.6G        2.5G        2.6G        394M        2.5G        4.5G
Swap:           15G        199M         15G

Вывод для lshw -C memory

sudo lshw -C memory
[sudo] password for maverick: 
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 1
       version: E16R3IMS.309
       date: 03/26/2020
       size: 64KiB
       capacity: 15MiB
       capabilities: pci upgrade shadowing cdboot bootselect edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: 3b
       slot: System board or motherboard
       size: 8GiB
     *-bank:0
          description: SODIMM DDR4 Synchronous 2667 MHz (0.4 ns)
          product: M471A1K43CB1-CTD
          vendor: Samsung
          physical id: 0
          serial: 32E64524
          slot: ChannelA-DIMM0
          size: 8GiB
          width: 64 bits
          clock: 2667MHz (0.4ns)
     *-bank:1
          description: [empty]
          physical id: 1
          slot: ChannelB-DIMM0
  *-cache:0
       description: L1 cache
       physical id: 45
       slot: L1 Cache
       size: 256KiB
       capacity: 256KiB
       capabilities: synchronous internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 46
       slot: L2 Cache
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 47
       slot: L3 Cache
       size: 8MiB
       capacity: 8MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
  *-memory UNCLAIMED
       description: RAM memory
       product: Cannon Lake PCH Shared SRAM
       vendor: Intel Corporation
       physical id: 14.2
       bus info: pci@0000:00:14.2
       version: 10
       width: 64 bits
       clock: 33MHz (30.3ns)
       capabilities: pm cap_list
       configuration: latency=0
       resources: memory:a441a000-a441bfff memory:a4422000-a4422fff
0
задан 18 June 2020 в 08:05

1 ответ

The reason for your freezes and lags is because you're running out of memory, and the system is going into heavy swapping. You're running a lot of processes, and quitting those processes, before the reboot, cleared up a lot of problems. Memory and swap were reclaimed, and the system was then freeze/lag free.

DRM KMS

Undo your DRM KMS modifications, as they didn't resolve the problem.

RAM

You need to increase your RAM from 8G to 16G. You always want to configure memory in equal size, matched pairs, of RAM SODIMMs so that the system can take speed advantage of memory interleaving. To configure your memory, add another 8G RAM SODIMM with these specifications...

 description: SODIMM DDR4 Synchronous 2667 MHz (0.4 ns)
  product: M471A1K43CB1-CTD
  vendor: Samsung
  serial: 32E64524
  size: 8GiB
  width: 64 bits

Swap

We'll make swap changes last, after increasing the RAM.

You need to decrease your swap partition from 16G, and we'll switch you over to a /swapfile of 4G. Once completed, you can allocate the 16G swap partition to your / or /home partition.

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

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

Comment out this line in /etc/fstab...

UUID=a0c6ff2a-8e8c-428a-8ab6-37ca22bdb822 none            swap    sw              0       0

Add this line to /etc/fstab...

/swapfile    none    swap    sw      0   0

Reboot. Verify proper /swapfile operation using free -h.

0
ответ дан 19 June 2020 в 21:25

Другие вопросы по тегам:

Похожие вопросы: