Добрый день, пытаюсь запустить Xorg на дискретной видеокарте (для этого создавал файл /etc/X11/xorg.conf.d/nvidia.conf), он вроде как запускается (тк в другом окне через htop видно что запускаются терминалы и браузер), но изоображение зависает на запуске команды startx. Содержание файла /etc/X11/xorg.conf.d/nvidia.conf
Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
Лог при запуске
cat .local/share/xorg/Xorg.0.log | grep -iEA10 "fail|nvidia"
[ 11406.064] (**) | |-->Device "nvidia"
[ 11406.064] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 11406.064] (==) Automatically adding devices
[ 11406.064] (==) Automatically enabling devices
[ 11406.064] (==) Automatically adding GPU devices
[ 11406.064] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 11406.064] (WW) The directory "/usr/share/fonts/misc/" does not exist.
[ 11406.064] Entry deleted from font path.
[ 11406.064] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[ 11406.064] Entry deleted from font path.
--
[ 11406.067] (II) LoadModule: "nvidia"
[ 11406.067] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[ 11406.067] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 11406.067] compiled for 1.6.99.901, module version = 1.0.0
[ 11406.067] Module class: X.Org Video Driver
[ 11406.067] (II) NVIDIA dlloader X Driver 460.27.04 Fri Dec 11 23:28:50 UTC 2020
[ 11406.067] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 11406.067] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 11406.067] (II) systemd-logind: releasing fd for 226:1
[ 11406.067] (II) Loading sub module "fb"
[ 11406.067] (II) LoadModule: "fb"
[ 11406.067] (II) Loading /usr/lib64/xorg/modules/libfb.so
[ 11406.068] (II) Module fb: vendor="X.Org Foundation"
[ 11406.068] compiled for 1.20.10, module version = 1.0.0
[ 11406.068] ABI class: X.Org ANSI C Emulation, version 0.4
[ 11406.068] (II) Loading sub module "wfb"
[ 11406.068] (II) LoadModule: "wfb"
[ 11406.068] (II) Loading /usr/lib64/xorg/modules/libwfb.so
--
[ 11406.068] (II) NVIDIA(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 11406.068] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 11406.068] (==) NVIDIA(0): RGB weight 888
[ 11406.068] (==) NVIDIA(0): Default visual is TrueColor
[ 11406.068] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 11406.068] (**) NVIDIA(0): Enabling 2D acceleration
[ 11406.068] (II) Loading sub module "glxserver_nvidia"
[ 11406.068] (II) LoadModule: "glxserver_nvidia"
[ 11406.068] (II) Loading /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
[ 11406.071] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[ 11406.071] compiled for 1.6.99.901, module version = 1.0.0
[ 11406.071] Module class: X.Org Server Extension
[ 11406.071] (II) NVIDIA GLX Module 460.27.04 Fri Dec 11 23:26:36 UTC 2020
[ 11406.071] (II) NVIDIA: The X server supports PRIME Render Offload.
[ 11406.248] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 1050 (GP107-A) at PCI:1:0:0 (GPU-0)
[ 11406.248] (--) NVIDIA(0): Memory: 2097152 kBytes
[ 11406.248] (--) NVIDIA(0): VideoBIOS: 86.07.50.00.7e
[ 11406.248] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[ 11406.248] (II) NVIDIA(0): Validated MetaModes:
[ 11406.248] (II) NVIDIA(0): "NULL"
[ 11406.248] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[ 11406.248] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[ 11406.248] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[ 11406.249] (WW) NVIDIA: Failed to bind sideband socket to
[ 11406.249] (WW) NVIDIA: '/var/run/nvidia-xdriver-4b24cf2e' Permission denied
[ 11406.249] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
[ 11406.249] (II) NVIDIA: access.
[ 11406.252] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[ 11406.252] (II) NVIDIA(0): may not be running or the "AcpidSocketPath" X
[ 11406.252] (II) NVIDIA(0): configuration option may not be set correctly. When the
[ 11406.252] (II) NVIDIA(0): ACPI event daemon is available, the NVIDIA X driver will
[ 11406.252] (II) NVIDIA(0): try to use it to receive ACPI event notifications. For
[ 11406.252] (II) NVIDIA(0): details, please see the "ConnectToAcpid" and
[ 11406.252] (II) NVIDIA(0): "AcpidSocketPath" X configuration options in Appendix B: X
[ 11406.252] (II) NVIDIA(0): Config Options in the README.
[ 11406.270] (II) NVIDIA(0): Setting mode "NULL"
[ 11406.272] (==) NVIDIA(0): Disabling shared memory pixmaps
[ 11406.272] (==) NVIDIA(0): Backing store enabled
[ 11406.272] (==) NVIDIA(0): Silken mouse enabled
[ 11406.272] (==) NVIDIA(0): DPMS enabled
[ 11406.272] (II) Loading sub module "dri2"
[ 11406.272] (II) LoadModule: "dri2"
[ 11406.272] (II) Module "dri2" already built-in
[ 11406.272] (II) NVIDIA(0): [DRI2] Setup complete
[ 11406.272] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
[ 11406.272] (II) Initializing extension Generic Event Extension
[ 11406.272] (II) Initializing extension SHAPE
[ 11406.273] (II) Initializing extension MIT-SHM
[ 11406.273] (II) Initializing extension XInputExtension
[ 11406.273] (II) Initializing extension XTEST
[ 11406.273] (II) Initializing extension BIG-REQUESTS
[ 11406.273] (II) Initializing extension SYNC
[ 11406.273] (II) Initializing extension XKEYBOARD
[ 11406.273] (II) Initializing extension XC-MISC
[ 11406.273] (II) Initializing extension XFIXES
--
[ 11417.228] (II) NVIDIA(GPU-0): Deleting GPU-0
[ 11417.242] (II) Server terminated successfully (0). Closing log file.
Если удалить этот конфиг, то запуск идет на iGPU
lspci -vnnn | grep -iEA9 "vga|3d"
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b] (prog-if 00 [VGA controller])
DeviceName: Onboard - Video
Subsystem: Micro-Star International Co., Ltd. [MSI] UHD Graphics 630 (Mobile) [1462:1219]
Flags: bus master, fast devsel, latency 0, IRQ 123
Memory at a2000000 (64-bit, non-prefetchable) [size=16M]
Memory at 80000000 (64-bit, prefetchable) [size=256M]
I/O ports at 5000 [size=64]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: i915
--
01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] [10de:1c8d] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] GP107M [GeForce GTX 1050 Mobile] [1462:1219]
Flags: bus master, fast devsel, latency 0, IRQ 151
Memory at a3000000 (32-bit, non-prefetchable) [size=16M]
Memory at 90000000 (64-bit, prefetchable) [size=256M]
Memory at a0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 4000 [size=128]
Expansion ROM at a4000000 [virtual] [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Но при этом вроде как GPU все равно используется
nvidia-smi
Tue Feb 2 15:33:34 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.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 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 N/A / N/A | 4MiB / 2002MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 18588 G /usr/bin/X 4MiB |
+-----------------------------------------------------------------------------+
glxinfo | grep -i device
Device: llvmpipe (LLVM 11.0.1, 256 bits) (0xffffffff)
glxinfo | grep -i render
direct rendering: Yes
GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method,
GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_copy_image, GL_NV_depth_clamp,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,
GL_EXT_render_snorm, GL_EXT_robustness, GL_EXT_sRGB_write_control,
GL_MESA_shader_integer_functions, GL_NV_conditional_render,
GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,
Система: OpenRC c elogind. optimus не пробовал использовать. В ядре собрано все что указано https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers кроме Enable agpgart support. В группе video пользователь состоит. В make.conf прописано VIDEO_CARD=«nvidia»
qlist -IU | grep -i nvidia
x11-drivers/nvidia-drivers abi_x86_32 abi_x86_64 driver kms libglvnd multilib tools