Saturday 11 August 2018

Xorg unable to detect screens in CentOS7

Summary

On a machine with  2 graphics card, one on-board Intel graphics and one NVidia graphics, Xorg is not able to properly detect the 2 screens connected to NVidia card. As a result of this, GUI login screen (GDM) does not show up. 


Some background

BIOS is configured to use NVidia card as the primary graphics card however Xorg is unable to detect the screens. The following lines are logged at the end of the /var/log/Xorg.0.log file ...

[    22.885] (EE) No devices detected.
[    22.902] 
Fatal server error:
[    22.902] no screens found
[    22.902] 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[    22.902] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    22.902]


The reason

This behaviour occurs due to the fact that the machine has 2 graphics card. Somehow the onboard Intel card takes priority over the NVidia card, even though the latter is set as the primary card in BIOS.As a result of this, Xorg is unable to detect the monitors, which are connected to NVidia card.


The solution

The solution for me was to create the following file /etc/X11/xorg.conf.d/10-nvidia.conf and add the following lines..

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

By doing this you are basically telling Xorg to use NVidia card as the primary card. One thing to note is the BusID line. You should find the correct bus id entry for your card. You can do so by using the following command...

# lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)

Also, note that the format is slightly different in 10-nvidia.conf,  (1:0:0) instead of (01:00.0).


No comments:

Post a Comment