Monitor Flicks connected to Mini-DisplayPort

I have a MSI Laptop with 3080 Mobile and I installed the NVIDIA drivers through akmod as described in Howto/NVIDIA - RPM Fusion. The laptop has a HDMI and a Mini-DisplayPort, I connected a 24inch laptop to the HDMI and then I bought a mini-DisplayPort to DisplayPort adaptor and used the DisplayPort to connect a 27inch 2k monitor. Note that previously I had the 27inch monitor connected to the HDMI port and had no problems with it. I am using X11. I have a dual boot and the same setup in windows works flawlessly. Can someone help out? Thanks!

The following image is an example of what’s happening, it appears only a fraction of a second and it happens constantly throughout the monitor.

nvidia-smi:

Fri Aug  4 16:23:47 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.86.05              Driver Version: 535.86.05    CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| 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 RTX 3080 ...    Off | 00000000:01:00.0  On |                  N/A |
| N/A   49C    P3              22W / 125W |    481MiB /  8192MiB |      7%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      3310      G   /usr/libexec/Xorg                           168MiB |
|    0   N/A  N/A      4190      G   /usr/bin/gnome-shell                        283MiB |
+---------------------------------------------------------------------------------------+


uname -r:

6.4.7-200.fc38.x86_64

neofetch:

OS: Fedora Linux 38 (Workstation Edition) x86_64 
Host: GP66 Leopard 11UH REV:1.0 
Kernel: 6.4.7-200.fc38.x86_64 
ptime: 8 mins 
Packages: 2205 (rpm), 35 (flatpak) 
Shell: zsh 5.9 
Resolution: 2560x1440, 1080x1920, 1920x1080 
DE: GNOME 44.3 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: gnome-terminal 
CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz 
GPU: NVIDIA GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 
GPU: Intel TigerLake-H GT1 [UHD Graphics] 
Memory: 2223MiB / 63990MiB

If you need more information, please ask. Thanks for your help!

Are you using xorg or wayland?
Is the nvidia gpu configured as primary as per instructions here.

I would guess this may be related to interaction between the intel & nvidia gpus as well as potentially using wayland.

Note the instructions in that link do not state so, but for that to work and actually set the nvidia gpu as primary one must be using the xorg DE.

Hi @computersavvy, yes I am using xorg and I configured the nvidia GPU as primary following the instructions from this website, which I believe are the same Howto/Optimus - RPM Fusion.

The following print confirms that I am using xorg and that configured Nvidia as the primary GPU.

Thanks!

image

That image shows it as configured for primary, but does not confirm using the xorg DE.

Just as a note: I originally placed the “PrimaryGPU” option in both stanzas of that file and since it works have never changed it.

One can confirm using xorg with inxi -Gxx then looking at the Display: shown. It will either show as x11 or as wayland.
The DE used is selected during login from the screen where the password is entered and using the gear icon at the lower right corner of that screen.

Hi @computersavvy, in the login screen I have selected Gnome on Xorg and using the command you provided the output is the following, in Display it shows x11.

Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-12.1 ports: active: eDP-1 empty: none
    bus-ID: 00:02.0 chip-ID: 8086:9a60
  Device-2: NVIDIA GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB]
    vendor: Micro-Star MSI driver: nvidia v: 535.86.05 arch: Ampere pcie:
    speed: 16 GT/s lanes: 16 ports: active: none off: DP-1,HDMI-A-1
    empty: DP-2,eDP-2 bus-ID: 01:00.0 chip-ID: 10de:249c
  Device-3: Bison HD Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-13:5 chip-ID: 5986:211c
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 22.1.9
    compositor: gnome-shell v: 44.3 driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa alternate: nv dri: iris
    gpu: i915,nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5560x2066 s-dpi: 96
  Monitor-1: DP-1 mapped: DP-0 note: disabled pos: primary,top-center
    model: LG (GoldStar) ULTRAGEAR res: 2560x1440 dpi: 93 diag: 800mm (31.5")
  Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: middle-r
    model: AOC 24G2W1G4 res: 1080x1920 dpi: 93 diag: 604mm (23.8")
  Monitor-3: eDP-1 mapped: eDP-1-1 pos: bottom-l model: LG Display 0x0625
    res: 1920x1080 dpi: 142 diag: 395mm (15.5")
  API: OpenGL v: 4.6.0 NVIDIA 535.86.05 renderer: NVIDIA GeForce RTX 3080
    Laptop GPU/PCIe/SSE2 direct-render: Yes

I did not follow the instruction from the same website as you, can this have caused the problems?
Maybe I have to install something that I did not installed using this command sudo dnf install gcc kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686, or even xrandr?

As I already have the nvidia drivers installed is it save to execute these commands? Do you know anything else that might cause this problems? Thanks!

When installing akmod-nvidia it pulls in all the needed dependencies. Your inxi output above shows the nvidia drivers are in use.

Please post the output of cat /proc/cmdline. There is a possibility that some options are not properly set.

Hello @computersavvy, the output of cat /proc/cmdline is the following

BOOT_IMAGE=/vmlinuz-6.4.7-200.fc38.x86_64 root=UUID=74786b7a-f383-401b-a9bd-1623bf65a6e5 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau resume=UUID=7ccbb249-9a05-4f83-8518-1015adfa5cba rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

Thanks for the help!

Thanks for that update.

I note that you seem to be using the 6.4.7 kernel which has been replaced several times. The current kernel for fedora is presently 6.4.12 and the nvidia driver is currently 535.98. Before doing anything else I would suggest doing a full update of the system using sudo dnf upgrade --refresh then test so you are certain everything is the latest and you are not suffering from some artifact that has been removed by the updates. If the problem continues after the updates then the following may be of assistance.

For myself I had to add the option nvidia-drm.modeset=1 into the command line with my RTX 3050 GPU. I still get a (very seldom) occasional blurring of text similar to what you describe, but mine is only within a browser window and not full screen.

You could try adding that option by editing the grub entry during boot (which will have effect only for that one boot) to see if it helps. If it does then the change can be made permanent and if not then it was only a test.

During boot press e while the grub menu is displayed then add the option at the end of the line that begins with linux. The screen gives instructions to continue boot (I use the ctrl-X option).

To make the change permanent edit the grub config file with sudo nano /etc/default/grub and add that option into the line that begins with GRUB_CMDLINE_LINUX=. Once that change has been made then run sudo grub2-mkconfig -o /boot/grub2/grub.cfg to update grub so the change is effective with the next boot.

Hi @computersavvy, just upgraded to 6.4.12-200 and the nvidia driver is currently 535.104, but the problem still remains. I am now going to try changing the grub config.

I went to change the grub config while booting, but I noticed I already had the option nvidia-drm.modeset=1, I don’t know why it isn’t shown in the command cat /proc/cmdline. However by doing cat /etc/default/grub I get the following output. Here you can see that the option nvidia-drm.modeset=1 is set in GRUB_CMDLINE_LINUX. Can it still be a problem since it doesn’t appear in the cat /proc/cmdline command? But it was set in cat /etc/default/grub the entire time.

GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT="saved"
GRUB_DISABLE_SUBMENU="true"
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=UUID=7ccbb249-9a05-4f83-8518-1015adfa5cba rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG="false"

This is my setup. I have the laptop screen 15.6" (1) set to 144Hz, 32" monitor (2) set to 144HZ (not 165HZ to try to minimize the problems) and a 24" monitor in portrait mode also set to 144Hz. I changed monitors 1 and 3 to 60Hz, but the problem is still there. Previously I had the 32" monitor connected via HDMI and it worked perfectly. Now I have a MiniDisplayPort - DisplayPort adapter and then a DisplayPort-DisplayPort cable connecting to the monitor.

I recorded a video using my smartphone and uploaded it to weTransfer, if possible you can download to understand better the problem?

Once again, thank you for your help!