Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Can not turn on Prime Synchronization ( enable nvidia_drm modeset )

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
sauravniraula
Posts: 4
Joined: 2023-03-25 00:50

[Solved] Can not turn on Prime Synchronization ( enable nvidia_drm modeset )

#1 Post by sauravniraula »

As per docs to solve screen tearing issue
I followed these steps

Add this line to the end of /etc/modprobe.d/nvidia.conf:

Code: Select all

options nvidia-drm modeset=1
2. Regenerate your initramfs image by running:

Code: Select all

# update-initramfs -u
3. The modesetting driver for an Intel GPU loads a module called glamor, which conflicts with the NVIDIA GLX implementation. To disable glamor uncomment this line in /etc/X11/xorg.conf:

Code: Select all

Option "AccelMethod" "none"
and after reboot

Code: Select all

sudo cat /sys/module/nvidia_drm/parameters/modeset outputs 'N'
Here is more info

Code: Select all

>> sudo cat /etc/modprobe.d/nvidia-blacklists-nouveau.conf 
blacklist nouveau
#options nouveau modeset=0

Code: Select all

>> sudo cat /etc/modprobe.d/nvidia.conf 
options nvidia-drm modeset=1
options nvidia NVreg_PreserveVideoMemoryAllocations=1

Code: Select all

>> sudo cat /etc/X11/xorg.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
    Option "AccelMethod" "none"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Code: Select all

>> sudo cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Code: Select all

>> sudo cat /usr/share/sddm/scripts/Xsetup
#!/bin/sh

xrandr --setprovideroutputsource "modesetting" NVIDIA-0
xrandr --auto
---
Moderator edit by aki (2023/03/25): added code tags for better readability.
Last edited by sauravniraula on 2023-03-25 17:04, edited 2 times in total.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Can not turn on Prime Synchronization

#2 Post by Aki »

Hello,

Welcome to the forum.

It looks like your previous post is a solution about the topic in the subject.

It could be useful to other viewer to give more context about the used Debian release and the hardware of you computer (manufacturer and model). To do it, you can use the following command:

Code: Select all

inxi -SMCIxxz
Can you send the output of previous command in a follow-up message ?

Thank you ! :-)
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

sauravniraula
Posts: 4
Joined: 2023-03-25 00:50

Re: [Software] Can not turn on Prime Synchronization

#3 Post by sauravniraula »

I followed all those steps that i mentioned but still prime synchronization is off.

why the output of

Code: Select all

sudo cat /sys/module/nvidia_drm/parameters/modeset 
is still 'N'

Code: Select all

sudo dmesg | grep nvidia
[    4.638362] nvidia: loading out-of-tree module taints kernel.
[    4.638383] nvidia: module license 'NVIDIA' taints kernel.
[    4.688563] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    4.741429] nvidia-nvlink: Nvlink Core is being initialized, major device number 241
[    4.742271] nvidia 0000:01:00.0: enabling device (0106 -> 0107)
[    4.742555] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    4.968859] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.161.03  Wed Oct 19 00:05:15 UTC 2022
[    4.973209] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    4.973212] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    5.353731] audit: type=1400 audit(1679710093.249:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=535 comm="apparmor_parser"
[    5.353736] audit: type=1400 audit(1679710093.249:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=535 comm="apparmor_parser"
[  196.058512] nvidia 0000:01:00.0: Enabling HDA controller

Code: Select all

sudo journalctl -b | grep nvidia
Mar 25 07:53:12 debian systemd-modules-load[288]: Failed to find module 'nvidia-drm'
Mar 25 07:53:12 debian kernel: nvidia: loading out-of-tree module taints kernel.
Mar 25 07:53:12 debian kernel: nvidia: module license 'NVIDIA' taints kernel.
Mar 25 07:53:12 debian kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Mar 25 07:53:12 debian kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 241
Mar 25 07:53:12 debian kernel: nvidia 0000:01:00.0: enabling device (0106 -> 0107)
Mar 25 07:53:12 debian kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
Mar 25 07:53:12 debian kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.161.03  Wed Oct 19 00:05:15 UTC 2022
Mar 25 07:53:12 debian kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Mar 25 07:53:12 debian kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
Mar 25 07:53:13 debian audit[535]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian audit[535]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian kernel: audit: type=1400 audit(1679710093.249:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian kernel: audit: type=1400 audit(1679710093.249:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian nvidia-persistenced[618]: Started (618)
Mar 25 07:56:08 debian systemd[792]: app-nvidia\x2dsettings-c331a28429714074b2a5d6e26eab3325.scope: Succeeded.
Mar 25 07:56:08 debian systemd[792]: app-nvidia\x2dsettings-c331a28429714074b2a5d6e26eab3325.scope: Consumed 2.295s CPU time.
Mar 25 18:37:03 debian kernel: nvidia 0000:01:00.0: Enabling HDA controller
Mar 25 18:41:34 debian sudo[2872]:  viristo : TTY=pts/1 ; PWD=/home/viristo ; USER=root ; COMMAND=/usr/bin/cat /sys/module/nvidia_drm/parameters/modeset
Mar 25 18:48:35 debian systemd[792]: app-nvidia\x2dsettings-59e98e46849647e59baa53152df61af1.scope: Succeeded.
Mar 25 18:48:35 debian systemd[792]: app-nvidia\x2dsettings-59e98e46849647e59baa53152df61af1.scope: Consumed 1.888s CPU time.

here is more info about my system

Code: Select all

sudo inxi -SMCIxxz
System:    Kernel: 5.10.0-21-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 Console: tty 1 wm: kwin_x11 DM: SDDM 
           Distro: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: Acer product: Nitro AN515-53 v: V1.26 serial: <filter> 
           Mobo: CFL model: Freed_CFS v: V1.26 serial: <filter> UEFI: Insyde v: 1.26 date: 03/27/2019 
CPU:       Info: Quad Core model: Intel Core i5-8300H bits: 64 type: MT MCP arch: Kaby Lake note: check rev: A L2 cache: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 36799 
           Speed: 901 MHz min/max: 800/2300 MHz Core speeds (MHz): 1: 901 2: 900 3: 900 4: 900 5: 900 6: 900 7: 900 8: 900 
Info:      Processes: 325 Uptime: 10h 45m Memory: 23.33 GiB used: 2.07 GiB (8.9%) Init: systemd v: 247 runlevel: 5 Compilers: 
           gcc: 10.2.1 alt: 10 clang: 11.0.1-2 Packages: 2123 apt: 2116 flatpak: 7 Shell: Bash v: 5.1.4 running in: konsole 
           inxi: 3.3.01 
Last edited by sauravniraula on 2023-03-25 13:08, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Can not turn on Prime Synchronization

#4 Post by Aki »

Hello,
Sorry, I misunderstood your first post. I don't use nvidia prorietary kernel module. I can only give you a reference to Debian Wiki [1] and Nvisia Support [2] about the topic. For other viewers, this are the specs of your computer [3]

[1] https://wiki.debian.org/NVIDIA%20Optimu ... er_Offload
[2] https://us.download.nvidia.com/XFree86/ ... fload.html
[3] https://www.acer.com/us-en/laptops/nitr ... .QB0AA.001
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

sauravniraula
Posts: 4
Joined: 2023-03-25 00:50

Re: [Software] Can not turn on Prime Synchronization

#5 Post by sauravniraula »

I read those docs.
I am not using NVIDIA PRIME Render Offload.

I want to use Nvidia as primary GPU and i followed every steps mentioned in docs. [1]
Every thing works fine and is rendered by Nvidia.
but there is some screen tearing
To solve that issue I followed docs[1] ( Prime synchronization )
but it didn't solved the issue.


It says Failed to find module 'nvidia-drm'
but 'nvidia_drm' is loaded

Code: Select all

sudo journalctl -b | grep nvidia
Mar 25 07:53:12 debian systemd-modules-load[288]: Failed to find module 'nvidia-drm'
Mar 25 07:53:12 debian kernel: nvidia: loading out-of-tree module taints kernel.
Mar 25 07:53:12 debian kernel: nvidia: module license 'NVIDIA' taints kernel.
Mar 25 07:53:12 debian kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Mar 25 07:53:12 debian kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 241
Mar 25 07:53:12 debian kernel: nvidia 0000:01:00.0: enabling device (0106 -> 0107)
Mar 25 07:53:12 debian kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
Mar 25 07:53:12 debian kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.161.03  Wed Oct 19 00:05:15 UTC 2022
Mar 25 07:53:12 debian kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Mar 25 07:53:12 debian kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
Mar 25 07:53:13 debian audit[535]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian audit[535]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian kernel: audit: type=1400 audit(1679710093.249:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian kernel: audit: type=1400 audit(1679710093.249:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=535 comm="apparmor_parser"
Mar 25 07:53:13 debian nvidia-persistenced[618]: Started (618)
Mar 25 07:56:08 debian systemd[792]: app-nvidia\x2dsettings-c331a28429714074b2a5d6e26eab3325.scope: Succeeded.
Mar 25 07:56:08 debian systemd[792]: app-nvidia\x2dsettings-c331a28429714074b2a5d6e26eab3325.scope: Consumed 2.295s CPU time.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Can not turn on Prime Synchronization

#6 Post by Aki »

Hello,
sauravniraula wrote: 2023-03-25 14:08 Every thing works fine and is rendered by Nvidia.
but there is some screen tearing
[..]
It says Failed to find module 'nvidia-drm'
but 'nvidia_drm' is loaded

Code: Select all

sudo journalctl -b | grep nvidia
Mar 25 07:53:12 debian systemd-modules-load[288]: Failed to find module 'nvidia-drm'
[..]
Mar 25 07:53:12 debian kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Mar 25 07:53:12 debian kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[..]
Yes, you are right: despite the initial error, nvidia-drm is loaded (or it is already loaded) anyway. Therefore, it should not be a problem.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

sauravniraula
Posts: 4
Joined: 2023-03-25 00:50

Re: [Software] Can not turn on Prime Synchronization ( or enable nvidia_drm modeset )

#7 Post by sauravniraula »

Finally after 24 hours of search i found the issue.

the name of module nvidia-drm, nvidia is set to nvidia-current-drm, nvidia-current by dkms.

Code: Select all

ls /lib/modules/5.10.0-21-amd64/updates/dkms/
nvidia-current-drm.ko  nvidia-current.ko  nvidia-current-modeset.ko  nvidia-current-peermem.ko  nvidia-current-uvm.ko
so the fix was to change

Code: Select all

"options nvidia-drm modeset=1"
to
"options nvidia-current-drm modeset=1"
in /etc/modprobe.d/nvidia.conf or any conf file

then

Code: Select all

sudo update-initramfs -u
and reboot

check if problem is fixed by

Code: Select all

sudo cat /sys/module/nvidia_drm/parameters/modeset 
Y
If it outputs 'Y' modeset is enabled and prime synchronization will work.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Can not turn on Prime Synchronization ( enable nvidia_drm modeset )

#8 Post by Aki »

Happy you sorted it out. Thanks for sharing the solution.
It could be useful to mark the thread as solved putting the prefix “Solved” at the beginnig of the subject if the first post
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply