Ubuntu – Ubuntu 16.04 nvidia drivers don’t work

16.04driversgraphicsnvidia

I've just installed a new ubuntu 16.04 ,
fresh install clean , logged in the first and only thing i did is selecting the proprietary driver 361 for nvidia , rebooted the machine .
anfter rebooting i can login but unity isn't showing , i can still right click though and open terminal , tried many answers:
link1
link2

did not help , i got frustrated , booted into usb and freshly installed it again, this time i tried 340 drivers same problem .
i mean this is 16.04 LTS for gods sake .
i have dual grahpic cards nvidia gt 740m , intel built on ASUS laptop .

output of grep "EE\|WW" /var/log/Xorg.0.log :

(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    23.758] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    23.761] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
[    25.323] (WW) Unresolved symbol: fbGetGCPrivateKey
[    25.448] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[    25.613] (WW) modeset(G0): Option "AllowEmptyInitialConfiguration" is not used
[    25.613] (WW) modeset(G0): Option "IgnoreDisplayDevices" is not used
[    25.902] (EE) NVIDIA(0): Failed to initiate mode change.
[    25.902] (EE) NVIDIA(0): Failed to complete mode change
[    26.214] (WW) evdev: SteelSeries Sensei Raw Gaming Mouse: ignoring absolute axes.
[    26.216] (WW) evdev: SteelSeries SteelSeries Apex Raw Gaming Keyboard: ignoring absolute axes.
[    26.272] (II) XINPUT: Adding extended input device "USBest Technology SiS HID Touch Controller" (type: TOUCHSCREEN, id 16)

full log file LOG

xorg.conf file :

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:4@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Best Answer

I also installed Ubuntu 16.04, clean install on a new hd and everything worked fine until I switched to NVIDIA driver. After rebooting I couldn't get past the login screen. The solution that worked for me was to disable secure boot.

While stuck in login loop, I switched to console Ctl+Alt+F1, rebooted and disabled secure boot in UEFI. Now everything works with nvidia driver installed.