Nvidia no devices detected no screens found after nvidia-xconfig


Recently got a weird issue after applying an Nvidia driver update from the official repository.

Each time I boot, the computer hangs on run level 3 and fails to give me graphics. The recovery mode works fine though. The output of /var/log/Xorg.0.log is shown below.

X.Org X Server 1.16.1
Release Date: 2014-09-21
[    49.769] X Protocol Version 11, Revision 0
[    49.769] Build Operating System: openSUSE SUSE LINUX
[    49.769] Current Operating System: Linux linux-4pq9.site 3.16.7-21-desktop #1 SMP PREEMPT Tue Apr 14 07:11:37 UTC 2015 (93c1539) x86_64
[    49.769] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.16.7-21-desktop root=UUID=0260c55f-a241-4992-ae66-0e4fe49382b8 resume=/dev/disk/by-id/ata-ST500LM000-1EJ162_W373FN6V-part7 splash=silent quiet showopts
[    49.769] Build Date: 24 April 2015  02:26:24PM
[    49.769]  
[    49.769] Current version of pixman: 0.32.6
[    49.769]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    49.769] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    49.769] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jun 22 14:28:33 2015
[    49.769] (==) Using config file: "/etc/X11/xorg.conf"
[    49.769] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    49.769] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    49.771] (==) ServerLayout "Layout0"
[    49.771] (**) |-->Screen "Screen0" (0)
[    49.771] (**) |   |-->Monitor "Monitor0"
[    49.771] (**) |   |-->Device "Device0"
[    49.771] (**) |-->Input Device "Keyboard0"
[    49.771] (**) |-->Input Device "Mouse0"
[    49.771] (==) Automatically adding devices
[    49.771] (==) Automatically enabling devices
[    49.771] (==) Automatically adding GPU devices
[    49.771] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.
[    49.771]    Entry deleted from font path.
[    49.771] (==) FontPath set to:
        /usr/share/fonts/misc:unscaled,
        /usr/share/fonts/Type1/,
        /usr/share/fonts/100dpi:unscaled,
        /usr/share/fonts/75dpi:unscaled,            /usr/share/fonts/ghostscript/,
        /usr/share/fonts/ghostscript/,
        /usr/share/fonts/cyrillic:unscaled,
        /usr/share/fonts/truetype/,
        built-ins
[    49.771] (==) ModulePath set to "/usr/lib64/xorg/modules"
[    49.771] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    49.771] (WW) Disabling Keyboard0
[    49.771] (WW) Disabling Mouse0
[    49.771] (II) Loader magic: 0x80ec60
[    49.771] (II) Module ABI versions:
[    49.771]    X.Org ANSI C Emulation: 0.4
[    49.771]    X.Org Video Driver: 18.0
[    49.771]    X.Org XInput driver : 21.0
[    49.771]    X.Org Server Extension : 8.0
[    49.772] (II) xfree86: Adding drm device (/dev/dri/card1)
[    49.772] (II) xfree86: Adding drm device (/dev/dri/card0)
[    49.773] (--) PCI:*(0:0:2:0) 8086:0416:1028:05aa rev 6, Mem @ 0xd2000000/4194304, 0xc0000000/268435456, I/O @ 0x00005000/64
[    49.773] (--) PCI: (0:1:0:0) 10de:11e0:1028:05aa rev 161, Mem @ 0xd0000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[    49.773] (II) LoadModule: "glx"
[    49.873] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    50.247] (II) Module glx: vendor="X.Org Foundation"
[    50.247]    compiled for 1.16.1, module version = 1.0.0
[    50.247]    ABI class: X.Org Server Extension, version 8.0
[    50.247] (==) AIGLX enabled
[    50.248] (II) LoadModule: "nvidia"
[    50.248] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[    50.327] (II) Module nvidia: vendor="NVIDIA Corporation"
[    50.335]    compiled for 4.0.2, module version = 1.0.0
[    50.335]    Module class: X.Org Video Driver
[    50.346] (II) NVIDIA dlloader X Driver  346.72  Tue May  5 16:47:26 PDT 2015
[    50.346] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    50.359] (++) using VT number 7

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

This issue occured after I executed nvidia-xconfig, which will generate a new xorg.conf file. After a long time of searching and trials, including reinstalling the drivers and messing with bumblebee. I find out the solution is super easy: just remove /etc/X11/xorg.conf, OpenSUSE (or maybe all the up-to-date distros?) is smart enough to select the proper drivers and hardware to handle the graphics.

And I'm using an Nvidia optimus card together with an Intel integrated card, if anyone is interested, here's the output of my video card info.

$ lspci |grep -i vga

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK106M [GeForce GTX 770M] (rev a1)

By