I have ubuntu 18.04 LTS installed in my machine. Since the last update (kernel 4.15.0-176-generic) the machine is very slow to boot (login) and there are problems after the login (slow and laggy).
At the login screen the keyboard, touch-pad and mouse do not respond for more than 3 minutes. Once the keyboard,touch-pad and mouse are responding and I am able to login the computer is slow and laggy. Sometimes the wifi is not working because the driver wasn't loaded during the boot process (I can manualy load the driver with the modprobe command without errors and the wifi works fine) .
This problem is not always present, in some cases after rebooting the system boots and works without any problem (it is not slow neither laggy), and I don't have to wait the 3 minutes for the keyboard, touch-pad and mouse to became responsive.
Laptop is Lenovo V330-15IKB
CPU Intel i5-8250U 12GB RAM with only a SSD 256GB only Ubuntu OS (no dual boot).
When the problem is present I see that dmesg shows a jump in time (about 190sec equal to more than 3 minutes)
dmesg
[ 4.355662] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 4.359659] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 4.362007] proc_thermal 0000:00:04.0: Creating sysfs group for PROC_THERMAL_PCI
[ 4.365280] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
[ 4.414071] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[ 4.470665] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 4.476281] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 4.501241] media: Linux media interface: v0.10
[ 4.514681] Bluetooth: Core ver 2.22
[ 4.514715] NET: Registered protocol family 31
[ 4.514715] Bluetooth: HCI device and connection manager initialized
[ 4.514718] Bluetooth: HCI socket layer initialized
[ 4.514720] Bluetooth: L2CAP socket layer initialized
[ 4.514728] Bluetooth: SCO socket layer initialized
[ 4.568449] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer
[ 4.568450] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[ 4.568451] RAPL PMU: hw unit of domain package 2^-14 Joules
[ 4.568451] RAPL PMU: hw unit of domain dram 2^-14 Joules
[ 4.568452] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[ 4.568452] RAPL PMU: hw unit of domain psys 2^-14 Joules
[ 4.755297] AVX2 version of gcm_enc/dec engaged.
[ 4.755298] AES CTR mode by8 optimization enabled
[ 4.787951] random: crng init done
[ 4.787952] random: 7 urandom warning(s) missed due to ratelimiting
[ 5.224511] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 5.282583] r8169 0000:03:00.0 enp3s0: link down
[ 5.282683] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 6.480097] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 6.480098] Bluetooth: BNEP filters: protocol multicast
[ 6.480101] Bluetooth: BNEP socket layer initialized
[ 184.421868] i2c_hid i2c-SYNA2B42:00: i2c-SYNA2B42:00 supply vdd not found, using dummy regulator
[ 184.494360] input: SYNA2B42:00 06CB:8252 as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-SYNA2B42:00/0018:06CB:8252.0003/input/input6
[ 184.494687] hid-generic 0018:06CB:8252.0003: input,hidraw2: I2C HID v1.00 Mouse [SYNA2B42:00 06CB:8252] on i2c-SYNA2B42:00
[ 184.500071] mei_me 0000:00:16.0: enabling device (0004 -> 0006)
[ 184.520724] idma64 idma64.0: Found Intel integrated DMA 64-bit
[ 184.542324] asus_wmi: Asus Management GUID not found
[ 184.560287] kvm: disabled by bios
[ 184.638732] kvm: disabled by bios
[ 184.639522] Linux video capture interface: v2.00
[ 184.642685] intel_rapl: Found RAPL domain package
[ 184.642686] intel_rapl: Found RAPL domain core
[ 184.642687] intel_rapl: Found RAPL domain uncore
[ 184.642688] intel_rapl: Found RAPL domain dram
[ 184.697656] kvm: disabled by bios
[ 184.733371] kvm: disabled by bios
[ 184.855831] rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3336-002, fw id: 2654938
[ 184.962083] input: Synaptics TM3336-002 as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-SYNA2B42:00/0018:06CB:8252.0003/input/input7
[ 184.962800] hid-rmi 0018:06CB:8252.0003: input,hidraw2: I2C HID v1.00 Mouse [SYNA2B42:00 06CB:8252] on i2c-SYNA2B42:00
[ 209.717367] rfkill: input handler disabled
I have restarted many time the machine, and in some case I can see in the output of the dmesg command the following lines related to the loading the wifi driver/firmware:
[ 9.527848] iwlwifi 0000:02:00.0: loaded firmware version 29.1044073957.0 op_mode iwlmvm
[ 9.588579] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 3165, REV=0x210
I don't know why sometime the driver is not loaded during the boot up process. Even that, when the driver is loaded at the boot up process the main problem is still present (touch pad, mouse and keyboard not responding at login screen and slow and laggy behavior after login).
I don't know what is causing the problem so far. How can I troubleshoot and solve this problem?