Ubuntu 22.04 - Flickering screen and Brightness not working on Dell G15 RTX 3060

I have a Dell G15 with a Nvidia GeForce RTX 3060 Mobile graphic card. Just installed ubuntu 22.04 alongside with Windows, but I have two main problems:

  • Screen flickers randomly.
  • Brightness controls doesn’t work, either keyboard and in the OS. Specifically when turning brightness up/down, there is no effect (brightness is stuck at max).

Here’s my nvidia-smi output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.48.07    Driver Version: 515.48.07    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   40C    P0    N/A /  N/A |      5MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1507      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

My ubuntu-drivers devices output

== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00002560sv00001028sd00000B5Ebc03sc00i00
vendor   : NVIDIA Corporation
model    : GA106M [GeForce RTX 3060 Mobile / Max-Q]
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-510-server - distro non-free
driver   : nvidia-driver-515-server - distro non-free
driver   : nvidia-driver-510 - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-515 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

And the output of sudo lspci -k | grep -EA3 'VGA|3D|Display'

pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
	Subsystem: Dell GA106M [GeForce RTX 3060 Mobile / Max-Q]
	Kernel driver in use: nvidia
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
--
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt (rev c8)
	Subsystem: Dell Device 0b5e
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

*Already tried changing the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi=linux"

also to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=legacy"

and then always

sudo update-grub

Also when typing dmesg, I get a [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership

Finally, I installed liquorix kernel as suggested in this thread - current version is 5.15.0-43-generic

But no luck at all.
Any help would be much appreciated!

nvidia-bug-report.log (2.2 MB)

The display is driven by the amd gpu. Since the 6800H was released in january, please use the liquorix ppa to upgrade to kernel 5.18.

1 Like

Thanks for your reply! That seems to have fixed the flickering, but I still cannot control brightness.

My relevant lines in /etc/default/grub


GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=legacy"
GRUB_CMDLINE_LINUX="acpi_backlight=legacy"

nvidia-bug-report.log (281.0 KB)

Please remove

acpi_backlight=legacy

and check again. If it still doesn’t work, please post the output of
ls /sys/class/backlight

1 Like

Changed to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

…but stil not working. Output is

amdgpu_bl0 nvidia_wmi_ec_backlight

Same old problem, amdgpu_bl0 is the correct backlight but gnome is using nvidia_wmi_ec_backlight which shouldn’t be there at all.
Please check if a bios update is available.

1 Like

I’m afraid I have the latest version G15 5525 - version 1.3.7, so I will try to see if I can report them somehow. Thanks for the help anyway!

Updated Bios to 1.4.3, and running Ubuntu 22.10
The ls /sys/class/backlight output is now
amdgpu_bl1 nvidia_0 nvidia_wmi_ec_backlight

And nvidia-smi output:


+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.56.06    Driver Version: 520.56.06    CUDA Version: 11.8     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   48C    P0    N/A /  N/A |      5MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2062      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

With dmesg, I see this errors

[ 8.574047] [drm:dc_dmub_srv_wait_idle [amdgpu]] *ERROR* Error waiting for DMUB idle: status=3
[ 10.847902] snapd-desktop-i[2874]: segfault at 0 ip 00007f31348cc3d4 sp 00007ffdd0c21258 error 4 in libglib-2.0.so.0.6400.6[7f31348a2000+9a000]

I’m still having both problems (flickering and cannot control brightness). I will try to file a bug to the BIOS provider, but what exactly should I tell them?

nvidia-bug-report.log (761.9 KB)

I suspect this is a notebook with a mux, i.e. you can switch in bios between hybrid/discrete graphics. Currently it’s switched to hybrid, the amdgpu driving the internal display. Yet, the bios still makes the nvidia gpu believe it had a display connected, resulting in error nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device DP-0 and the driver creating a disfunct backlight entry.
Please create a file /etc/modprobe.d/nvidia-wmi-blacklist.conf

blacklist nvidia_wmi_ec_backlight

then run
sudo update-initramfs -u
Create /etc/X11/xorg.conf.d/10-nvidia-options.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "UseDisplayDevice" "none"
    Option  "RegistryDwords" "EnableBrightnessControl=0"
EndSection

Also, please remove amdgpu.backlight=0 from kernel cmdline and add
drm.vblankoffdelay=0
Then check if /sys/class/brightness still contains nvidia handlers.

1 Like

Yep, I have Hybrid Graphics / Advanced Optimum set to enabled. I tried to disable it, but then Ubuntu didn’t load.

I added what you suggested, and the system is still in the same situation. The output of ls /sys/class/backlight has changed though, and it is now just amdgpu_bl1 nvidia_0

Also, in my case /sys/class/brightness doesn’t exist.

Oh, ok, this explains it, there’s nothing really wrong with the bios but you have an “Advanced Optimus” device (never seen one of those before or at least noticed https://forums.developer.nvidia.com/t/advanced-optimus/125378 ). This means there’s a mux between display and both gpus that can be dynamically triggered by the OS to switch on-demand for reduced latency and possibly g-sync. The bad news is, there’s no support (yet) in Linux for this. The DE would have to decide which gpu to switch to and then use the appropriate backlight handler. Gnome/KDE only ever choose one (the wrong one) and use it.
https://www.phoronix.com/news/NVIDIA-Dynamic-Mux-Switching

Going forward, to control screen brightness, you’d need to use a third party application to control amdgpu_bl0 or amdgpu_bl1 since the Gnome handler can’t be changed.
Then you should post a feature request to either Ubuntu or Gnome to have system support for this at some time
Short googling:
https://wiki.archlinux.org/title/backlight#Backlight_utilities
http://haikarainen.github.io/light/

Thanks for that!

So it seems that after restarting with the previous fixes the flickering is gone and then I also followed your advice and installed light, with that I can manage the brightness at least from the console.

I will try to talk to the Gnome guys to see if they can fix the issue on their side. Thanks for all the help!!!

For a little more convenience, you can create keyboard shortcuts to in-/decrease brightness in gnome control center->keyboard.