Black sceen flickering on Optimus Laptop after installing Nvidia driver 430

I’ve recently installed the Nvidia driver 430 on Ubuntu 18.04, using the instructions mentioned on this post


Thankfully I am able to login to Ubuntu fine however sometimes Ubuntu starts to show black flickering. The weird thing is, this can be temporarily fixed whenever I reboot the laptop or by simply closing the lid and opening it again.

However, once I reboot my laptop, the flickering still persists after logging into Ubuntu. I would like to know if there is a possible fix to this problem?

My laptop model is: ASUS TUF Gaming FX505DT, the same model mentioned in this post:


| NVIDIA-SMI 430.50   	Driver Version: 430.50   	CUDA Version: 10.1 	|
| GPU  Name    	Persistence-M| Bus-Id    	Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|     	Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 1650	Off  | 00000000:01:00.0 Off |              	N/A |
| N/A   40C	P0	15W /  N/A |	200MiB /  3911MiB |  	3%  	Default |
| Processes:                                                   	GPU Memory |
|  GPU   	PID   Type   Process name                         	Usage  	|
|	0  	1555  	G   /usr/lib/xorg/Xorg                       	107MiB |
|	0  	1711  	G   /usr/bin/gnome-shell                      	90MiB |

Config files:


Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "modesetting"


Section "OutputClass"
	Identifier "nvidia"
	MatchDriver "nvidia-drm"
	Driver "nvidia"
	Option "AllowEmptyInitialConfiguration"
	Option "PrimaryGPU" "Yes"
	ModulePath "/usr/lib/x86_64-linux-gnu/nvidia-430/xorg"



Section "OutputClass"
    Identifier "Radeon"
    MatchDriver "radeon"
    Driver "radeon"

I have included the nvidia-bug-report.log

Any help would be appreciated, thank you for your time.
nvidia-bug-report.log (2.18 MB)
video-1576011182.avi (8.3 MB)

That rather sounds like a defective (internal) display cable. Does the flicker go away if you just move the panel back and forth? If not, the amd gpu is responsible for driving the internal display. You could upgrade the kernel to 5.3 and check if that mitigates it
sudo apt-get install --install-recommends linux-generic-hwe-18.04-edge
If that doesn’t help, please check if there’s somthing wrong with amdgpu power management
sudo -s
echo “high” > /sys/class/drm/card0/device/power_dpm_force_performance_level

Hi generix, thanks for your reply.

Unfortunately upgrading to kernel 5.3 using:

sudo apt-get install --install-recommends linux-generic-hwe-18.04-edge

did not help. Instead it caused another problem where I was stuck on the Ubuntu loading screen and eventually received an error (I have attached a picture).

However, to save some time I reinstalled Ubuntu 18.04 since it was a fresh install previously. This time I tried installing NVIDIA driver 435 but I am still receiving the same flickering issue once I reboot the laptop.

My laptop is dual boot and this flickering does not occur when I am on Windows 10. It appears to only occur when I am using one of the NVIDIA proprietary drivers.

I have included the following attachments (respectively):

  1. A picture showing the result of upgrading to kernel 5.3 and rebooting
  2. A video showing the flickering issue that I am experiencing on my laptop and how it is temporarily fixed by simply closing the lid and opening it.Moving the panel back and forth has no effect on the flickering.
  3. A picturing showing the result of entering the commands:
    sudo -s
    echo “high” > /sys/class/drm/card0/device/power_dpm_force_performance_level
    into the terminal. There seems to be no output but I may not be doing it correctly?
  4. Another nvidia-bug-report.log

Once again, thank you for your time and assistance.

video-1576011182.avi (8.3 MB)
nvidia-bug-report.log (2.03 MB)

To add further to this, I’m not sure if this is linked to the issue however whenever I enter nvidia-settings from the terminal I get the following output:

janmart@janmart:~$ nvidia-settings
** Message: 14:24:45.250: PRIME: No offloading required. Abort
** Message: 14:24:45.250: PRIME: is it supported? no

And the PRIME profiles option does not appear on the nvidia settings GUI. I have tried uninstalling and reinstalling nvidia prime and nvidia settings but the same output is still shown.

I found that the flickering is specifically caused by adding

Option "PrimaryGPU" "Yes"

to the OutputClass of /usr/share/X11/xorg.conf.d/10-nvidia.conf

However, if I do not have this included, the settings show that the Graphics being used is AMD Raven. It also prevents me from running programs such as the Carla simulator, which uses Unreal Engine 4.

Is there any potential fixes to this problem?

Please try this:
create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing

[Desktop Entry]
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"

Thank you for your response.

Unfortunately, this did not fix the flickering problem. I have attached another bug report.
nvidia-bug-report.log (2.19 MB)