I've been trying to fix this issue by myself (searching for fixes and questions/answers provided in similar cases) for over a year, with no success.
The affected device is an old notebook with 2 GPUs: dedicated/discrete (NVidia) and integrated (Intel Graphics).
Crash description
The screen freezes, including the mouse pointer. A new pointer (which responds to mouse movement only) comes up. No interaction is possible (e.g. commands, shortcuts and "clicks"). After some seconds (around 10), all the lights on the keyboard (e.g. capslock and numlock) start turning on and off (intervals of around 1 second) and the coolers speed up to whats sounds like their maximum speed. I've never left the PC in this state for more than a few seconds. I have to force it to shutdown (hold the power button).
Circumstances (when/how it happens)
The crash only happens when all of the following criteria are met:
- The dedicated GPU is selected (
sudo prime-select nvidia
).
1.1. Note: unlike my previous experience (when logging out was enough), the system needs to be rebooted for the change to take effect (switching GPUs).
- The GPU is under low load (or maybe under no load at all).
2.1. In other words, it never happens when the GPU is actually in use (e.g. gaming or watching videos).
2.2. However, it does happen when the application that uses the GPU is minimized or not "focused" (e.g. browsing files while a game is minimized, or a tab on a browser is running a video, but isn't on the foreground/selected).
Additional details
- Happened on both Ubuntu 18.04 (including Live, running from an USB device) and 20.04
- Did NOT happen in Windows 7 64-bit (the last OS used before migrating to Ubuntu)
- Not sure if it happened while using Nouveau drivers. Nevertheless, using it is out of question due to performance reasons, and it would just be a workaround, rather than a fix.
- Happened with both Nvidia driver versions available under Software & Updates - Additional Drivers (or
sudo ubuntu-drivers
), namely 340 and 390. - GPU temperatures are within the appropriate limits
- No errors found on RAM (Memtest) nor on the HDD
- No Secure Boot option available in BIOS settings
- The integrity of the downloaded image and the installation media of the OS were checked, and the integrity check before the installation (20.04 only) was allowed to run on every opportunity
- The system is always updated
- On-demand mode wasn't tested, since it would just be a workaround instead of a fix
- I didn't attempt (yet) to update the BIOS, but none of the updates mentioned in the changelogs seem to be related to the issue (which, as stated before, did not happen under Windows 7 64-bit)
- No other flavors nor distros were tested
- No relevant (I may be wrong, of course) entries were found upon checking the Logs application. Eventually, however, it lists an error involving the GPU falling off the BUS (which, in theory, should be fixed by the parameter
rcutree.rcu_idle_gp_delay=1
mentioned below)
Attempted fixes
- Fresh install of the OS
- Reinstalling the drivers, including completely removing the previously installed ones
- Installing Nvidia drivers during and after the installation of the OS
- Setting Powermizer to Maximum Performance, both manually and automatically (with Startup Applications:
/usr/bin/nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1"
), since it doesn't persist after reboots/shutdowns - Enabling persistence mode with
sudo nvidia-persistenced --persistence-mode
- Tens of combinations (more than 40) of the following boot parameters on the line
GRUB_CMDLINE_LINUX_DEFAULT=""
of/etc/default/grub
, followed byupdate-grub
:
intel_idle.max_cstate=1
; ahci.mobile_lpm_policy=1
and ahci.mobile_lpm_policy=
; pcie_aspm=off
; rcutree.rcu_idle_gp_delay=1
; nvidia-drm.modeset=1
; acpi_osi='Windows 2009'
, with and without acpi_osi=!
- Sending the notebook to the OEM for inspection (according to the OEM, no issues were found)
Closing notes
I am really sorry for asking such a long question. But, after trying to fix it by "myself" (using the help provided BY others TO others, of course) for over a year, searching for numerous posts and guides, I felt like it was time to ask for help from more experienced people.
Any help would be appreciated, and I will make sure to provide more details, if needed.
Thanks a lot for your attention.