79, GPU has fallen off the bus. on Ubuntu 18.04 LTS

System: Dell Inspiron 5840
GPU: NVIDIA GeForce MX150 (2GB GDDR5)
OS: Ubuntu 18.04.2 LTS
Kernel: 5.0.5-050005-generic
Nvidia driver: 418.56 from graphic PPA

The problem started after enabling Nvidia driver for X server it will randomly freeze and require a hard restart.

After searching for about 3 days, I found one thing is working for me. I can stop freezing by setting up PowerMizer to be Perfer Maximum Performance after booting to Ubuntu desktop.
It works as a switch to Intel GPU via prime-select for daily use and to Nvidia for GPU intensive application.

After testing, when it enters PowerMizer level 0 it will cause GPU has fallen off the bus and the system will hang.

I dig a bit deeper and found that every PowerMizer profile change it will effect PCI generation config. I have no idea while but what happens is Profile 3 (maximum performance) has PCI-E gen 3, Profile 2 has PCI-E gen 2, and Profile 1 has PCI-E gen 1.

Is there have any solution for this problem? If anyone has the same problem, could you try my method and monitor PowerMize state?

Thank

The observation of the changing ‘pcie gen’ is normal, the driver is also changing the speed of the bus while throttling down the gpu. 8->5->2.5GT/s
It’s not normal that the gpu is falling off the bus while doing so.
Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.
[url]https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/[/url]