Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 472  / 1 Year ago, sun, february 26, 2023, 11:28:50

I am new to Ubuntu Linux and just installed version 18.04 on my computer alongside Windows in dual-boot mode. However, after three weeks, Linux started to be very slow, and it will even crash a few times a day when it is not able to run my code efficiently enough. It will stop building a package completely when I run catkin build such that I am forced to switch off my laptop.


I have tried the following:



  • Looking at CPU specs with lspcu, which are good



  • Looking at the omputer make and model, gotten with the system information part of sudo dmidecode | less



  • Some of the solutions found on the following website: https://www.maketecheasier.com/linux-running-too-slow-heres-how-to-find-the-cause/. Such as: checking my CPU size (seems okay), examine CPU load with top (no process seems to be abusing my CPU usage) and check if my hard drive is overworking with iotop (it is not).



  • Examining the system with systemd-analyze blame:


            19.606s apt-daily.service
    6.913s NetworkManager-wait-online.service
    4.019s plymouth-quit-wait.service
    3.163s apt-daily-upgrade.service
    2.258s bolt.service
    1.391s snap-gnomex2d3x2d34x2d1804-66.mount
    1.354s snap-onenotex2ddesktop-13.mount
    1.352s snap-gnomex2dcalculator-826.mount
    1.337s dev-sda7.device
    1.332s snap-gnomex2dcharacters-570.mount
    1.241s snap-dub-53.mount
    1.206s snap-gtkx2dcommonx2dthemes-1514.mount
    1.172s snap-snapd-11107.mount
    1.100s snap-gnomex2dcalculator-884.mount
    1.031s snap-gnomex2dsystemx2dmonitor-148.mount
    1.013s snap-gnomex2dlogs-103.mount
    993ms snapd.service
    971ms snap-core-10958.mount
    912ms snap-code-59.mount
    911ms dev-loop4.device
    878ms dev-loop5.device
    857ms fwupd.service
    835ms dev-loop2.device



It seems like the upper lines are taken up a lot of time, so maybe this is a cause of the problem?



  • It should be noted that my Ubuntu running slow is mainly caused when I am using Visual Studio Code for too long - when my Ubuntu has just started, it runs fine, but after a while it gets slower and slower. I checked again with the top command the CPU usage when running a code in Visual Studio Code and it seems like maybe this causes a problem since cc1plus command runs at 99-100% CPU:


Result of top command: cc1plus running at 99-100% CPU



  • I have looked at /var/log/syslog errors as well with cat var/log/syslog | grep 'error' and the following error occurred multiple times:


Apr 16 13:48:06 jessie-HP-ZBook-Studio-G3 gnome-shell[1321]: Error setting property 'Powered' on interface org.bluez.Adapter1: GDBus.Error:org.bluez.Error.Blocked: Blocked through rfkill (g-io-error-quark, 36)

Other errors that occur (not as often, though) are:


Apr 16 13:48:07 jessie-HP-ZBook-Studio-G3 org.gnome.Shell.desktop[1957]: [4212:4212:0416/134807.054559:ERROR:gpu_service_impl.cc(1177)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
Apr 16 15:11:04 jessie-HP-ZBook-Studio-G3 kernel: [ 6106.242652] traps: ocs2_controller[14048] general protection fault ip:7f96415d58da sp:7ffd54f40af8 error:0 in libocs2_centroidal_planner.so[7f96414fa000+258000]
Apr 16 15:18:21 jessie-HP-ZBook-Studio-G3 org.gnome.Shell.desktop[1957]: Fontconfig error: Cannot load default config file: No such file: (null)
Apr 16 16:36:57 jessie-HP-ZBook-Studio-G3 kernel: [ 0.173308] ACPI Error: Aborting method _SB._OSC due to previous error (AE_AML_BUFFER_LIMIT) (20190816/psparse-531)
Apr 16 16:36:57 jessie-HP-ZBook-Studio-G3 kernel: [ 6.312196] EXT4-fs (sda7): re-mounted. Opts: errors=remount-ro
Apr 16 16:36:57 jessie-HP-ZBook-Studio-G3 kernel: [ 6.736341] hp_accel: probe of HPQ6007:00 failed with error -22
Apr 16 16:36:59 jessie-HP-ZBook-Studio-G3 snapd[1048]: stateengine.go:150: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: dial tcp: lookup api.snapcraft.io: no such host


  • Finally, I went to the folder /var/crash and look for files there (ls -a), however, no files are found, the only thing my terminal displays are dots: . ..


Anyone who has any idea where to look for the cause of these crashes when running code, and if the main cause is my Ubuntu / dual boot or Visual Studio Code? I am sorry for stating such an unclear general question. If anything else is needed I'll provide it.


EDIT: @heynnema suggested showing the output of the following commands:



  • ls -al /var/crash :


total 8
drwxrwsrwt 2 root whoopsie 4096 apr 1 14:17 .
drwxr-xr-x 15 root root 4096 nov 17 15:50 ..


  • grep -i swap /etc/fstab:


# swap was on /dev/sda8 during installation
UUID=7d274857-3e37-4991-8dda-48a22bfdf7b6 none swap sw 0 0


  • sysctl vm.swappiness:


vm.swappiness = 60


  • grep -i FPDMA /var/log/syslog*
    Does not give any result

  • Screenshot of SMART Data & Self Tests in application Disks:
    SMART Data & Self tests


EDIT 2: Outcome of the following commands for @heynnema:



  • sudo lshw -C memory:


*-cache:0                 
description: L1 cache
physical id: 0
slot: L1 Cache
size: 128KiB
capacity: 128KiB
capabilities: synchronous internal write-back data
configuration: level=1
*-cache:1
description: L1 cache
physical id: 1
slot: L1 Cache
size: 128KiB
capacity: 128KiB
capabilities: synchronous internal write-back instruction
configuration: level=1
*-cache:2
description: L2 cache
physical id: 2
slot: L2 Cache
size: 1MiB
capacity: 1MiB
capabilities: synchronous internal write-back unified
configuration: level=2
*-cache:3
description: L3 cache
physical id: 3
slot: L3 Cache
size: 6MiB
capacity: 6MiB
capabilities: synchronous internal write-back unified
configuration: level=3
*-memory
description: System Memory
physical id: 5
slot: System board or motherboard
size: 8GiB
*-bank:0
description: SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
product: M471A1K43CB1-CRC
vendor: Samsung
physical id: 0
serial: 0305815B
slot: Top-Slot 1(left)
size: 8GiB
width: 64 bits
clock: 2133MHz (0.5ns)
*-bank:1
description: [empty]
physical id: 1
slot: Top-Slot 2(right)
*-firmware
description: BIOS
vendor: HP
physical id: b
version: N82 Ver. 01.45
date: 01/05/2020
size: 64KiB
capacity: 15MiB
capabilities: pci pcmcia upgrade shadowing cdboot bootselect edd int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecification netboot uefi
*-memory UNCLAIMED
description: Memory controller
product: 100 Series/C230 Series Chipset Family Power Management Controller
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
version: 31
width: 32 bits
clock: 33MHz (30.3ns)
configuration: latency=0
resources: memory:e5348000-e534bfff



  • sudo dmidecode -s bios-version:


N82 Ver. 01.45


  • Motherboard info with sudo dmidecode -t 2:


# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x000D, DMI type 2, 17 bytes
Base Board Information
Manufacturer: HP
Product Name: 80D4
Version: KBC Version 11.75
Serial Number: PFPLFM11T540O0
Asset Tag:
Features:
Board is a hosting board
Location In Chassis:
Chassis Handle: 0x0000
Type: Motherboard
Contained Object Handles: 0



  • Computer model:


HP ZBook Studio G3

EDIT @heynnema I followed the Swap steps, however, when using sudo -H gedit /etc/fstab and trying to comment out the line /swapfile none swap sw 0 0, I cannot find it, see screenshot:
/etc/fstab edit file


More From » boot

 Answers
2

SWAP


I suspect that your 4G swap partition is too small for your current usage.


Note: You may need to add more RAM (See Update #1).


We'll increase your swap by creating a new /swapfile, editing /etc/fstab, and deleting your swap partition.


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=8192

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 8G 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...


Comment out this line...


UUID=7d274857-3e37-4991-8dda-48a22bfdf7b6 none            swap    sw              0       0

Add this line...


/swapfile  none  swap  sw  0  0

Delete the old swap partition using gparted. CONFIRM that /dev/sda8 has UUID=7d274857-3e37-4991-8dda-48a22bfdf7b6 by using sudo blkid | grep -i swap. If they match, then delete the /dev/sda8 partition. BE CAREFUL HERE.




reboot                    # reboot and verify operation

Update #1:


catkin build


I'd recommend changing catkin build -j1 package_name to catkin build -j7 package_name (for using 7 CPUs on a 8 CPU system) to optimize the build process.


BIOS


HP ZBook Studio G3 Mobile Workstation


You have BIOS version N82 Ver. 01.45 from Jan 17, 2020. There's a newer BIOS version 01.52 Rev.A available from Nov 6, 2020 here.


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


Note: Have good backups before updating the BIOS


Memory


You have one, of two, memory slots filled with a 8G SODIMM.


 *-bank:0
description: SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
product: M471A1K43CB1-CRC
vendor: Samsung
physical id: 0
serial: 0305815B
slot: Top-Slot 1(left)
size: 8GiB
width: 64 bits
clock: 2133MHz (0.5ns)

Fill the 2nd empty slot with another 8G Samsung M471A1K43CB1-CRC for 16G total RAM, with memory interleaving. See https://www.amazon.com/Samsung-Notebook-Memory-M471A1K43CB1-CRC-DDR4-2400/dp/B06XPWJJPL.


Note: I need to check what the maximum RAM for this computer is...


enter image description here


Note: Source https://support.hp.com/us-en/product/hp-zbook-studio-g3-mobile-workstation/8934839/product-info


[#1686] Monday, February 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sigtestim

Total Points: 298
Total Questions: 108
Total Answers: 106

Location: Bermuda
Member since Thu, Apr 20, 2023
1 Year ago
;