Having issues with outputing video to my external monitor

Hello!

I’ve recently migrated from a custom arch linux install (was having issues with battery and bumblebee not stopping, decided to check out endavouros instead of fixing it) and I tried getting my laptop (lenovo x1 extreme gen2) to output video to my external monitor.

On my previous arch linux install, after days of tinkering around, I got it to work decently reliably using

optirun intel-virtual-output

On endavour, whenever I run that command, it seems to do absolutely nothing. I went through my journalctl and dmesg and I got the following errors that I find to be important


JOURNALCTL LOGS

10] [WARN][XORG] (WW) NVIDIA: No DRM device: Direct render devices found but none could be
711] [WARN][XORG] (WW) NVIDIA:     used.
713] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
716] [WARN][XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
725] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=3: Failed to create a device for /dev/input/event12
727] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=3"
729] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=7: Failed to create a device for /dev/input/event13
731] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=7"
733] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=8: Failed to create a device for /dev/input/event14
734] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=8"
737] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=9: Failed to create a device for /dev/input/event15
738] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=9"
740] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=10: Failed to create a device for /dev/input/event16
742] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=10"
744] [ERROR][XORG] (EE) libinput: HDA NVidia HDMI/DP,pcm=11: Failed to create a device for /dev/input/event17
746] [ERROR][XORG] (EE) PreInit returned 2 for "HDA NVidia HDMI/DP,pcm=11"
752] [ERROR][XORG] (EE) libinput: Logitech USB Receiver Mouse: Failed to create a device for /dev/input/mouse0
754] [ERROR][XORG] (EE) PreInit returned 2 for "Logitech USB Receiver Mouse"
760] [ERROR][XORG] (EE) libinput: HDA Intel PCH Mic: Failed to create a device for /dev/input/event20
761] [ERROR][XORG] (EE) PreInit returned 2 for "HDA Intel PCH Mic"
764] [ERROR][XORG] (EE) libinput: HDA Intel PCH Headphone: Failed to create a device for /dev/input/event21
765] [ERROR][XORG] (EE) PreInit returned 2 for "HDA Intel PCH Headphone"
768] [ERROR][XORG] (EE) libinput: Synaptics TM3512-010: Failed to create a device for /dev/input/mouse1
770] [ERROR][XORG] (EE) PreInit returned 2 for "Synaptics TM3512-010"
773] [ERROR][XORG] (EE) libinput: TPPS/2 Elan TrackPoint: Failed to create a device for /dev/input/mouse2
774] [ERROR][XORG] (EE) PreInit returned 2 for "TPPS/2 Elan TrackPoint"
778] [ERROR][XORG] (EE) libinput: PC Speaker: Failed to create a device for /dev/input/event4
779] [ERROR][XORG] (EE) PreInit returned 2 for "PC Speaker"

DMESG LOGS

[   12.608881] snd_hda_intel 0000:01:00.1: can't change power state from D3cold to D0 (config space inaccessible)
[   12.824438] Bluetooth: RFCOMM TTY layer initialized
[   12.824444] Bluetooth: RFCOMM socket layer initialized
[   12.824449] Bluetooth: RFCOMM ver 1.11
[   12.988691] snd_hda_codec_hdmi hdaudioC1D0: Unable to sync register 0x4f0800. -5
[   12.988699] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988701] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988703] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988705] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988707] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988709] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988711] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988713] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988715] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988717] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988718] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   12.988720] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   20.027550] bbswitch: enabling discrete graphics
[   20.438478] nvidia: module license 'NVIDIA' taints kernel.
[   20.438481] Disabling lock debugging due to kernel taint
[   20.543687] nvidia-nvlink: Nvlink Core is being initialized, major device number 510

[   20.544626] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[   20.591551] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  515.65.01  Wed Jul 20 14:00:58 UTC 2022
[   21.521954] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  515.65.01  Wed Jul 20 13:43:59 UTC 2022
[   21.759054] snd_hda_codec_hdmi hdaudioC1D0: Unable to sync register 0x4f0800. -5
[   21.759072] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759082] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759090] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759098] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759106] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759114] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759122] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759129] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759137] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759145] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759153] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[   21.759160] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1

If more logs are needed please let me know, these just seemed like the important ones. The issue with the powerstate seems like it might be fixed with kernel 5.19. So when that is out I will let everyone know if it has been fixed or not. I also might be suspicious that this has something to do with my xorg or bumblebeed config so I have pasted them below as well

# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "true"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "true"
    Option "AllowEmptyInitialConfiguration"
    Option "UseDisplayDevice" "none"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "DiscreteNvidia"
EndSection

Please let me know if anyone else has ran into this issue!

You don’t want Bumblebee with 515xx. Stick to the official render offload support.

Go back and revert all of your configuration, then read https://wiki.archlinux.org/title/PRIME#PRIME_render_offload