У меня есть sddm. В процессе загрузки получаю чёрный экран.
https://wiki.gentoo.org/wiki/NVIDIA/Optimus#Before_starting_X Всё сделано по инструкции к sddm, но всё так же чёрный. Как мне понять, запускается ли скрипт? Руками выполняется и говорит, что «cant open display» (запускаю без иксов его, естественно дисплея нет).
xorg.conf:
https://pastebin.com/raw/wwLKRMjJ
lspci -nn | grep NVIDIA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:2560] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:228e] (rev a1)
dmesg | grep nvidia
[ 3.602539] nvidia: module license 'NVIDIA' taints kernel.
[ 3.612593] nvidia-nvlink: Nvlink Core is being initialized, major device number 245
[ 3.612794] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[ 3.612866] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[ 3.663446] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 470.63.01 Tue Aug 3 20:30:55 UTC 2021
[ 3.664100] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 3.664101] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[ 6.449892] nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device DP-4
[ 6.459016] nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device DP-4
cat /etc/sddm/scripts/Xsetup
#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-G0
xrandr --auto
xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x4a cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 7 associated providers: 0 name:modesetting
Provider 1: id: 0x275 cap: 0x2, Sink Output crtcs: 4 outputs: 6 associated providers: 0 name:NVIDIA-G0
Что я вообще делал:
- emerge x11-drivers/nvidia-drivers
- в make.conf добавил VIDEO_CARDS=«intel i965 iris nvidia»
- в ядро:
[*] Enable loadable module support --->
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Graphics support --->
[*] VGA Arbitration
Device Drivers --->
Character devices --->
[*] IPMI top-level message handler
Bus options (PCI etc.) --->
[*] Mark VGA/VBE/EFI FB as generic system framebuffer
Device Drivers --->
Graphics support --->
Frame buffer Devices --->
[*] Simple framebuffer support
и проверил нет ли там ничего лишнего от nvidia nouveau
- echo nvidia > /etc/modules-load.d/video.conf
- сгенерировал конфиг nvidia-xconfig
- в сгенерированном xorg.conf в секции Section «Device» заменил Identifier «Device0» на Identifier «nvidia»
- для sddm
xrandr --listproviders
Providers: number : 2 Provider 0: id: 0x4a cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 7 associated providers: 0 name:modesetting Provider 1: id: 0x275 cap: 0x2, Sink Output crtcs: 4 outputs: 6 associated providers: 0 name:NVIDIA-G0
в /etc/sddm.conf
в /etc/sddm/scripts/Xsetup[X11] DisplayCommand=/etc/sddm/scripts/Xsetup
#!/bin/sh xrandr --setprovideroutputsource modesetting NVIDIA-G0 xrandr --auto
chmod a+x /etc/sddm/scripts/Xsetup
- reboot