Điểm:0

20.04 keeps freezing randomly

lá cờ pe

For some reason, Ubuntu keeps freezing at random times. Sometimes i will come back from being afk and it will be frozen, other times it with freeze when I am loading an application. Even if the freezes correspond to my resource usage, I still have ample resources to be running vscode, discord, and opera at the same time. Every post I've found either has no solution or a solution that doesn't apply to me. Every time it freezes, I am forced to manually shutdown my computer which will eventually start to degrade my hardware. Additionally, this is my whole computer not just gnome, so trying to access the gnome terminal to reload doesn't work.

pixelatedlagg@pixelatedlagg-desktop:~$ inxi -Fxz
System:
  Kernel: 5.4.0-89-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Gnome 3.36.9 Distro: Ubuntu 20.04.3 LTS (Focal Fossa) 
Machine:
  Type: Desktop Mobo: ASRock model: A320M serial: <filter> 
  UEFI [Legacy]: American Megatrends v: P4.70 date: 08/27/2018 
CPU:
  Topology: Quad Core model: AMD Ryzen 3 1200 bits: 64 type: MCP arch: Zen 
  rev: 1 L2 cache: 2048 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 24750 
  Speed: 3175 MHz min/max: 1550/3100 MHz Core speeds (MHz): 1: 3134 2: 1375 
  3: 1375 4: 1375 
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: ZOTAC driver: nvidia 
  v: 470.63.01 bus ID: 26:00.0 
  Display: x11 server: X.Org 1.20.11 driver: nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 
  v: 4.6.0 NVIDIA 470.63.01 direct render: Yes 
Audio:
  Device-1: NVIDIA GP107GL High Definition Audio vendor: ZOTAC 
  driver: snd_hda_intel v: kernel bus ID: 26:00.1 
  Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel 
  v: kernel bus ID: 28:00.3 
  Device-3: JMTek LLC. USB PnP Audio Device type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-9:4 
  Sound Server: ALSA v: k5.4.0-89-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASRock driver: r8169 v: kernel port: f000 bus ID: 25:00.0 
  IF: enp37s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  Device-2: Ralink MT7610U (Archer T2U 2.4G+5G WLAN Adapter type: USB 
  driver: mt76x0u bus ID: 3-1:2 
  IF: wlx503eaa895721 state: down mac: <filter> 
Drives:
  Local Storage: total: 931.51 GiB used: 140.31 GiB (15.1%) 
  ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-08WN4A0 
  size: 931.51 GiB 
Partition:
  ID-1: / size: 915.89 GiB used: 140.31 GiB (15.3%) fs: ext4 dev: /dev/sda1 
Sensors:
  System Temperatures: cpu: 42.6 C mobo: N/A gpu: nvidia temp: 34 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 47% 
Info:
  Processes: 328 Uptime: 6m Memory: 7.77 GiB used: 2.44 GiB (31.4%) 
  Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 
  inxi: 3.0.38 

Any help is appreciated :)

Edit: In the 20 minutes after posting this question, my computer froze 3 more times. If I don't find a fix soon, I'm f*cked.

Edit: More information

pixelatedlagg@pixelatedlagg-desktop:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7.8Gi       2.0Gi       1.3Gi        99Mi       4.5Gi       5.4Gi
Swap:         2.0Gi       1.0Mi       2.0Gi
pixelatedlagg@pixelatedlagg-desktop:~$ swapon -s
Filename                Type        Size    Used    Priority
/swapfile                               file        4194300 0   -2
pixelatedlagg@pixelatedlagg-desktop:~$ sysctl vm.swappiness
vm.swappiness = 60
pixelatedlagg@pixelatedlagg-desktop:~$ ls -al ~/.local/share/gnome-shell/extensions
ls: cannot access '/home/pixelatedlagg/.local/share/gnome-shell/extensions': No such file or directory
pixelatedlagg@pixelatedlagg-desktop:~$ ls -al /usr/share/gnome-shell/extensions
total 72
drwxr-xr-x 18 root root 4096 Sep 28 23:25 .
drwxr-xr-x  7 root root 4096 Sep 28 23:33 ..
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  5 root root 4096 Sep 28 23:04 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:25 desktop-icons@csoriano
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 native-window-placement@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
drwxr-xr-x  3 root root 4096 Sep 28 23:04 [email protected]
drwxr-xr-x  3 root root 4096 Sep 28 23:05 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
drwxr-xr-x  2 root root 4096 Sep 28 23:06 [email protected]
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: P4.70
       date: 08/27/2018
       size: 64KiB
       capacity: 16MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: b
       slot: System board or motherboard
       size: 8GiB
     *-bank:0
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0.4 ns)
          product: DDR4 2400 2OZ
          vendor: A-DATA Technology
          physical id: 0
          serial: 3ADF0100
          slot: DIMM 0
          size: 8GiB
          width: 64 bits
          clock: 2400MHz (0.4ns)
     *-bank:1
          description: [empty]
          product: Unknown
          vendor: Unknown
          physical id: 1
          serial: Unknown
          slot: DIMM 0
  *-cache:0
       description: L1 cache
       physical id: d
       slot: L1 - Cache
       size: 384KiB
       capacity: 384KiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: e
       slot: L2 - Cache
       size: 2MiB
       capacity: 2MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: f
       slot: L3 - Cache
       size: 8MiB
       capacity: 8MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=3
  *-cpu                     
       description: CPU
       product: AMD Ryzen 3 1200 Quad-Core Processor
       vendor: Advanced Micro Devices [AMD]
       physical id: 10
       bus info: cpu@0
       version: AMD Ryzen 3 1200 Quad-Core Processor
       serial: Unknown
       slot: AM4
       size: 1315MHz
       capacity: 3450MHz
       width: 64 bits
       clock: 100MHz
       capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp x86-64 constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca cpufreq
       configuration: cores=4 enabledcores=4 threads=4

Edit: still freezing weeks later :<

heynnema avatar
lá cờ ru
Chỉnh sửa câu hỏi của bạn và hiển thị cho tôi `free -h`. Bắt đầu nhận xét cho tôi bằng @heynnema nếu không tôi sẽ nhớ chúng.
Pixelated Lagg avatar
lá cờ pe
@heynnema Như tôi đã nói, tôi nên có đủ tài nguyên, nhưng tôi vẫn thêm kết quả của `free -h`.
heynnema avatar
lá cờ ru
Cho tôi xem `swapon -s` và `sysctl vm.swappiness`.
heynnema avatar
lá cờ ru
Có vẻ như bạn có thể gặp sự cố hoán đổi. Xem câu trả lời của tôi. Nếu nó giúp giải quyết tình trạng đóng băng của bạn, hãy nhớ chấp nhận nó bằng cách nhấp vào biểu tượng dấu kiểm xuất hiện ngay bên trái câu trả lời của tôi.
Pixelated Lagg avatar
lá cờ pe
@heynnema Sau khi hoàn tất quy trình phân bổ mà bạn đã mô tả trong câu trả lời của mình, tôi đã thêm đầu ra của `swapon -s` và `sysctl vm.swappiness` vào câu hỏi của mình.
heynnema avatar
lá cờ ru
`free -h` hiện có hiển thị 8G RAM và hoán đổi 4G không?
Pixelated Lagg avatar
lá cờ pe
`free -h` trả về giá trị này: Hoán đổi 7,8GI Mem và 4GI
heynnema avatar
lá cờ ru
Làm tốt lắm! Bây giờ hãy tải vscode, discord và opera và xem nó có bị treo không.
Pixelated Lagg avatar
lá cờ pe
Ok, sẽ @ bạn nếu nó xảy ra lần nữa :)
heynnema avatar
lá cờ ru
Sau lần trao đổi cuối cùng của chúng ta, tôi thấy rằng bạn đã thêm danh sách tiện ích mở rộng gnome-shell của mình. Đối với mục đích thử nghiệm, hãy tắt TẤT CẢ tiện ích mở rộng NGOẠI TRỪ `desktop-icons` và `ubuntu-appindicators` và `ubuntu-dock` và xem điều này có cải thiện tình hình không. Bắt đầu nhận xét cho tôi bằng @heynnema nếu không tôi sẽ nhớ chúng.
Điểm:2
lá cờ it

Sau khi "tắt đột ngột", hay còn gọi là "sự cố hệ thống" và khởi động lại, lệnh đầu cuối tạp chí sudoctl -b -1 -e sẽ hiển thị cho bạn phần cuối của nhật ký khởi động trước đó.Nếu không có gợi ý nào ở đó, hãy nghi ngờ nguồn điện/quá nhiệt.

Quá nóng rất có thể là do bụi. Tắt nguồn hệ thống của bạn. Bỏ chặn quạt và lỗ thông hơi của bạn, làm sạch bụi. Đảm bảo lưu thông không khí. Bụi bao phủ các bộ trao đổi nhiệt và chip là chất cách điện tốt nhưng không tốt cho việc làm mát. Không tháo rời máy tính của bạn cho đến khi bạn đã tải xuống sách hướng dẫn của nhà sản xuất và nghiên cứu cách vệ sinh. Cung cấp thông tin này khi máy tính của bạn không hoạt động (giấy, máy tính khác) Không sử dụng nước.

Đọc tạp chí người đàn ông để xem cách trích xuất thông tin từ nhật ký.

Bạn có thể tìm thấy cách tôi sử dụng tạp chí dễ dàng hơn tại https://askubuntu.com/users/25618/waltinator.

Pixelated Lagg avatar
lá cờ pe
Có vẻ như ngay trước khi mỗi nhật ký kết thúc, có một loạt lỗi được đưa ra từ opera_opera.desktop.
Pixelated Lagg avatar
lá cờ pe
Đoán đó là sự cố máy tính để bàn opera, tôi vẫn sẽ dọn sạch phần cứng của mình. Cảm ơn câu trả lời thẳng thắn :)
Điểm:0
lá cờ cn

Không chắc nó có liên quan không nhưng tôi có ASRock Z77 và kernel 5.4.0-89 bị đóng băng ngẫu nhiên. Sau khi thiết lập lại mềm, tôi gặp lỗi Hẹn giờ hệ thống từ bios (4 tiếng bíp) và vòng lặp khởi động, sau đó tôi phải bật nguồn. Với 5.4.0-88 có vẻ ổn định.

Chỉnh sửa sau vài ngày: nó chắc chắn ổn định với 88.

ctrl avatar
lá cờ cn
Có vẻ như 5.4.0-90 đã sửa nó.,
Điểm:0
lá cờ ru

/swapfile của bạn quá nhỏ ở 2G. Hãy tăng nó lên 4G và xem điều đó có giúp ích gì không.

Ghi chú: Sử dụng sai rừmđ các lệnh có thể gây mất dữ liệu. Đề xuất sao chép/dán.

bên trong phần cuối...

Sudo hoán đổi -a # tắt hoán đổi
sudo rm -i /swapfile # xóa /swapfile cũ

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

sudo chmod 600 /swapfile # đặt bảo vệ tệp thích hợp
Sudo mkswap/tệp hoán đổi # init/tệp hoán đổi
Sudo hoán đổi /swapfile # bật hoán đổi
free -h # xác nhận hoán đổi RAM 8G và 4G

Chỉnh sửa/etc/fstab, sử dụng sudo -H gedit /etc/fstab hoặc sudo pico /etc/fstab.

Xác nhận dòng /swapfile này trong /etc/fstab... và xác nhận không có dòng âswapâ nào khác... sử dụng SPACES trong dòng này... xác nhận KHÔNG CÓ TABS...

/swapfile không trao đổi sw 0 0

khởi động lại # khởi động lại và xác minh hoạt động

Cập nhật #1:

CPU và RAM không được ép xung.

Mobo: Model ASRock: A320M firmware: P4.70

Phần # DIMM 8G của ADATA là AX4U240038G16-BRZ và nó không xuất hiện trên bất kỳ biểu đồ bộ nhớ tương thích nào.

kiểm tra thất bại. Cần kiểm tra tên CPU cho Ryzen 3 1200 và danh sách Tương thích bộ nhớ tại https://www.asrock.com/mb/AMD/A320M/index.asp#CPU.

lá cờ cn
Nhận xét không dành cho thảo luận mở rộng; cuộc trò chuyện này đã được [chuyển sang trò chuyện](https://chat.stackexchange.com/rooms/130924/discussion-on-answer-by-heynnema-20-04-keeps-freezing-randomly).
Điểm:-1
lá cờ pe

Đã khắc phục sự cố đóng băng bằng cách bỏ ubuntu và chuyển sang hệ điều hành ổn định hơn nhiều, windows 10.

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.