Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to assign any connected display devices to X screen 0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
LinusTorvalds1
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2020
Posts: 80

PostPosted: Sat Jun 27, 2020 5:15 am    Post subject: Failed to assign any connected display devices to X screen 0 Reply with quote

First post here!

I'm currently running Gentoo on my laptop and currently only using the laptop display.

`lspci -k | grep -i vga -A3`
Code:
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
        Subsystem: Lenovo 3rd Gen Core processor Graphics Controller
        Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GTX 660M] (rev a1)
        Subsystem: Lenovo GK107M [GeForce GTX 660M]
        Kernel driver in use: nvidia
        Kernel modules: nvidia_drm, nvidia


I've installed `x11-drivers/nvidia-drivers` and I've also downloaded and installed the driver from NVIDIA's website (version 418.113 per their site).

I generated my xorg.conf file via `nvidia-xconfig`. It looks like this:

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.113

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection



If I run `startx` with just `exec i3` in my `.xinitrc`, I see the following errors in `/var/log/Xorg.0.log`:

Code:
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[   463.430] Build Operating System: Linux 5.4.38-gentoo x86_64 Gentoo
[   463.431] Current Operating System: Linux <omitted> 5.4.38-gentoo #1 SMP Sat Jun 20 03:10:30 PDT 2020 x86_64
[   463.431] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.38-gentoo root=/dev/sda4 ro
[   463.431] Build Date: 21 June 2020  08:48:43PM
...
[   463.553] (II) Module ABI versions:
[   463.553]    X.Org ANSI C Emulation: 0.4
[   463.553]    X.Org Video Driver: 24.1
[   463.553]    X.Org XInput driver : 24.1
[   463.553]    X.Org Server Extension : 10.0
[   463.554] (II) xfree86: Adding drm device (/dev/dri/card1)
[   463.560] (--) PCI:*(0@0:2:0) 8086:0166:17aa:3977 rev 9, Mem @ 0xd3000000/4194304, 0xe0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[   463.561] (--) PCI: (1@0:0:0) 10de:0fd4:17aa:3977 rev 161, Mem @ 0xd2000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128
[   463.561] (II) LoadModule: "glx"
[   463.561] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[   463.599] (II) Module glx: vendor="X.Org Foundation"
[   463.599]    compiled for 1.20.8, module version = 1.0.0
[   463.599]    ABI class: X.Org Server Extension, version 10.0
[   463.599] (II) LoadModule: "nvidia"
[   463.599] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[   463.600] (II) Module nvidia: vendor="NVIDIA Corporation"
[   463.600]    compiled for 4.0.2, module version = 1.0.0
[   463.600]    Module class: X.Org Video Driver
[   463.600] (II) NVIDIA dlloader X Driver  418.113  Sun Oct 27 00:12:58 UTC 2019
[   463.600] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   463.600] (--) using VT number 7
[   463.611] (II) Loading sub module "fb"
[   463.611] (II) LoadModule: "fb"
[   463.611] (II) Loading /usr/lib64/xorg/modules/libfb.so
[   463.620] (II) Module fb: vendor="X.Org Foundation"
[   463.620]    compiled for 1.20.8, module version = 1.0.0
[   463.620]    ABI class: X.Org ANSI C Emulation, version 0.4
[   463.620] (II) Loading sub module "wfb"
[   463.620] (II) LoadModule: "wfb"
[   463.620] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[   463.621] (II) Module wfb: vendor="X.Org Foundation"
[   463.622]    compiled for 1.20.8, module version = 1.0.0
[   463.622]    ABI class: X.Org ANSI C Emulation, version 0.4
[   463.622] (II) Loading sub module "ramdac"
[   463.622] (II) LoadModule: "ramdac"
[   463.622] (II) Module "ramdac" already built-in
[   463.622] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[   463.622] (==) NVIDIA(0): RGB weight 888
[   463.622] (==) NVIDIA(0): Default visual is TrueColor
[   463.622] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   463.622] (**) NVIDIA(0): Enabling 2D acceleration
[   463.622] (II) Loading sub module "glxserver_nvidia"
[   463.622] (II) LoadModule: "glxserver_nvidia"
[   463.623] (II) Loading /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
[   463.629] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[   463.629]    compiled for 4.0.2, module version = 1.0.0
[   463.629]    Module class: X.Org Server Extension
[   463.629] (II) NVIDIA GLX Module  418.113  Sun Oct 27 00:12:38 UTC 2019
[   463.816] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[   463.816] (--) NVIDIA(0):     CRT-0
[   463.819] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 660M (GK107) at PCI:1:0:0 (GPU-0)
[   463.819] (--) NVIDIA(0): Memory: 2097152 kBytes
[   463.819] (--) NVIDIA(0): VideoBIOS: 80.07.3c.00.11
[   463.819] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[   463.821] (--) NVIDIA(GPU-0): CRT-0: disconnected
[   463.821] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[   463.821] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0.
[   463.821] (EE) NVIDIA(0):     Set AllowEmptyInitialConfiguration if you want the server
[   463.821] (EE) NVIDIA(0):     to start anyway
[   463.821] (EE) NVIDIA(0): Failing initialization of X screen 0
[   463.853] (II) UnloadModule: "nvidia"
[   463.853] (II) UnloadSubModule: "glxserver_nvidia"
[   463.853] (II) Unloading glxserver_nvidia
[   463.853] (II) UnloadSubModule: "wfb"
[   463.853] (II) UnloadSubModule: "fb"
[   463.854] (EE) Screen(s) found, but none have a usable configuration.
[   463.854] (EE)
Fatal server error:
[   463.854] (EE) no screens found(EE)
[   463.854] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[   463.854] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   463.854] (EE)
[   463.912] (EE) Server terminated with error (1). Closing log file.


FYI, I've also generated `xorg.conf` via `X -configure`:

Code:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib64/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glxserver_nvidia"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        BusID       "PCI:1:0:0"
EndSection
Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "kmsdev"                    # <str>
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "PageFlip"                  # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "DoubleShadow"              # [<bool>]
        #Option     "Atomic"                    # [<bool>]
        Identifier  "Card1"
        Driver      "modesetting"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
Section "Screen"
        Identifier "Screen1"
        Device     "Card1"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection



And while I'm able to start X windows, I see a new issue, and I fear X is not utilizing my NVIDIA card. It's not able to load `glxservernvidia`, but I have `/usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so` (note underscore).


Code:

X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[   788.116] Build Operating System: Linux 5.4.38-gentoo x86_64 Gentoo
[   788.116] Current Operating System: Linux <omitted> 5.4.38-gentoo #1 SMP Sat Jun 20 03:10:30 PDT 2020 x86_64
[   788.116] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.38-gentoo root=/dev/sda4 ro
...
[   788.118] (II) Loader magic: 0x562aba8c4c20
[   788.118] (II) Module ABI versions:
[   788.118]    X.Org ANSI C Emulation: 0.4
[   788.118]    X.Org Video Driver: 24.1
[   788.118]    X.Org XInput driver : 24.1
[   788.118]    X.Org Server Extension : 10.0
[   788.118] (II) xfree86: Adding drm device (/dev/dri/card1)
[   788.118] (II) xfree86: Adding drm device (/dev/dri/card0)
[   788.138] (--) PCI:*(0@0:2:0) 8086:0166:17aa:3977 rev 9, Mem @ 0xd3000000/4194304, 0xe0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[   788.138] (--) PCI: (1@0:0:0) 10de:0fd4:17aa:3977 rev 161, Mem @ 0xd2000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128
[   788.138] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   788.138] (II) LoadModule: "glxservernvidia"
[   788.138] (WW) Warning, couldn't open module glxservernvidia
[   788.138] (EE) Failed to load module "glxservernvidia" (module does not exist, 0)
[   788.138] (II) LoadModule: "glx"
[   788.138] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[   788.139] (II) Module glx: vendor="X.Org Foundation"
[   788.139]    compiled for 1.20.8, module version = 1.0.0
[   788.139]    ABI class: X.Org Server Extension, version 10.0
[   788.139] (II) LoadModule: "nvidia"
[   788.139] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[   788.140] (II) Module nvidia: vendor="NVIDIA Corporation"
[   788.140]    compiled for 4.0.2, module version = 1.0.0
[   788.140]    Module class: X.Org Video Driver
[   788.140] (II) LoadModule: "modesetting"
[   788.140] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[   788.140] (II) Module modesetting: vendor="X.Org Foundation"
[   788.140]    compiled for 1.20.8, module version = 1.20.8
[   788.140]    Module class: X.Org Video Driver
[   788.140]    ABI class: X.Org Video Driver, version 24.1
...


`lsmod`:
Code:
Module                  Size  Used by
nvidia_modeset       1085440  0
nvidia              18198528  4 nvidia_modeset
efivarfs               16384  1


And I have `VIDEO_CARDS="nvidia"` in make.conf.
_________________
I'm not really Linus Torvalds... or am I?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Sat Jun 27, 2020 4:46 pm    Post subject: Reply with quote

Is it an OPTIMUS laptop ? I have a feeling that NVIDIA in optimus setup is not directly connected to the screen, intel controller is.

Check out this wiki

https://wiki.gentoo.org/wiki/NVIDIA/Optimus
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum