Right after I reboot, the laptop works normally, but the more it runs, the more it slows down, and I have to reboot after every couple hours. It's almost as if there's a memory leak somewhere. This is what I have
ThinkPad-T520:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
ThinkPad-T520:~$ free -h
total used free shared buff/cache available
Mem: 3.7G 2.8G 136M 452M 863M 869M
Swap: 33G 471M 33G
ThinkPad-T520:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 383M 6.5M 377M 2% /run
/dev/sda6 189G 153G 27G 85% /
tmpfs 1.9G 290M 1.6G 16% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/loop0 87M 87M 0 100% /snap/core/5145
/dev/loop1 87M 87M 0 100% /snap/core/4917
/dev/loop2 163M 163M 0 100% /snap/spotify/13
/dev/loop3 141M 141M 0 100% /snap/skype/45
/dev/loop8 173M 173M 0 100% /snap/spotify/19
/dev/loop7 142M 142M 0 100% /snap/skype/51
/dev/loop6 144M 144M 0 100% /snap/skype/48
/dev/loop5 163M 163M 0 100% /snap/spotify/16
/dev/loop4 87M 87M 0 100% /snap/core/4830
tmpfs 383M 132K 383M 1% /run/user/1000
ThinkPad-T520:~$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
0d:00.0 System peripheral: Ricoh Co Ltd PCIe SDXC/MMC Host Controller (rev 08)
0d:00.3 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 PCIe IEEE 1394 Controller (rev 04)
As suggested, I also tried
ThinkPad-T520:~$ ps -e -o stat,pcpu,command | grep -E '^[^ ]*(R|D)'
R 0.0 [kworker/1:2]
R+ 0.0 ps -e -o stat,pcpu,command
I also ran
ThinkPad-T520:~$ grep . -r /sys/firmware/acpi/interrupts
/sys/firmware/acpi/interrupts/ff_gbl_lock: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/gpe15: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe05: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe3F: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe33: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2F: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe23: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe1F: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe13: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe0F: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe03: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe3D: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe31: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2D: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe21: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe1D: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/gpe11: 1230 EN enabled unmasked
/sys/firmware/acpi/interrupts/ff_pwr_btn: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/ff_slp_btn: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe0D: 0 disabled unmasked
/sys/firmware/acpi/interrupts/gpe01: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/ff_pmtimer: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe3B: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2B: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe1B: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe38: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe0B: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe28: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe18: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe08: 0 invalid unmasked
/sys/firmware/acpi/interrupts/sci: 1233
/sys/firmware/acpi/interrupts/gpe36: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe26: 0 invalid unmasked
/sys/firmware/acpi/interrupts/error: 0
/sys/firmware/acpi/interrupts/gpe16: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/gpe06: 3 EN enabled unmasked
/sys/firmware/acpi/interrupts/ff_rt_clk: 0 disabled unmasked
/sys/firmware/acpi/interrupts/gpe34: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe24: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe14: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe04: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe3E: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe32: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2E: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe22: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe1E: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe12: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe0E: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe02: 0 EN enabled unmasked
/sys/firmware/acpi/interrupts/gpe3C: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe30: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2C: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe20: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe1C: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe10: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe39: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe0C: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe00: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe3A: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe29: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe2A: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe19: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/gpe1A: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe09: 0 disabled unmasked
/sys/firmware/acpi/interrupts/gpe37: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe0A: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe27: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe17: 0 STS invalid unmasked
/sys/firmware/acpi/interrupts/sci_not: 0
/sys/firmware/acpi/interrupts/gpe07: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe35: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe25: 0 invalid unmasked
/sys/firmware/acpi/interrupts/gpe_all: 1233
Top gives me
ThinkPad-T520:~$ top
top - 16:43:00 up 56 min, 1 user, load average: 1.41, 1.09, 0.47
Tasks: 231 total, 1 running, 230 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.1 us, 0.5 sy, 0.0 ni, 96.3 id, 2.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3919592 total, 518592 free, 1786336 used, 1614664 buff/cache
KiB Swap: 35530744 total, 35530744 free, 0 used. 1842628 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4102 myUsername 20 0 46644 3984 3360 R 6.2 0.1 0:00.02 top
1 root 20 0 220904 8768 6480 S 0.0 0.2 0:01.64 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
4 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
6 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 mm_percpu_+
7 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.63 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
11 root rt 0 0 0 0 S 0.0 0.0 0:00.01 watchdog/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
15 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
16 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/1
18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:+
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2