Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

NVIDIA PRIME render offload not working in Xorg

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
anarchopunk
n00b
n00b
Posts: 6
Joined: Fri Feb 24, 2023 7:51 pm

NVIDIA PRIME render offload not working in Xorg

  • Quote

Post by anarchopunk » Sat Feb 25, 2023 3:14 am

I have both my Intel HD Graphics 3000 iGPU and my NVIDIA NVS4200M dGPU working independently (so I can tell Xorg to use either one of them by themselves), and I can even have my NVIDIA card render through the Intel card and onto the screen if I want, but for some reason I can't get offloading to work (PRIME), so that I can have the NVIDIA GPU run on a hidden screen and offload certain applications to it.

When I try to do that, according to the guidance found in the NVIDIA XFree86 "Offloading Graphics Display with RandR 1.4" docs and on the Gentoo Wiki, the NVIDIA graphics card just doesn't load at all. It's listed by lspci and `nvidia-xconfig --query-gpu-info`, but `xrandr --listproviders` only lists the intel card. The nvidia, nvidia-drm, and nvidia-modeset modules are indeed loaded, though.

Not only that, but when I try to run glxgears, it fails with the error:

Code: Select all

Error: couldn't get an RGB, Double-buffered visual
Which shouldn't happen even if we were rendering ONLY ON THE INTEL GPU, since by itself the intel gpu can do glxgears too, which means that by trying to have them work together, they both get broken. And of course, trying to run glxgears on the no-longer-existant NVIDIA GPU results in similar results:

Code: Select all

$ _NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
Xlib:  extension "GLX" missing on display ":0".
Error: couldn't get an RGB, Double-buffered visual
I've been struggling with this all night and can't figure out what's going wrong. Here's my X log and my xorg.conf (concatinated from several files in /etc/X11/xorg.conf.d/):

Code: Select all

[  3746.756] 
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[  3746.770] Current Operating System: Linux ibm-transpad 6.1.12-gentoo #7 SMP PREEMPT_DYNAMIC Thu Feb 23 09:09:07 EST 2023 x86_64
[  3746.771] Kernel command line: BOOT_IMAGE=/vmlinuz-6.1.12-gentoo root=/dev/sda3 ro video.use_native_backlight=0
[  3746.780]  
[  3746.785] Current version of pixman: 0.42.2
[  3746.795] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  3746.795] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  3746.813] (==) Log file: "/home/alexispurslane/.local/share/xorg/Xorg.0.log", Time: Fri Feb 24 22:01:01 2023
[  3746.818] (==) Using config file: "/etc/X11/xorg.conf"
[  3746.823] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  3746.828] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  3746.828] (==) ServerLayout "layout"
[  3746.828] (**) |-->Screen "intel" (0)
[  3746.828] (**) |   |-->Monitor "<default monitor>"
[  3746.829] (**) |   |-->Device "intel"
[  3746.829] (**) |   |-->GPUDevice "nvidia"
[  3746.829] (==) No monitor specified for screen "intel".
	Using a default monitor configuration.
[  3746.829] (**) |-->Inactive Device "nvidia"
[  3746.829] (==) Automatically adding devices
[  3746.829] (==) Automatically enabling devices
[  3746.829] (==) Automatically adding GPU devices
[  3746.829] (==) Automatically binding GPU devices
[  3746.829] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  3746.829] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[  3746.829] 	Entry deleted from font path.
[  3746.829] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[  3746.829] 	Entry deleted from font path.
[  3746.829] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[  3746.829] 	Entry deleted from font path.
[  3746.829] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
[  3746.829] 	Entry deleted from font path.
[  3746.829] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi").
[  3746.829] (==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/75dpi
[  3746.830] (==) ModulePath set to "/usr/lib64/xorg/modules"
[  3746.830] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  3746.830] (II) Module ABI versions:
[  3746.830] 	X.Org ANSI C Emulation: 0.4
[  3746.830] 	X.Org Video Driver: 25.2
[  3746.830] 	X.Org XInput driver : 24.4
[  3746.830] 	X.Org Server Extension : 10.0
[  3746.831] (++) using VT number 1

[  3746.835] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[  3746.838] (II) xfree86: Adding drm device (/dev/dri/card1)
[  3746.838] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
[  3746.840] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 10 paused 0
[  3746.840] (II) xfree86: Adding drm device (/dev/dri/card2)
[  3746.840] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card2
[  3746.842] (II) systemd-logind: got fd for /dev/dri/card2 226:2 fd 11 paused 0
[  3746.846] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib64/extensions/nvidia,/usr/lib64/xorg/modules"
[  3746.850] (--) PCI:*(0@0:2:0) 8086:0126:17aa:21d0 rev 9, Mem @ 0xf1400000/4194304, 0xe0000000/268435456, I/O @ 0x00006000/64, BIOS @ 0x????????/131072
[  3746.850] (--) PCI: (1@0:0:0) 10de:1057:17aa:21d0 rev 161, Mem @ 0xf0000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288
[  3746.850] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  3746.850] (II) LoadModule: "glx"
[  3746.850] (II) Loading /usr/lib64/extensions/nvidia/libglx.so
[  3746.862] (II) Module glx: vendor="NVIDIA Corporation"
[  3746.862] 	compiled for 4.0.2, module version = 1.0.0
[  3746.862] 	Module class: X.Org Server Extension
[  3746.862] (II) NVIDIA GLX Module  390.157  Wed Oct 12 09:19:15 UTC 2022
[  3746.862] (II) LoadModule: "modesetting"
[  3746.862] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[  3746.863] (II) Module modesetting: vendor="X.Org Foundation"
[  3746.863] 	compiled for 1.21.1.7, module version = 1.21.1
[  3746.863] 	Module class: X.Org Video Driver
[  3746.863] 	ABI class: X.Org Video Driver, version 25.2
[  3746.863] (II) LoadModule: "nvidia"
[  3746.863] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[  3746.864] (II) Module nvidia: vendor="NVIDIA Corporation"
[  3746.864] 	compiled for 4.0.2, module version = 1.0.0
[  3746.864] 	Module class: X.Org Video Driver
[  3746.864] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  3746.865] (II) NVIDIA dlloader X Driver  390.157  Wed Oct 12 09:21:41 UTC 2022
[  3746.865] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  3746.865] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[  3746.865] (II) modeset(0): using drv /dev/dri/card2
[  3746.865] (II) systemd-logind: releasing fd for 226:1
[  3746.867] (II) Loading sub module "fb"
[  3746.867] (II) LoadModule: "fb"
[  3746.867] (II) Module "fb" already built-in
[  3746.867] (II) Loading sub module "wfb"
[  3746.867] (II) LoadModule: "wfb"
[  3746.867] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[  3746.868] (II) Module wfb: vendor="X.Org Foundation"
[  3746.868] 	compiled for 1.21.1.7, module version = 1.0.0
[  3746.868] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  3746.868] (II) Loading sub module "ramdac"
[  3746.868] (II) LoadModule: "ramdac"
[  3746.868] (II) Module "ramdac" already built-in
[  3746.869] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  3746.869] (EE) Screen 1 deleted because of no matching config section.
[  3746.869] (II) UnloadModule: "nvidia"
[  3746.869] (II) UnloadSubModule: "wfb"
[  3746.869] (II) modeset(0): Creating default Display subsection in Screen section
	"intel" for depth/fbbpp 24/32
[  3746.869] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[  3746.869] (**) modeset(0): Option "AccelMethod" "glamor"
[  3746.869] (==) modeset(0): RGB weight 888
[  3746.869] (==) modeset(0): Default visual is TrueColor
[  3746.869] (II) Loading sub module "glamoregl"
[  3746.869] (II) LoadModule: "glamoregl"
[  3746.870] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[  3746.880] (II) Module glamoregl: vendor="X.Org Foundation"
[  3746.880] 	compiled for 1.21.1.7, module version = 1.0.1
[  3746.880] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  3746.982] (II) modeset(0): glamor X acceleration enabled on Mesa Intel(R) HD Graphics 3000 (SNB GT2)
[  3746.982] (II) modeset(0): glamor initialized
[  3746.982] (==) modeset(0): VariableRefresh: disabled
[  3746.982] (==) modeset(0): AsyncFlipSecondaries: disabled
[  3746.982] (II) modeset(0): Output LVDS-1 has no monitor section
[  3746.984] (II) modeset(0): Output VGA-1 has no monitor section
[  3746.984] (II) modeset(0): EDID for output LVDS-1
[  3746.984] (II) modeset(0): Manufacturer: LGD  Model: 2e2  Serial#: 0
[  3746.984] (II) modeset(0): Year: 2010  Week: 0
[  3746.984] (II) modeset(0): EDID Version: 1.3
[  3746.984] (II) modeset(0): Digital Display Input
[  3746.984] (II) modeset(0): Max Image Size [cm]: horiz.: 31  vert.: 17
[  3746.984] (II) modeset(0): Gamma: 2.20
[  3746.984] (II) modeset(0): No DPMS capabilities specified
[  3746.985] (II) modeset(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[  3746.985] (II) modeset(0): First detailed timing is preferred mode
[  3746.985] (II) modeset(0): redX: 0.591 redY: 0.348   greenX: 0.340 greenY: 0.558
[  3746.985] (II) modeset(0): blueX: 0.157 blueY: 0.129   whiteX: 0.313 whiteY: 0.329
[  3746.985] (II) modeset(0): Manufacturer's mask: 0
[  3746.985] (II) modeset(0): Supported detailed timing:
[  3746.985] (II) modeset(0): clock: 96.0 MHz   Image Size:  310 x 174 mm
[  3746.985] (II) modeset(0): h_active: 1600  h_sync: 1648  h_sync_end 1680 h_blank_end 1728 h_border: 0
[  3746.985] (II) modeset(0): v_active: 900  v_sync: 903  v_sync_end 908 v_blanking: 926 v_border: 0
[  3746.985] (II) modeset(0):  LG Display
[  3746.985] (II) modeset(0):  LP140WD2-TLB1
[  3746.985] (II) modeset(0): EDID (in hex):
[  3746.985] (II) modeset(0): 	00ffffffffffff0030e4e20200000000
[  3746.985] (II) modeset(0): 	00140103801f11780a43459759578e28
[  3746.985] (II) modeset(0): 	21505400000001010101010101010101
[  3746.985] (II) modeset(0): 	0101010101018025408060841a303020
[  3746.985] (II) modeset(0): 	350036ae100000190000000000000000
[  3746.985] (II) modeset(0): 	00000000000000000000000000fe004c
[  3746.985] (II) modeset(0): 	4720446973706c61790a2020000000fe
[  3746.985] (II) modeset(0): 	004c503134305744322d544c42310038
[  3746.986] (II) modeset(0): Printing probed modes for output LVDS-1
[  3746.986] (II) modeset(0): Modeline "1600x900"x60.0   96.00  1600 1648 1680 1728  900 903 908 926 -hsync -vsync (55.6 kHz eP)
[  3746.986] (II) modeset(0): Modeline "1600x900"x120.0  246.00  1600 1728 1900 2200  900 901 904 932 doublescan -hsync +vsync (111.8 kHz d)
[  3746.986] (II) modeset(0): Modeline "1600x900"x119.9  186.50  1600 1624 1640 1680  900 901 904 926 doublescan +hsync -vsync (111.0 kHz d)
[  3746.986] (II) modeset(0): Modeline "1600x900"x59.9  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync (56.0 kHz d)
[  3746.986] (II) modeset(0): Modeline "1600x900"x59.8   97.50  1600 1648 1680 1760  900 903 908 926 +hsync -vsync (55.4 kHz d)
[  3746.986] (II) modeset(0): Modeline "1400x900"x60.0  103.50  1400 1480 1624 1848  900 903 913 934 -hsync +vsync (56.0 kHz d)
[  3746.986] (II) modeset(0): Modeline "1400x900"x59.9   86.50  1400 1448 1480 1560  900 903 913 926 +hsync -vsync (55.4 kHz d)
[  3746.986] (II) modeset(0): Modeline "1440x810"x120.0  198.12  1440 1548 1704 1968  810 811 814 839 doublescan -hsync +vsync (100.7 kHz d)
[  3746.986] (II) modeset(0): Modeline "1440x810"x119.9  151.88  1440 1464 1480 1520  810 811 814 833 doublescan +hsync -vsync (99.9 kHz d)
[  3746.986] (II) modeset(0): Modeline "1368x768"x59.9   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync (47.8 kHz d)
[  3746.986] (II) modeset(0): Modeline "1368x768"x59.9   72.25  1368 1416 1448 1528  768 771 781 790 +hsync -vsync (47.3 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x800"x120.0  174.25  1280 1380 1516 1752  800 801 804 829 doublescan -hsync +vsync (99.5 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x800"x119.9  134.25  1280 1304 1320 1360  800 801 804 823 doublescan +hsync -vsync (98.7 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x800"x59.8   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x800"x59.9   71.00  1280 1328 1360 1440  800 803 809 823 +hsync -vsync (49.3 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x720"x120.0  156.12  1280 1376 1512 1744  720 721 724 746 doublescan -hsync +vsync (89.5 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x720"x120.0  120.75  1280 1304 1320 1360  720 721 724 740 doublescan +hsync -vsync (88.8 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x720"x59.9   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync (44.8 kHz d)
[  3746.986] (II) modeset(0): Modeline "1280x720"x59.7   63.75  1280 1328 1360 1440  720 723 728 741 +hsync -vsync (44.3 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x768"x120.1  133.47  1024 1100 1212 1400  768 768 770 794 doublescan -hsync +vsync (95.3 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x720"x120.0  117.00  960 1024 1128 1300  720 720 722 750 doublescan -hsync +vsync (90.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "928x696"x120.1  109.15  928 976 1088 1264  696 696 698 719 doublescan -hsync +vsync (86.4 kHz d)
[  3746.987] (II) modeset(0): Modeline "896x672"x120.0  102.40  896 960 1060 1224  672 672 674 697 doublescan -hsync +vsync (83.7 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x576"x119.9   98.50  1024 1092 1200 1376  576 577 580 597 doublescan -hsync +vsync (71.6 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x576"x119.9   78.38  1024 1048 1064 1104  576 577 580 592 doublescan +hsync -vsync (71.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x576"x59.9   46.50  1024 1064 1160 1296  576 579 584 599 -hsync +vsync (35.9 kHz d)
[  3746.987] (II) modeset(0): Modeline "1024x576"x59.8   42.00  1024 1072 1104 1184  576 579 584 593 +hsync -vsync (35.5 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x600"x119.9   96.62  960 1028 1128 1296  600 601 604 622 doublescan -hsync +vsync (74.6 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x600"x120.0   77.00  960 984 1000 1040  600 601 604 617 doublescan +hsync -vsync (74.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x540"x119.9   86.50  960 1024 1124 1288  540 541 544 560 doublescan -hsync +vsync (67.2 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x540"x120.0   69.25  960 984 1000 1040  540 541 544 555 doublescan +hsync -vsync (66.6 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x540"x59.6   40.75  960 992 1088 1216  540 543 548 562 -hsync +vsync (33.5 kHz d)
[  3746.987] (II) modeset(0): Modeline "960x540"x59.8   37.25  960 1008 1040 1120  540 543 548 556 +hsync -vsync (33.3 kHz d)
[  3746.987] (II) modeset(0): Modeline "800x600"x120.0   81.00  800 832 928 1080  600 600 602 625 doublescan +hsync +vsync (75.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz d)
[  3746.987] (II) modeset(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz d)
[  3746.987] (II) modeset(0): Modeline "840x525"x120.0   73.12  840 892 980 1120  525 526 529 544 doublescan -hsync +vsync (65.3 kHz d)
[  3746.987] (II) modeset(0): Modeline "840x525"x119.8   59.50  840 864 880 920  525 526 529 540 doublescan +hsync -vsync (64.7 kHz d)
[  3746.987] (II) modeset(0): Modeline "864x486"x59.9   32.50  864 888 968 1072  486 489 494 506 -hsync +vsync (30.3 kHz d)
[  3746.987] (II) modeset(0): Modeline "864x486"x59.6   30.50  864 912 944 1024  486 489 494 500 +hsync -vsync (29.8 kHz d)
[  3746.987] (II) modeset(0): Modeline "700x525"x120.0   61.00  700 744 820 940  525 526 532 541 doublescan +hsync +vsync (64.9 kHz d)
[  3746.987] (II) modeset(0): Modeline "800x450"x119.9   59.12  800 848 928 1056  450 451 454 467 doublescan -hsync +vsync (56.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "800x450"x119.6   48.75  800 824 840 880  450 451 454 463 doublescan +hsync -vsync (55.4 kHz d)
[  3746.987] (II) modeset(0): Modeline "640x512"x120.0   54.00  640 664 720 844  512 512 514 533 doublescan +hsync +vsync (64.0 kHz d)
[  3746.987] (II) modeset(0): Modeline "700x450"x119.9   51.75  700 740 812 924  450 451 456 467 doublescan -hsync +vsync (56.0 kHz d)
[  3746.988] (II) modeset(0): Modeline "700x450"x119.8   43.25  700 724 740 780  450 451 456 463 doublescan +hsync -vsync (55.4 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x480"x120.0   54.00  640 688 744 900  480 480 482 500 doublescan +hsync +vsync (60.0 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "720x405"x59.5   22.50  720 744 808 896  405 408 413 422 -hsync +vsync (25.1 kHz d)
[  3746.988] (II) modeset(0): Modeline "720x405"x59.0   21.75  720 768 800 880  405 408 413 419 +hsync -vsync (24.7 kHz d)
[  3746.988] (II) modeset(0): Modeline "684x384"x119.8   42.62  684 720 788 892  384 385 390 399 doublescan -hsync +vsync (47.8 kHz d)
[  3746.988] (II) modeset(0): Modeline "684x384"x119.7   36.12  684 708 724 764  384 385 390 395 doublescan +hsync -vsync (47.3 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x400"x119.8   41.75  640 676 740 840  400 401 404 415 doublescan -hsync +vsync (49.7 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x400"x120.0   35.50  640 664 680 720  400 401 404 411 doublescan +hsync -vsync (49.3 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x360"x119.7   37.25  640 672 736 832  360 361 364 374 doublescan -hsync +vsync (44.8 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x360"x119.7   31.88  640 664 680 720  360 361 364 370 doublescan +hsync -vsync (44.3 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x360"x59.8   18.00  640 664 720 800  360 363 368 376 -hsync +vsync (22.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "640x360"x59.3   17.75  640 688 720 800  360 363 368 374 +hsync -vsync (22.2 kHz d)
[  3746.988] (II) modeset(0): Modeline "512x384"x120.0   32.50  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.4 kHz d)
[  3746.988] (II) modeset(0): Modeline "512x288"x120.0   23.25  512 532 580 648  288 289 292 299 doublescan -hsync +vsync (35.9 kHz d)
[  3746.988] (II) modeset(0): Modeline "512x288"x119.8   21.00  512 536 552 592  288 289 292 296 doublescan +hsync -vsync (35.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "480x270"x119.3   20.38  480 496 544 608  270 271 274 281 doublescan -hsync +vsync (33.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "480x270"x119.6   18.62  480 504 520 560  270 271 274 278 doublescan +hsync -vsync (33.3 kHz d)
[  3746.988] (II) modeset(0): Modeline "400x300"x120.6   20.00  400 420 484 528  300 300 302 314 doublescan +hsync +vsync (37.9 kHz d)
[  3746.988] (II) modeset(0): Modeline "400x300"x112.7   18.00  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (35.2 kHz d)
[  3746.988] (II) modeset(0): Modeline "432x243"x119.8   16.25  432 444 484 536  243 244 247 253 doublescan -hsync +vsync (30.3 kHz d)
[  3746.988] (II) modeset(0): Modeline "432x243"x119.1   15.25  432 456 472 512  243 244 247 250 doublescan +hsync -vsync (29.8 kHz d)
[  3746.988] (II) modeset(0): Modeline "320x240"x120.1   12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "360x202"x119.0   11.25  360 372 404 448  202 204 206 211 doublescan -hsync +vsync (25.1 kHz d)
[  3746.988] (II) modeset(0): Modeline "360x202"x118.3   10.88  360 384 400 440  202 204 206 209 doublescan +hsync -vsync (24.7 kHz d)
[  3746.988] (II) modeset(0): Modeline "320x180"x119.7    9.00  320 332 360 400  180 181 184 188 doublescan -hsync +vsync (22.5 kHz d)
[  3746.988] (II) modeset(0): Modeline "320x180"x118.6    8.88  320 344 360 400  180 181 184 187 doublescan +hsync -vsync (22.2 kHz d)
[  3746.990] (II) modeset(0): EDID for output VGA-1
[  3746.990] (II) modeset(0): Output LVDS-1 connected
[  3746.990] (II) modeset(0): Output VGA-1 disconnected
[  3746.990] (II) modeset(0): Using exact sizes for initial modes
[  3746.990] (II) modeset(0): Output LVDS-1 using initial mode 1600x900 +0+0
[  3746.990] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[  3746.990] (==) modeset(0): DPI set to (96, 96)
[  3746.990] (II) Loading sub module "fb"
[  3746.990] (II) LoadModule: "fb"
[  3746.990] (II) Module "fb" already built-in
[  3747.040] (==) modeset(0): Backing store enabled
[  3747.040] (==) modeset(0): Silken mouse enabled
[  3747.069] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[  3747.069] (==) modeset(0): DPMS enabled
[  3747.069] (WW) modeset(0): Option "DRI" is not used
[  3747.069] (WW) modeset(0): Option "AllowEmptyInitialConfiguration" is not used
[  3747.069] (II) modeset(0): [DRI2] Setup complete
[  3747.069] (II) modeset(0): [DRI2]   DRI driver: crocus
[  3747.069] (II) modeset(0): [DRI2]   VDPAU driver: va_gl
[  3747.069] (II) Initializing extension Generic Event Extension
[  3747.069] (II) Initializing extension SHAPE
[  3747.069] (II) Initializing extension MIT-SHM
[  3747.069] (II) Initializing extension XInputExtension
[  3747.069] (II) Initializing extension XTEST
[  3747.069] (II) Initializing extension BIG-REQUESTS
[  3747.069] (II) Initializing extension SYNC
[  3747.069] (II) Initializing extension XKEYBOARD
[  3747.069] (II) Initializing extension XC-MISC
[  3747.070] (II) Initializing extension XFIXES
[  3747.070] (II) Initializing extension RENDER
[  3747.070] (II) Initializing extension RANDR
[  3747.070] (II) Initializing extension COMPOSITE
[  3747.070] (II) Initializing extension DAMAGE
[  3747.070] (II) Initializing extension MIT-SCREEN-SAVER
[  3747.070] (II) Initializing extension DOUBLE-BUFFER
[  3747.070] (II) Initializing extension RECORD
[  3747.070] (II) Initializing extension DPMS
[  3747.070] (II) Initializing extension Present
[  3747.070] (II) Initializing extension DRI3
[  3747.070] (II) Initializing extension X-Resource
[  3747.070] (II) Initializing extension XVideo
[  3747.070] (II) Initializing extension XVideo-MotionCompensation
[  3747.070] (II) Initializing extension XFree86-VidModeExtension
[  3747.070] (II) Initializing extension XFree86-DGA
[  3747.070] (II) Initializing extension XFree86-DRI
[  3747.070] (II) Initializing extension DRI2
[  3747.070] (II) Initializing extension GLX
[  3747.070] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
[  3747.071] (II) modeset(0): Damage tracking initialized
[  3747.071] (II) modeset(0): Setting screen physical size to 423 x 238
[  3747.190] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[  3747.190] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[  3747.190] (II) LoadModule: "libinput"
[  3747.191] (II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so
[  3747.192] (II) Module libinput: vendor="X.Org Foundation"
[  3747.192] 	compiled for 1.21.1.7, module version = 1.2.1
[  3747.192] 	Module class: X.Org XInput Driver
[  3747.192] 	ABI class: X.Org XInput driver, version 24.4
[  3747.192] (II) Using input driver 'libinput' for 'Power Button'
[  3747.195] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 24 paused 0
[  3747.195] (**) Power Button: always reports core events
[  3747.195] (**) Option "Device" "/dev/input/event2"
[  3747.201] (II) event2  - Power Button: is tagged by udev as: Keyboard
[  3747.202] (II) event2  - Power Button: device is a keyboard
[  3747.202] (II) event2  - Power Button: device removed
[  3747.202] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2"
[  3747.202] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[  3747.205] (II) event2  - Power Button: is tagged by udev as: Keyboard
[  3747.206] (II) event2  - Power Button: device is a keyboard
[  3747.208] (II) config/udev: Adding input device Video Bus (/dev/input/event8)
[  3747.208] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[  3747.208] (II) Using input driver 'libinput' for 'Video Bus'
[  3747.210] (II) systemd-logind: got fd for /dev/input/event8 13:72 fd 27 paused 0
[  3747.210] (**) Video Bus: always reports core events
[  3747.210] (**) Option "Device" "/dev/input/event8"
[  3747.213] (II) event8  - Video Bus: is tagged by udev as: Keyboard
[  3747.214] (II) event8  - Video Bus: device is a keyboard
[  3747.214] (II) event8  - Video Bus: device removed
[  3747.214] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input10/event8"
[  3747.214] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
[  3747.217] (II) event8  - Video Bus: is tagged by udev as: Keyboard
[  3747.218] (II) event8  - Video Bus: device is a keyboard
[  3747.220] (II) config/udev: Adding input device Video Bus (/dev/input/event9)
[  3747.220] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[  3747.220] (II) Using input driver 'libinput' for 'Video Bus'
[  3747.223] (II) systemd-logind: got fd for /dev/input/event9 13:73 fd 28 paused 0
[  3747.223] (**) Video Bus: always reports core events
[  3747.223] (**) Option "Device" "/dev/input/event9"
[  3747.226] (II) event9  - Video Bus: is tagged by udev as: Keyboard
[  3747.226] (II) event9  - Video Bus: device is a keyboard
[  3747.227] (II) event9  - Video Bus: device removed
[  3747.227] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/LNXVIDEO:01/input/input11/event9"
[  3747.227] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 8)
[  3747.231] (II) event9  - Video Bus: is tagged by udev as: Keyboard
[  3747.231] (II) event9  - Video Bus: device is a keyboard
[  3747.233] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)
[  3747.233] (II) No input driver specified, ignoring this device.
[  3747.233] (II) This device may have been added with another device file.
[  3747.235] (II) config/udev: Adding input device Sleep Button (/dev/input/event1)
[  3747.235] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[  3747.235] (II) Using input driver 'libinput' for 'Sleep Button'
[  3747.237] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 29 paused 0
[  3747.237] (**) Sleep Button: always reports core events
[  3747.237] (**) Option "Device" "/dev/input/event1"
[  3747.240] (II) event1  - Sleep Button: is tagged by udev as: Keyboard
[  3747.240] (II) event1  - Sleep Button: device is a keyboard
[  3747.241] (II) event1  - Sleep Button: device removed
[  3747.241] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1/event1"
[  3747.241] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 9)
[  3747.244] (II) event1  - Sleep Button: is tagged by udev as: Keyboard
[  3747.244] (II) event1  - Sleep Button: device is a keyboard
[  3747.246] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event4)
[  3747.246] (II) No input driver specified, ignoring this device.
[  3747.246] (II) This device may have been added with another device file.
[  3747.248] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event5)
[  3747.248] (II) No input driver specified, ignoring this device.
[  3747.248] (II) This device may have been added with another device file.
[  3747.250] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)
[  3747.250] (**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
[  3747.251] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[  3747.253] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 30 paused 0
[  3747.253] (**) AT Translated Set 2 keyboard: always reports core events
[  3747.253] (**) Option "Device" "/dev/input/event3"
[  3747.256] (II) event3  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[  3747.256] (II) event3  - AT Translated Set 2 keyboard: device is a keyboard
[  3747.258] (II) event3  - AT Translated Set 2 keyboard: device removed
[  3747.258] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input3/event3"
[  3747.258] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 10)
[  3747.261] (II) event3  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[  3747.262] (II) event3  - AT Translated Set 2 keyboard: device is a keyboard
[  3747.265] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event6)
[  3747.265] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[  3747.265] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "SynPS/2 Synaptics Touchpad"
[  3747.265] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[  3747.268] (II) systemd-logind: got fd for /dev/input/event6 13:70 fd 31 paused 0
[  3747.268] (**) SynPS/2 Synaptics TouchPad: always reports core events
[  3747.268] (**) Option "Device" "/dev/input/event6"
[  3747.271] (II) event6  - SynPS/2 Synaptics TouchPad: is tagged by udev as: Touchpad
[  3747.274] (II) event6  - SynPS/2 Synaptics TouchPad: device is a touchpad
[  3747.275] (II) event6  - SynPS/2 Synaptics TouchPad: device removed
[  3747.275] (**) Option "Tapping" "on"
[  3747.275] (**) Option "NaturalScrolling" "on"
[  3747.276] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input5/event6"
[  3747.276] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 11)
[  3747.279] (**) Option "AccelerationScheme" "none"
[  3747.279] (**) SynPS/2 Synaptics TouchPad: (accel) selected scheme none/0
[  3747.279] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[  3747.279] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[  3747.282] (II) event6  - SynPS/2 Synaptics TouchPad: is tagged by udev as: Touchpad
[  3747.285] (II) event6  - SynPS/2 Synaptics TouchPad: device is a touchpad
[  3747.288] (II) config/udev: Adding input device ThinkPad Extra Buttons (/dev/input/event7)
[  3747.289] (**) ThinkPad Extra Buttons: Applying InputClass "libinput keyboard catchall"
[  3747.289] (II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'
[  3747.291] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 32 paused 0
[  3747.291] (**) ThinkPad Extra Buttons: always reports core events
[  3747.291] (**) Option "Device" "/dev/input/event7"
[  3747.294] (II) event7  - ThinkPad Extra Buttons: is tagged by udev as: Keyboard Switch
[  3747.294] (II) event7  - ThinkPad Extra Buttons: device is a keyboard
[  3747.295] (II) event7  - ThinkPad Extra Buttons: device removed
[  3747.295] (**) Option "config_info" "udev:/sys/devices/platform/thinkpad_acpi/input/input9/event7"
[  3747.295] (II) XINPUT: Adding extended input device "ThinkPad Extra Buttons" (type: KEYBOARD, id 12)
[  3747.298] (II) event7  - ThinkPad Extra Buttons: is tagged by udev as: Keyboard Switch
[  3747.298] (II) event7  - ThinkPad Extra Buttons: device is a keyboard
[  3750.656] (II) modeset(0): EDID vendor "LGD", prod id 738
[  3750.656] (II) modeset(0): Printing DDC gathered Modelines:
[  3750.656] (II) modeset(0): Modeline "1600x900"x0.0   96.00  1600 1648 1680 1728  900 903 908 926 -hsync -vsync (55.6 kHz eP)
[  3750.659] (II) modeset(0): EDID vendor "LGD", prod id 738
[  3750.659] (II) modeset(0): Printing DDC gathered Modelines:
[  3750.659] (II) modeset(0): Modeline "1600x900"x0.0   96.00  1600 1648 1680 1728  900 903 908 926 -hsync -vsync (55.6 kHz eP)
[  3790.493] (II) Axis 0x1 value 1213 is outside expected range [1253, 4652]
See https://wayland.freedesktop.org/libinput/doc/1.21.0/absolute_coordinate_ranges.html for details
Xorg.conf:

Code: Select all


Section "ServerLayout"
	Identifier "layout"
	Screen 0 "intel"
	Inactive "nvidia"
	Option "AllowNVIDIAGPUScreens"
EndSection

Section "module"
	Load "glx"
EndSection

Section "Device"
	Identifier "intel"
	Driver "modesetting"
	Option "AccelMethod" "glamor"
	Option "DRI" "3"
	BusID "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "intel"
	Device "intel"
	Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "PCI:1:0:0"
EndSection

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

We're building a new world, all of my friends and me
It's not an exact science yet, but we have the technology
Top
mirekm
Apprentice
Apprentice
User avatar
Posts: 237
Joined: Thu Feb 12, 2004 8:17 am
Location: Gliwice

  • Quote

Post by mirekm » Sat Feb 25, 2023 10:32 am

[ 3747.070] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
Try to reinstall nvidia drivers.

What else?

in nvidia device section try to add:

Code: Select all

Option          "AllowIndirectGLXProtocol"
Top
anarchopunk
n00b
n00b
Posts: 6
Joined: Fri Feb 24, 2023 7:51 pm

  • Quote

Post by anarchopunk » Sat Feb 25, 2023 1:14 pm

I tried both and it didn't work. Same logs too.
We're building a new world, all of my friends and me
It's not an exact science yet, but we have the technology
Top
mrbassie
l33t
l33t
User avatar
Posts: 855
Joined: Fri May 31, 2013 5:46 pm
Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.

Re: NVIDIA PRIME render offload not working in Xorg

  • Quote

Post by mrbassie » Sun Feb 26, 2023 8:45 pm

anarchopunk wrote:

Code: Select all

Error: couldn't get an RGB, Double-buffered visual
This any help?
Top
anarchopunk
n00b
n00b
Posts: 6
Joined: Fri Feb 24, 2023 7:51 pm

  • Quote

Post by anarchopunk » Sun Feb 26, 2023 8:51 pm

No, that error is what I'm trying to get ti the bottom of
We're building a new world, all of my friends and me
It's not an exact science yet, but we have the technology
Top
BaltazarGabka
n00b
n00b
Posts: 13
Joined: Tue Dec 07, 2021 8:52 pm
Location: Poland

Re: NVIDIA PRIME render offload not working in Xorg

  • Quote

Post by BaltazarGabka » Mon Feb 27, 2023 11:33 pm

I've been looking for a solution for the same problem for a few days about a week ago and I finally managed to get it working (sort of), however there are some problems I wasn't able to solve yet. I have a little bit newer Intel HD Graphics 4000 and GeForce GT 720M, so you should use the same nvidia driver version (390.157 - the latest available in Gentoo repository).

First of all I added "nvidia-drm.modeset=1" parameter to the linux kernel command line (so line in /etc/default/grub responsible for doing so now looks like this: GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1"). It works without it, but some animations don't work properly. Then regenerate grub configuration file. After this step xrandr --listproviders showed two providers, however both were Intel.

Then I created xorg.conf file in /etc/X11/ according to this page. This gave me black screen and in xorg log I've found an error that it couldn't find a display (or screen, I don't remember the exact error).

According to NVIDIA/Optimus - Gentoo Wiki I had to save EDID screen information to a file to pass it to the driver. Tool recommended by the Wiki (x11-misc/read-edid) didn't work for me, so I have to find another solution. I've found this script to save EDID to a file. First you need to use "xrandr --listmonitors" to specify which display you want to use, and then pass it as a parameter to this script (in my case it was LVDS-1). I changed xorg.conf, and now it looks like this:

Code: Select all

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConnectedMonitor" "LVDS-1"
    Option "CustomEDID" "LVDS-1:/lib/firmware/edid/monitor.bin"
    Option "UseEDID" "True"
EndSection

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

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    Option "CustomEDID" "LVDS-1:/lib/firmware/edid/monitor.bin"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection
The last thing was to add another parameter to the linux kernel command line, so finally line in /etc/default/grub looks like this: GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 drm_kms_helper.edid_firmware=edid/monitor.bin".

Of course you have to execute the following commands before starting X (configuration depends on display manager you use):

Code: Select all

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
In my case this was enough to make xrandr --listproviders to show two providers: Nvidia and Intel. However I'm not sure if something like _NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears will work with 390.157 drivers.

Unfortunately in this configuration I have some problems. Now my computer does not resume from suspend. Also when I switch from tty1 (or any other) to tty7 I get notification form kwin (I use Plasma): "Desktop effects were restarted due to a graphics reset."
anarchopunk wrote:I have both my Intel HD Graphics 3000 iGPU and my NVIDIA NVS4200M dGPU working independently (so I can tell Xorg to use either one of them by themselves), and I can even have my NVIDIA card render through the Intel card and onto the screen if I want
How did you manage to do this?
Top
Post Reply

6 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy