Tutorial - Solve the recurring PCIe error

[Tutorial] Solve the recurring PCIe error during dual-booting Ubuntu in HP Pavilion Laptop

errors
PCIe bus errors recursively filling up the screen (Source)

Specification of my laptop:

HP - Pavilion Notebook 16 GB RAM Storage - 128 SSD + 1 TB HDD Intel Core i7-7500U CPU @ 2.70GHz x 4 NVIDIA GeForce Graphics

Background

This had been causing me trouble since I wanted to dual boot on my laptop with windows 10. At first, I deducted that the SSD + HDD hybrid storage is making the problem, and the boot files must be loaded on either one of the drives. Tried storing the boot files of windows and ubuntu at the same place in SSD, as well as stored in different drives, it gave negative output. The error persisted when I tried to shut down. This usually led to the filing of large log files in the /var/log folder and shutting down by ‘Hard shutdown’ method. Deleting these unnecessary log files or ‘rotating log files’ didn’t help in any way, as it filled again at reboot.

disk full
Half of my disk is full due to the log files in /var/log

After a lot of scrapping Ubuntu forums and hit and trial methods, a simple change in the grub config file did my job on Ubuntu 16.04 LTS.

The error came back haunting me while upgrading to Ubuntu 18.04 LTS, but it didn’t show itself at first. This time the installation always got hanged just after creating user and gave unexpected errors after prolonged period. As didn’t know about the error in the beginning, so I changed ISO files and bootable pen drives, tried updating grub command prompt that popped whenever tried to boot, checked disks fdisk using Try Ubuntu mode.

Lest during this my Windows 10 OS went through some shit and it didn’t boot as well. So I opted teh last resort of wiping everything off and starting anew. Just before that, I tried to duckduckgo again, the PCIe bus error which only showed when rebooting from Try Ubuntu mode. Following some threads, I got to know that, whenever the installation started to detect the laptop hardware, it went into a recursive loop of the PCIe bus error and crashed. And it occured only with the hardware of HP laptops.

It is apprehended that this error can’t be fixed completely, but only dodged using the method below.

Steps to solve the error

To get through the installation (using bootable Pendrive)

  1. At startup, press E when hovered on Install ubuntu.
  2. Add pci = nommconf at the end of the line ... splash.
  3. Then press Esc and go through the installation.
  4. When the installation is complete, boot to Ubuntu OS.
  5. Go and edit the grub file before rebooting again.

Updating configure file in Ubuntu

1.Open terminal - Ctrl + T

2.Make a back-up of the grub config file, so that you can save yourself if things get messed up.

cp /etc/default/grub ~/grub.back

3.Open gedit for editing

sudo gedit /etc/default/grub

4.Look for the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”. Add pci=noaer at the end of this line. AER stands for Advanced Error Reporting and ‘noaer’ asks the kernel to not use/log Advanced Error Reporting. The changed line should look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"

5.Update grub file

sudo update-grub

6.Restart Ubuntu ‘PCIe Bus Error’ won’t be seen anymore.

Hope this helps anyone who is struggling with this problem in his/her HP laptops.

References

Troubleshooting PCIe Bus Error severity Corrected on Ubuntu and Linux Mint

PCIe Bus error severity=Corrected

Ubtunu 18.04 crashes or freezes after login (Dual boot, nvidia graphics) - Answer

-->
updated_at 10-08-2020