Ubuntu GNOME boots to black screen when using proprietary Nvidia drivers

Bug #1559576 reported by Manvydas
696
This bug affects 172 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Unknown
Critical
Ubuntu GNOME
Fix Released
Critical
Unassigned
gnome-shell (Ubuntu)
Fix Released
Critical
Unassigned
nvidia-graphics-drivers-375 (Ubuntu)
Fix Released
High
Alberto Milone
Xenial
Fix Released
High
Unassigned
Yakkety
Fix Released
High
Unassigned
Zesty
Fix Released
High
Unassigned

Bug Description

To fix this now without waiting for the Stable Release Update
=============================================================
Install xserver-xorg-legacy

Impact
======
Many users are unable to use their computers after installing the NVIDIA proprietary drivers to Ubuntu GNOME. Specifically, the log in screen does not load.

The problem is that many of nvidia-* driver packages do not depend on xserver-xorg-legacy which is needed for gdm/gnome-shell to work

Test Case
=========
1. Check that gnome-shell depends on xserver-xorg-legacy.

2. Optionally, if you have an affected computer, set gdm as the default login manager (sudo apt install gdm3; sudo dpkg-reconfigure gdm3; sudo reboot). Does the login screen show up? And can you log in to gnome (sudo apt install gnome-shell)?

Regression Potential
====================
Low. Installing a missing dependency should cause no issues; if it does, something is very broken already.

Other Info
==========
The most minimal fix here for 16.04 LTS and 16.10 is to just have gnome-shell depend on xserver-xorg-legacy. Updating all the nvidia-* packages in Ubuntu and the PPAs would be a lot more trouble; although that would still be a good idea so that this gnome-shell dependency could be dropped in future Ubuntu releases.

xserver-xorg-legacy is a very small package.

gdm3 depends on gnome-shell.

Original Bug Report
===================
Using latest Ubuntu Gnome x64 daily build with all updates installed.
Lenovo Z70-80 laptop with Nvidia 840M, BIOS updated to latest version, secure boot and other potentially problematic BIOS settings disabled.

Can only see a black screen instead of a log-in screen after boot completes when proprietary Nvidia drivers are installed.
Regular Ubuntu works absolutely fine on the same machine with the same driver version. Attempting to use older drivers on Ubuntu Gnome made no difference.

Bug is affecting more than just me. We were talking about workarounds in ubuntuforums. User fthx claims that switching to lightdm fixes the issue http://ubuntuforums.org/showthread.php?t=2317628&p=13457703#post13457703

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-14-generic 4.4.0-14.30
ProcVersionSignature: Ubuntu 4.4.0-14.30-generic 4.4.5
Uname: Linux 4.4.0-14-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
Date: Sat Mar 19 23:19:21 2016
HibernationDevice: RESUME=UUID=4f8fb76c-f99d-4c54-8a67-eed0653d8eb6
InstallationDate: Installed on 2016-03-19 (0 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160318)
MachineType: LENOVO 80FG
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-14-generic.efi.signed root=UUID=572a19f6-7324-4269-ad36-7ffc9919f7a2 ro noprompt persistent quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-14-generic N/A
 linux-backports-modules-4.4.0-14-generic N/A
 linux-firmware 1.156
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/22/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: ABCN96WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: Lenovo Z70-80
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo Z70-80
dmi.modalias: dmi:bvnLENOVO:bvrABCN96WW:bd09/22/2015:svnLENOVO:pn80FG:pvrLenovoZ70-80:rvnLENOVO:rnLenovoZ70-80:rvrNODPK:cvnLENOVO:ct10:cvrLenovoZ70-80:
dmi.product.name: 80FG
dmi.product.version: Lenovo Z70-80
dmi.sys.vendor: LENOVO

CVE References

Revision history for this message
Manvydas (manwiuxas) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Ubuntu Gnome boots to black screen when using proprietary Nvidia drivers on a laptop with Optimus

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Francois Thirioux (fthx) wrote :

I can confirm that lightdm+GnomeShell works without any Nvidia or Intel issue.
GDM fails.

Revision history for this message
Tassos (tassos-chen) wrote :

this bug affects me too, my laptop is Lenovo t440p with Nvidia 730M. Changing GDM to lightdm also works for me too.

Revision history for this message
Tassos (tassos-chen) wrote :

When I switch to tty1~tty6, the screen showed only one line: A start job is running for Hold until boot process finishes up( 56s/ no limit), and I can't do anything, even login to tty1...

Changed in linux (Ubuntu):
status: Confirmed → Invalid
importance: Undecided → Critical
Changed in gdm3 (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Please:

1. Report to (http://tinyurl.com/zzhjgjz).
2. Paste the new report link here.
3. Set this bug status back to "confirmed".

Thank you.

Changed in gdm3 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Tim Lunn (darkxst) wrote :

Alberto, this is probably not an upstream bug. the prime support is ubuntu specific.

I am not sure if this is fatal, but there is an error setting up prime offload, seems like the helper scripts are not getting called as root anymore.

Kov 19 22:59:55 username-Lenovo-Z70-80 /usr/lib/gdm3/gdm-x-session[912]: /usr/bin/prime-supported: 35: /usr/bin/prime-supported: cannot create /var/log/prime-supported.log: Permission denied
Kov 19 22:59:55 username-Lenovo-Z70-80 /usr/lib/gdm3/gdm-x-session[912]: warning: output not found; ignoring
Kov 19 22:59:55 username-Lenovo-Z70-80 /usr/lib/gdm3/gdm-x-session[912]: warning: output not found; ignoring

Changed in gdm3 (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Tim Lunn (darkxst) wrote :

Also can you attach /var/log/gpu-manager.log

Changed in ubuntu-gnome:
milestone: none → xenial
Revision history for this message
Manvydas (manwiuxas) wrote :
Revision history for this message
Tim Lunn (darkxst) wrote :

Alberto,
   Any ideas on this one?

   The gdm PRIME scripts no longer seem to run as root, which I think was to do with the root-less Xorg work. Though that shouldn't otherwise affect the prime-offload script, right?

Revision history for this message
Tassos (tassos-chen) wrote :

my gpu-manager.log is almost the same as Manvydas's.

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

Hey Tim,

it's just a guess, but could you try adding

iomem=relaxed

to the boot-parameter line? (Linux section, where you find the "quiet splash")

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

@ TIm

The above mentioned just works in VirtuaBox.

Nvidia driver is using the new nvidia-drm and NOT module (nvidia.ko).

subscribing Alberto to look into that.

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

Similar issue covered on Archlinux-bugbase:

https://bugs.archlinux.org/task/47140 ([bumblebee] can not handle nvidia-modeset.ko)

summary: - Ubuntu Gnome boots to black screen when using proprietary Nvidia drivers
+ Ubuntu GNOME boots to black screen when using proprietary Nvidia drivers
on a laptop with Optimus
Revision history for this message
virgosun (hdefendme) wrote :

confirm same. reproducible on hardware Lenovo Yoga 500-15IBD Primus HD 5500/ Nvidia Geforce GT940M.

Before 16.04, run fine on base system 15.10 Nvidia proprietary 351

After

 $sudo do-release-upgrade
Lighntdm -------> login loop
dpkg-reconfigure Gdm -------> blank screen

Nvidia proprietary 362

Bug

Revision history for this message
Yaty Lee (ookong) wrote :

Same to me. I have to rollback to Ubuntu Gnome 15.10. Please fix it.

Revision history for this message
Alberto Milone (albertomilone) wrote :

the log in comment #10 looks good to me.

@Tim: yes, it could be a problem with permissions. I don't use Gnome, so I didn't notice. I can certainly have a look at GDM.

@virgosun: that sounds like a different problem.

Revision history for this message
Tim Lunn (darkxst) wrote :

@Flames_in_paradise I do not have access to any optimus hardware to test.

@Alberto, Thanks, gdm does not run as root anymore, X is for now launched as root via Xwrap for NVIDIA, but once the nvidia KMS drivers land even that should not be required.

Revision history for this message
virgosun (hdefendme) wrote :

@Alberto Milone yet , 362 driver only works if the PRIME profile set to Intel Graphics power save. If the profile is set to NVIDIA Geforce then black screen after login. With Nouveu there is no way to turn of Nvidia GeForce. 16.04 in fact ruin the PC, toast it really heat.
Driver 351 run fine in 15.10 http://i.imgur.com/ubN15iq.jpg

Revision history for this message
Alberto Milone (albertomilone) wrote :

@virgosun: does 352 from the PPA work in 16.04? https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

Revision history for this message
virgosun (hdefendme) wrote :

@Alberto Milone solve by add graphical ppa, nvidia 364.19

Revision history for this message
Rick Gatewood (george-gatewood) wrote :

This is a real show stopper for hybrid graphic laptop. I had to reinstall 15.10. I will be interested to see the fix for this one.

Revision history for this message
virgosun (hdefendme) wrote :

Rick Gatewood@ graphics ppa work for me, you can try. If you face back screen boot, then restart to recovery console:

mount -o remount,rw /
prime-select intel

If it don not work

apt-get purge nvidia*

If it work, login to desktop add graphic ppa address as @Alberto Milone.
On additional driver, choose Nvidia 364.19 (open source).
This work for me, PRIME profile work with both Intel and Nvida

Revision history for this message
Simon Kjellberg (simonkberg) wrote :

@virgosun just tried it with the latest open source driver (364) from graphics-drivers/ppa, and while selecting intel in prime works fine, after switching to nvidia and rebooting I'm faced with black screen again. Are you sure you're using gdm and not lightdm?

Revision history for this message
virgosun (hdefendme) wrote :

@Simon Kjellberg If 364.19 not work for you, you may try roll back to 352 as it work in 15.10.
I am sure it is gdm, I have almost naver been able to combine lightdm with Gnome in my system.
$dpkg-reconfigure gdm

Revision history for this message
Tassos (tassos-chen) wrote :

The latest open source driver (364.19) from graphics-drivers/ppa work for me now.

Revision history for this message
Alberto Milone (albertomilone) wrote :

one minor correction: 364.19 is not open source.

Revision history for this message
Simon Kjellberg (simonkberg) wrote :

@Alberto apologies. it's labeled as open source in software-properties-gtk http://i.imgur.com/7tgluHG.png

Revision history for this message
virgosun (hdefendme) wrote :

@Alberto Milone ah yet they said that it is just packed from the vendor's release

Revision history for this message
shinyblue (shinyblue) wrote :

Still have this problem while running 364.19 Tue Apr 19 14:15:03 PDT 2016

Revision history for this message
virgosun (hdefendme) wrote :

@shinyblue you can try different version from ppa, but remember to turn off Nvidia in bios before you are ready to turn it on.

Terminal upgrade and terminal recovery console is a very bare runtime without any power management. I was facing frequent force-reset while working in terminal, due to overheat

Revision history for this message
Ameur Mohammed (ameur-mohamed) wrote :

I was following daily build until one big update, then did this problem, I play Dotaz2 with nvidia drivers, I rolled back to 15.10, sad so sad, please fix ASAP

Revision history for this message
shinyblue (shinyblue) wrote :

Phew! Just done all 48 of these tests...

Tests:

1. GDM starts
2. Lightdm starts
3. Can launch Gnome
4. Can launch Gnome Classic
5. External monitor with Lightdm
6. External monitor with Gdm
7. External monitor with Gnome
8. External monitor with Gnome Classic

Results: . is fine, E is error (caused hang), F is fail but not hang. S is skipped, e.g. couldn't get to that test.

Variables:

- graphics driver
- prime select, one of:
  - intel (530 Skylake GT2)
  - NVIDIA Corporation GM107M [GeForce GTX 960M]

Results
---------------------------------------------------
Config Driver Prime 12345678
---------------------------------------------------
c1 361.42-0ubuntu2 intel ....EF*F
c2 361.42-0ubuntu2 nvidia F....FFF
c3 361.42-0ubuntu0~gpu16.04.1 intel ....FFEE
c4 361.42-0ubuntu0~gpu16.04.1 nvidia F....FFF
c5 364.19-0ubuntu0~gpu16.04.1 intel .....FEE
c6 364.19-0ubuntu0~gpu16.04.1 nvidia F.FF?SSS
---------------------------------------------------

## Config 1 ##

- 7:* Probably an E. I had it as a pass because when one monitor is ON it
  works, but having done the other tests I realised that the hang comes when
  two are turned on at once, which was not something I tested here.

- 5:E With monitor plugged in, working under Gnome, logging out to LightDm
  caused hang. Also booting to lightdm with hdmi monitor caused hang.

- 6:F. gdm goes blinky on laptop, unusable with external screen plugged in. See
  note below, seems to be the same problem: can't do two screens at once.
  Unplugging restores a working laptop screen.

- 8:F on test 8 first plugin of monitor caused blank screens. Unplug, replug gave
  an image on the external, laptop turned off. Nb. I had the 'Displays' config
  ui up the 2nd time I plugged in, not sure if this makes any difference. This
  is working. But trying to turn them both on at once resulted in a flashing
  unusable display on the laptop

## Config 2 ##

- 1:F gdm gives completely black screen. Can swap to tty, system not dead.

- 7:F both screens blank, laptop one twitches a bit. Removing cable brought
  back system.

- 8:F as 7:F, but when unplugged needed to swap to tty and back to get
  functioning mouse/interface.

- 6:F as for 1:F

## Config 3 ##

- 5:F lightdm goes all black/flickery when external monitor plugged in.
  Recoverable, though.

- 6:F gdm like lightdm when external monitor plugged in.

- 7:E, 8:E **gnome works on one screen**, but selecting both on causes a
  complete hang.

## Config 4 ##

- 1:F black screen. Pressing power button does cause normal shutdown

- 7:F both go black. Recovered after unplug.

- 8:F as 7:F

## Config 5 ##

- 6:F flashy screen, mostly blank. Removing cable (quickly) brought stability.

- 7:E, 8:E ext. monitor works but hang if 2 displays at once.

## Config 6 ##

Was all the same.

## Conclusions ##

- GDM: intel only across the three drivers.

- Gnome/Gnome classic behave the same.

- Two monitors:

  - both on: you just can't have it with gnome. (lightdm works, and previously
    I had Unity working, too)

  - one on: works with intel, not nvidia.

Revision history for this message
shinyblue (shinyblue) wrote :

Attempt to re-do formatting...

---------------------------------------------------
Config Driver Prime 12345678
---------------------------------------------------
c1 361.42-0ubuntu2 intel ....EF.F
c2 361.42-0ubuntu2 nvidia F....FFF
c3 361.42-0ubuntu0~gpu16.04.1 intel ....FFEE
c4 361.42-0ubuntu0~gpu16.04.1 nvidia F....FFF
c5 364.19-0ubuntu0~gpu16.04.1 intel .....FEE
c6 364.19-0ubuntu0~gpu16.04.1 nvidia F.FF?SSS
---------------------------------------------------

Revision history for this message
shinyblue (shinyblue) wrote :

Attempt to re-do formatting AGAIN!

---------------------------------------------------
Config_Driver______________________Prime___12345678
---------------------------------------------------
c1_____361.42-0ubuntu2_____________intel___....EF.F
c2_____361.42-0ubuntu2_____________nvidia__F....FFF
c3_____361.42-0ubuntu0~gpu16.04.1__intel___....FFEE
c4_____361.42-0ubuntu0~gpu16.04.1__nvidia__F....FFF
c5_____364.19-0ubuntu0~gpu16.04.1__intel___.....FEE
c6_____364.19-0ubuntu0~gpu16.04.1__nvidia__F.FF?SSS
---------------------------------------------------

Revision history for this message
Jonathan Hartley (tartley) wrote :

@shinyblue: Very nice work.

Does the ticket title need updating to reflect it isn't just Nvidia drivers?

Revision history for this message
Ameur Mohammed (ameur-mohamed) wrote :

This is a valid problem, each time I enable nvidia, I can't login, no GDM or GDM3, I can't play Dota 2, please fix

Revision history for this message
Bruce Pieterse (octoquad) wrote :

I just upgraded my Acer Aspire V3-771G with Nvidia GeForce GT630M to 16.04 from 15.10. What I found was the following:

1. If booting with the splash quiet options in GRUB you will get "A start job is running for Hold until boot process finishes up ( 1s / no limit)" on all tty's. Without these parameters in GRUB, you have access to tty1-7 again, which allows for a little more debugging.
2. With the splash and quiet options in GRUB both tty 1 and tty 7 show a black screen. Without these options only tty7 is affected.
3. Removing all nvidia packages with sudo apt-get remove --purge nvidia* and then rebooting works (here I am typing this :)
4. nvidia-340, -346, -352 & -361 always renders a black screen for me. I did not try -331 or -331.
5. If you boot without the splash and quiet options in GRUB, run journalctl -f in one tty and then run systemctl restart gdm.service in another tty I get a segfault in gnome-shell "kernel: gnome-shell[3423]: segfault at 14 ip 00007f893e9a4035 sp 00007ffc392b09f0 error 4 in libmutter.so.0.0.0[7f893e96a000+f2000]"

I have attached journal output from the time I restarted gdm in a tty which might have some other info.

Changed in ubuntu-gnome:
status: New → Triaged
importance: Undecided → Critical
no longer affects: linux
Changed in gdm:
importance: Undecided → Unknown
status: New → Unknown
tags: added: gnome-3.10 gnome-3.16 gnome-3.18 gnome3.12 trusty wily
tags: added: gnome-3.12
removed: gnome3.12
Changed in gdm:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

Bruce, can you file a crash report bug for the segfault so we get a backtrace?

Alvin (alvin)
Changed in ubuntu-gnome:
status: Triaged → In Progress
Tim Lunn (darkxst)
Changed in ubuntu-gnome:
status: In Progress → Triaged
Francois Thirioux (fthx)
tags: added: yakkety
52 comments hidden view all 132 comments
Revision history for this message
Dimitrije Petrovic (mitap94) wrote :

This happened to me too. Installed Ubuntu Gnome 16.04.1 yesterday, installed the 361 NVIDIA driver (I think) for the 840M card and boot into black screen. All ttys showed: A start job is running for Hold until boot process finishes up.

Revision history for this message
Roger (r-wiberg) wrote :

Bug #1632322 - about computers with _only_ an NVIDIA card refusing to boot with proprietary drivers, because of GDM3 - was declared a duplicate of this bug yesterday and further discussion was to be conducted here. Hence my posting here to point out that bug #1632322 is _not_ a duplicate.

Bug #1632322 is about GDM3 as such not playing nice with NVIDIA. It has nothing to with Optimus. And it doesn't concern "hybrid (prime) systems", which is the bug referenced in the release notes on https://wiki.ubuntu.com/YakketyYak/ReleaseNotes/UbuntuGNOME#Known_Bugs.

So could bug #1632322 be reopened, please? And possibly even looked at before release?

Revision history for this message
Subham Satyajeet (subhamsatyajeet) wrote :

Can confirm. Ubuntu GNOME 16.04, fresh install, Nvidia 361 drivers not working. Has somebody made any progress on the bug?

Revision history for this message
René (rkerner+) wrote :

Hello, I had the same problem, but I could solved my case:
Gigabyte Notebook with hybrid Intel + Nvidia GTX 765M card with PRIME not working with (K)Ubuntu 16.04 with any version of the proprietary NVIDIA driver. When prime-select switched to nvidia gives a black screen, set to intel worked. NVidia proprietary driver prime-select set to nvidia worked on (K)Ubuntu 14.04 before.

The solution that worked for me (with latest stable driver 367.57, from graphics ppa, but should work with every driver) was to change xorg.conf!

The version of Xorg shipped with (K)Ubuntu 16.04 is 1.18.4, where the BusID format in xorg.conf was slightly changed in Xorg >= 1.17.2.
I changed `BusID "PCI:1@0:0:0"` on the nvidia card to `BusID "PCI:1::0:0"` and similar process on the intel section and also added the LoadModule setting. Like described in an answer to a post on askubuntu. see: http://askubuntu.com/a/776527

I guess the broken id works on PRIME set to intel because autodetection in single-intel mode is much better then the Nvidia PRIME stuff.

After restart it worked, but something changed my xorg.conf again to have invalid data. I'm now experimenting with deactivating gpu-manager by commenting all lines in /etc/init/gpu-manager.conf (see https://vxlabs.com/2015/02/05/solving-the-ubuntu-14-04-nvidia-346-nvidia-prime-black-screen-issue/ ) and setting "chattr +i" for xorg.conf.

and see ArchWiki: https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Using_nvidia

Hope this solves your problems with NVidia PRIME too!

Revision history for this message
Sergio Mattei (ftxrc) wrote :

Any progress on this issue? It has rendered my Alienware Alpha Ubuntu GNOME installation unusable, and I have to use Noveau now which is not acceptable for OpenCL apps. Any help?

Revision history for this message
Alessandro Scarozza (xan.scale) wrote :

https://paste.ubuntu.com/23613379/

same of @rodericj

GDM works only with nvidia-340.

using XDM to boot, gnome-shell works fine with all nvidia drivers

summary: Ubuntu GNOME boots to black screen when using proprietary Nvidia drivers
- on a laptop with Optimus
Revision history for this message
Alexander Adam (7ql6) wrote :

Having the same problem on Unity and Ubuntu 16.10. Regardless which of the prorpietary drivers I use (367, 370, 375) it will result in a black screen. Intel card works flawlessly though.

Revision history for this message
Jacques Serfontein (jacques-serfontein) wrote :

Running Ubuntu Gnome 16.10 with official repos only. No problem with 340.98, but I had the same issue with 367.57, until I reinstalled xserver-xorg-legacy, which was removed along with the old packages...

Revision history for this message
Žygimantas Beručka (zygis) wrote :

Similarly to comment #74, I have exactly the same symptoms on a Samsung laptop with Intel HD4000 graphics (i.e. *no* nVidia or any other video card is/was present). Moreover, it's a fresh install of Ubuntu 16.10. It is also of note that I've never had this issue before on the same machine with any of previous versions of Ubuntu Gnome, including 16.04 LTS with gnome3 ppa enabled.

On 16.10, I just cannot properly start GDM3 at all. It shows the same black/dark grey background as has been mentioned and nothing else is going on. Also, going to TTY1 does not work -- one is unable to do anything on it; even CTRL-C does not work. Switching to TTY2, however, works fine. I've looked at various log files, but to be honest, I don't see any clues indicating what's the problem and where the process gets stuck.

It works just fine with LightDM, though.

Revision history for this message
Žygimantas Beručka (zygis) wrote :

Well, I just did discovered something by accident. I *DID* manage to start GDM3 just by executing 'gdm3' as *root* from a TTY. I am now able to login just fine and GNOME works fine.

Launching GDM as a service (systemctl) does not work, though. Why is this so? And what can I do to resolve the issue?

Revision history for this message
Alessandro Scarozza (xan.scale) wrote :

lightdm + lightdm-gtk-greeter works FINE.

why not replace GDM with this?

Revision history for this message
Giuseppe Pennisi (giupenni78) wrote :

Same problem. I think is not acceptable that this bug is still present.

Revision history for this message
amk (9-launchpad-mikus-sk) wrote :

lightdm-gtk-greeter does not work fine... no visual countdown/other display of the autologin timeout. See https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/902852/comments/31

XDM also does not allow to cancel autologin before the time elapses.

Revision history for this message
Jacques Serfontein (jacques-serfontein) wrote :

To follow up on #100, I have been running 375.26 from graphics-drivers PPA without any issues for a couple of weeks now.

Revision history for this message
jack (hyyyde) wrote :

Fix it with lightdm + lightdm-gtk-greeter

On Ubuntu Gnome 16.10 with kernel 4.8.0-37-generic and driver nvidia-378

Revision history for this message
RobertFM (robert123m+ubuntu) wrote :

Thanks to #100 I got GDM working again.

I just upgraded to nvidia-378 and re-installed xserver-xorg-legacy and finally got GDM working again.

I'll keep lightdm installed just in case it all stops working again.

I don't know/remember if this happend while I was fiddling around getting GDM to work. But in /etc/gdm3/custom.conf I had the following line active and it was running havok with GDM opening in different tty every boot an delaying boot time. So make sure to comment out the following line:

#AutomaticLoginEnable=True

Revision history for this message
RobertFM (robert123m+ubuntu) wrote :

Ps. It is working on Ubuntu 16.10, 4.8.0-39-generic, GDM3 3.20.1-1ubuntu2, nvidia-378

Revision history for this message
Stein Erik Svendheim (svendheim) wrote :

Same here. #100 fixed it.

apt install xserver-xorg-legacy did the trick. I am using nvida-378 from the graphics PPA.

Jeremy Bícha (jbicha)
description: updated
Jeremy Bícha (jbicha)
Changed in nvidia-drivers-ubuntu:
status: New → Confirmed
Jeremy Bícha (jbicha)
affects: gdm3 (Ubuntu) → gnome-shell (Ubuntu)
Changed in gnome-shell (Ubuntu):
status: Triaged → In Progress
no longer affects: linux (Ubuntu)
no longer affects: linux (Ubuntu Xenial)
Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Released
Changed in gnome-shell (Ubuntu Xenial):
status: Triaged → In Progress
Changed in gnome-shell (Ubuntu Yakkety):
status: New → In Progress
importance: Undecided → Critical
description: updated
Changed in ubuntu-gnome:
status: Triaged → Fix Committed
Jeremy Bícha (jbicha)
description: updated
Changed in gdm:
status: Confirmed → Unknown
Revision history for this message
Tim Lunn (darkxst) wrote :

>> The most minimal fix here for 16.04 LTS and 16.10 is to just have gnome-shell depend on xserver-xorg-legacy. Updating all the nvidia-* packages in Ubuntu and the PPAs would be a lot more trouble; although that would still be a good idea so that this gnome-shell dependency could be dropped in future Ubuntu releases.

That seems like a bad idea to me, you will break root-less Xorg for all other users that don't even use nvidia drivers. The dependency needs to come from the nvidia driver packages even if it is a Pain to update all those.

That said what is the current state of Nvidia KMS implementation? I would have though recent nvidia drivers would support root-less xorg, but havent had a chance to play with any nvidia hardware since last winter.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Tim, thanks for commenting.

How common is root-less Xorg?

Should there be a warning in xserver-xorg-legacy's description that it can break things?

Would having gnome-shell recommend xserver-xorg-legacy be ok? It may take Alberto some time to update all those packages so I was hoping for a faster, more minimal fix here.

I don't know much about Nvidia. Apparently, Nvidia on Wayland on Ubuntu 17.04's GNOME 3.24 mostly works now (LP: #1666664).

Revision history for this message
Tim Lunn (darkxst) wrote :

It has been used by default since 16.04 and is supported by all major open drivers including vbox/vmware, so its rather widespread.

Obviously having Xorg run as the user account instead of root is big win for avoiding security issues within Xorg. It wouldnt hurt to have some sort of description about the security risks in xserver-xorg-legacy.

Adding -legacy temporarily is probably ok, but get it off the images again before release.

rootless X is somewhat orthoganal to wayland support in respect to EGL Streams, but I would assume the KMS modesetting support required for Xorg must be there if wayland has got that far.

Jeremy Bícha (jbicha)
Changed in gnome-shell (Ubuntu Xenial):
status: In Progress → Triaged
Changed in gnome-shell (Ubuntu Yakkety):
status: In Progress → Triaged
Changed in ubuntu-gnome:
status: Fix Committed → Triaged
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Tim, can you look into this more?

If I understand the manpage correctly, xserver-xorg-legacy should still do the right thing where KMS is available.

https://manpages.debian.org/unstable/xserver-xorg-legacy/Xorg.wrap

I had the pending SRUs rejected from the unapproved queue for now.

Revision history for this message
Tim Lunn (darkxst) wrote :

on my laptop (zesty w/ intel) without -legacy, Xorg runs as my user account. once I install legacy it runs as root. I tried adding needs_root_rights=auto to Xwrapper.config but its still running as root.

So perhaps the autodetection is broken for some reason.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

Seems to be working OK now with nvidia-367 and xserver-xorg-legacy:

nvidia-367:
  Installed: 367.57-0ubuntu0.16.04.1
  Candidate: 367.57-0ubuntu0.16.04.1
  Version table:
 *** 367.57-0ubuntu0.16.04.1 500
        500 http://za.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
        500 http://za.archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
        100 /var/lib/dpkg/status

xserver-xorg-legacy:
  Installed: 2:1.18.4-0ubuntu0.2
  Candidate: 2:1.18.4-0ubuntu0.2
  Version table:
 *** 2:1.18.4-0ubuntu0.2 500
        500 http://za.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2:1.18.3-1ubuntu2 500
        500 http://za.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Perhaps Xenial milestone can be updated to Fix Released.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Tim, it works for me (both on VirtualBox and on bare Intel) on zesty:

$ ps aux | grep X
gdm 16258 0.0 0.1 262480 10676 tty1 Sl+ Mar17 0:00 /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
jeremy 22023 4.2 0.7 306516 58644 tty2 S+ 09:19 0:01 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

Bruce, it's not really Fixed in Xenial yet. If you take Ubuntu GNOME and install the Nvidia proprietary drivers, your computer might fail to show the login screen the next time you reboot. Yes, you can manually install the missing package but it needs to be handled automatically. (It's installed by the 304 and 340 packages but not newer ones.)

Revision history for this message
Kevin Norman (kn100) wrote :

Can confirm that without xserver-xorg-legacy my system will refuse to boot when using GDM. It will simply sit at a black screen, never allowing me to log in. With the package installed, GDM seems to work correctly.

Another interesting nugget of information is my initial fix was to simply use lightdm. This introduces another bug whereby on login the display will briefly (for around 5 seconds) show either:
a) Pink/white garbled mess
b) If I've been logged in recently, what I had on my screen previously. This is even the case if I am booted into another operating system like Windows and then reboot into Ubuntu GNOME.

I am using a Nvidia 660ti (GK104) with the Nvidia drivers (375.39).

If I can provide any helpful information to the developers, please let me know. I am happy to dump whatever logs are necessary.

no longer affects: nvidia-drivers-ubuntu
Changed in nvidia-graphics-drivers-375 (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-375 (Ubuntu Yakkety):
status: New → Confirmed
Revision history for this message
Anthony Somerset (anthonysomerset) wrote :

for me the fix on #1631098 seems to work on my desktop i only have an nvidia card no laptop dual GFX hybrid

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-375 - 375.66-0ubuntu1

---------------
nvidia-graphics-drivers-375 (375.66-0ubuntu1) artful; urgency=medium

  * New upstream release:
    - Added support for the following GPUs:
      o GeForce GTX 1080 Ti
      o Quadro P3000
      o Quadro M520
      o TITAN Xp
    - Fixed a bug that could cause EGL applications to crash when
      calling eglInitialize() multiple times on X11-backed displays.
    - Fixed a regression that could cause rendering corruption on a
      monitor connected via DisplayPort upon a modeset event (for
      example, changing resolutions or power cycling the monitor).
    - Fixed a bug that could cause OpenGL applications to crash when
      VT switching between multiple X servers.
    - Fixed a bug that caused the system to become unresponsive after
      resuming from power management suspend/hibernate.  Additional
      symptoms of this bug included display flickering and "Xid 56"
      errors in the kernel log.
    - Fixed a bug that caused backlight brightness to not be
      controllable on some notebooks with DisplayPort internal
      panels.
    - Fixed a bug that left HDMI and DisplayPort audio muted after a
      framebuffer console mode was restored. For some displays, this
      caused the display to remain blank.
    - Fixed a bug that caused audio over DisplayPort to stop working
      when the monitor was unplugged and plugged back in or awoken
      from DPMS power-saving mode.
    - Restored support for the following GPU:
      GRID K520
    - Fixed a regression that caused corruption in certain
      applications, such as window border shadows in Unity, after
      resuming from suspend.
    - Fixed a bug that could cause some applications to crash when
      running with PRIME Sync.
    - Fixed a bug that prevented PRIME Sync from working on notebooks
      with GeForce GTX 4xx and 5xx series GPUs.
    - Fixed a bug that caused OpenGL apps to have excessive CPU usage
      when running with PRIME Sync but without native displays
      enabled.
    - Fixed a bug that could cause PRIME Sync to deadlock in the
      kernel, particularly common on Linux 4.10.
    - Fixed a bug that caused PRIME Sync to run slowly on systems
      with Pascal GPUs.

  [ Alberto Milone ]
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.10.patch.
    - Limit the amount of cores to a maximum of 16 (LP: #1688431).

  [ Jeremy Bicha ]
  * Depend on xserver-xorg-legacy (LP: #1559576).

 -- Alberto Milone <email address hidden> Fri, 05 May 2017 15:13:39 +0200

Changed in nvidia-graphics-drivers-375 (Ubuntu):
status: Triaged → Fix Released
Jeremy Bícha (jbicha)
no longer affects: gnome-shell (Ubuntu Xenial)
no longer affects: gnome-shell (Ubuntu Yakkety)
no longer affects: gnome-shell (Ubuntu Xenial)
no longer affects: gnome-shell (Ubuntu Zesty)
Changed in nvidia-graphics-drivers-375 (Ubuntu Xenial):
importance: Undecided → High
status: New → Triaged
Changed in nvidia-graphics-drivers-375 (Ubuntu Yakkety):
importance: Undecided → High
status: Confirmed → Triaged
Changed in nvidia-graphics-drivers-375 (Ubuntu Zesty):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Henri Cook (henricook) wrote :

As someone who confirmed this bug really early on, and has suffered from it for ages i'm here to say thanks for the fix!

I have two systems that were suffering from the problem, on one a yakkety -> zesty upgrade fixed the issue and on another a new zesty install also did not experience the problem*

* after installing nvidia-378

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-375 - 375.66-0ubuntu0.16.10.1

---------------
nvidia-graphics-drivers-375 (375.66-0ubuntu0.16.10.1) yakkety; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-0350, 2017-0351, 2017-0353 (LP: #1689336).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce GTX 1080 Ti
      o Quadro P3000
      o Quadro M520
      o TITAN Xp
    - Fixed a bug that could cause EGL applications to crash when
      calling eglInitialize() multiple times on X11-backed displays.
    - Fixed a regression that could cause rendering corruption on a
      monitor connected via DisplayPort upon a modeset event (for
      example, changing resolutions or power cycling the monitor).
    - Fixed a bug that could cause OpenGL applications to crash when
      VT switching between multiple X servers.
    - Fixed a bug that caused the system to become unresponsive after
      resuming from power management suspend/hibernate.  Additional
      symptoms of this bug included display flickering and "Xid 56"
      errors in the kernel log.
    - Fixed a bug that caused backlight brightness to not be
      controllable on some notebooks with DisplayPort internal
      panels.
    - Fixed a bug that left HDMI and DisplayPort audio muted after a
      framebuffer console mode was restored. For some displays, this
      caused the display to remain blank.
    - Fixed a bug that caused audio over DisplayPort to stop working
      when the monitor was unplugged and plugged back in or awoken
      from DPMS power-saving mode.
    - Restored support for the following GPU:
      GRID K520
    - Fixed a regression that caused corruption in certain
      applications, such as window border shadows in Unity, after
      resuming from suspend.
    - Fixed a bug that could cause some applications to crash when
      running with PRIME Sync.
    - Fixed a bug that prevented PRIME Sync from working on notebooks
      with GeForce GTX 4xx and 5xx series GPUs.
    - Fixed a bug that caused OpenGL apps to have excessive CPU usage
      when running with PRIME Sync but without native displays
      enabled.
    - Fixed a bug that could cause PRIME Sync to deadlock in the
      kernel, particularly common on Linux 4.10.
    - Fixed a bug that caused PRIME Sync to run slowly on systems
      with Pascal GPUs.

  [ Adam Conrad ]
  * Drop nvidia-prime and bumblebee Recommends on armhf (LP: #1566446).

  [ Alberto Milone ]
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.10.patch.
    - Limit the amount of cores to a maximum of 16 (LP: #1688431).

  [ Jeremy Bicha ]
  * Depend on xserver-xorg-legacy (LP: #1559576).

  [ Thomas Foster ]
  * debian/nvidia-375.install:
    - install glvnd EGL vendor configuration file (LP: #1674677).

 -- Alberto Milone <email address hidden> Tue, 09 May 2017 15:25:44 +0200

Changed in nvidia-graphics-drivers-375 (Ubuntu Yakkety):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-375 - 375.66-0ubuntu0.16.04.1

---------------
nvidia-graphics-drivers-375 (375.66-0ubuntu0.16.04.1) xenial; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-0350, 2017-0351, 2017-0353 (LP: #1689336).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce GTX 1080 Ti
      o Quadro P3000
      o Quadro M520
      o TITAN Xp
    - Fixed a bug that could cause EGL applications to crash when
      calling eglInitialize() multiple times on X11-backed displays.
    - Fixed a regression that could cause rendering corruption on a
      monitor connected via DisplayPort upon a modeset event (for
      example, changing resolutions or power cycling the monitor).
    - Fixed a bug that could cause OpenGL applications to crash when
      VT switching between multiple X servers.
    - Fixed a bug that caused the system to become unresponsive after
      resuming from power management suspend/hibernate.  Additional
      symptoms of this bug included display flickering and "Xid 56"
      errors in the kernel log.
    - Fixed a bug that caused backlight brightness to not be
      controllable on some notebooks with DisplayPort internal
      panels.
    - Fixed a bug that left HDMI and DisplayPort audio muted after a
      framebuffer console mode was restored. For some displays, this
      caused the display to remain blank.
    - Fixed a bug that caused audio over DisplayPort to stop working
      when the monitor was unplugged and plugged back in or awoken
      from DPMS power-saving mode.
    - Restored support for the following GPU:
      GRID K520
    - Fixed a regression that caused corruption in certain
      applications, such as window border shadows in Unity, after
      resuming from suspend.
    - Fixed a bug that could cause some applications to crash when
      running with PRIME Sync.
    - Fixed a bug that prevented PRIME Sync from working on notebooks
      with GeForce GTX 4xx and 5xx series GPUs.
    - Fixed a bug that caused OpenGL apps to have excessive CPU usage
      when running with PRIME Sync but without native displays
      enabled.
    - Fixed a bug that could cause PRIME Sync to deadlock in the
      kernel, particularly common on Linux 4.10.
    - Fixed a bug that caused PRIME Sync to run slowly on systems
      with Pascal GPUs.

  [ Adam Conrad ]
  * Drop nvidia-prime and bumblebee Recommends on armhf (LP: #1566446).

  [ Alberto Milone ]
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.10.patch.
    - Limit the amount of cores to a maximum of 16 (LP: #1688431).

  [ Jeremy Bicha ]
  * Depend on xserver-xorg-legacy (LP: #1559576).

  [ Thomas Foster ]
  * debian/nvidia-375.install:
    - install glvnd EGL vendor configuration file (LP: #1674677).

 -- Alberto Milone <email address hidden> Tue, 09 May 2017 11:14:13 +0200

Changed in nvidia-graphics-drivers-375 (Ubuntu Xenial):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-375 - 375.66-0ubuntu0.17.04.1

---------------
nvidia-graphics-drivers-375 (375.66-0ubuntu0.17.04.1) zesty; urgency=medium

  * SECURITY UPDATE:
    - CVE-2017-0350, 2017-0351, 2017-0353 (LP: #1689336).
  * New upstream release:
    - Added support for the following GPUs:
      o GeForce GTX 1080 Ti
      o Quadro P3000
      o Quadro M520
      o TITAN Xp
    - Fixed a bug that could cause EGL applications to crash when
      calling eglInitialize() multiple times on X11-backed displays.
    - Fixed a regression that could cause rendering corruption on a
      monitor connected via DisplayPort upon a modeset event (for
      example, changing resolutions or power cycling the monitor).
    - Fixed a bug that could cause OpenGL applications to crash when
      VT switching between multiple X servers.
    - Fixed a bug that caused the system to become unresponsive after
      resuming from power management suspend/hibernate.  Additional
      symptoms of this bug included display flickering and "Xid 56"
      errors in the kernel log.
    - Fixed a bug that caused backlight brightness to not be
      controllable on some notebooks with DisplayPort internal
      panels.
    - Fixed a bug that left HDMI and DisplayPort audio muted after a
      framebuffer console mode was restored. For some displays, this
      caused the display to remain blank.
    - Fixed a bug that caused audio over DisplayPort to stop working
      when the monitor was unplugged and plugged back in or awoken
      from DPMS power-saving mode.
    - Restored support for the following GPU:
      GRID K520
    - Fixed a regression that caused corruption in certain
      applications, such as window border shadows in Unity, after
      resuming from suspend.
    - Fixed a bug that could cause some applications to crash when
      running with PRIME Sync.
    - Fixed a bug that prevented PRIME Sync from working on notebooks
      with GeForce GTX 4xx and 5xx series GPUs.
    - Fixed a bug that caused OpenGL apps to have excessive CPU usage
      when running with PRIME Sync but without native displays
      enabled.
    - Fixed a bug that could cause PRIME Sync to deadlock in the
      kernel, particularly common on Linux 4.10.
    - Fixed a bug that caused PRIME Sync to run slowly on systems
      with Pascal GPUs.

  [ Alberto Milone ]
  * debian/templates/dkms_nvidia.conf.in:
    - Drop buildfix_kernel_4.10.patch.
    - Limit the amount of cores to a maximum of 16 (LP: #1688431).

  [ Jeremy Bicha ]
  * Depend on xserver-xorg-legacy (LP: #1559576).

 -- Alberto Milone <email address hidden> Fri, 05 May 2017 15:13:39 +0200

Changed in nvidia-graphics-drivers-375 (Ubuntu Zesty):
status: Triaged → Fix Released
Jeremy Bícha (jbicha)
Changed in ubuntu-gnome:
status: Triaged → Fix Released
Revision history for this message
Abdulrahman Amri (amri) wrote :

I am having the same issue on Ubuntu 17.10 with gdm3.

- Lightdm works
- Nouveau driver works
- Nvidia driver 375.66 (proprietary) does not work
- Nvidia driver 384.47 (open source) does not work
- Nvidia drivers work with Ubuntu Gnome 17.04

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is closed, rightly or wrongly. So if you have any ongoing issues with 17.10 then please open a new bug.

Revision history for this message
Tim Richardson (tim-richardson) wrote :

I have the same symptoms as this bug with 17.04 and the new 375.82 driver if I am use modesetting with gdm. With lightdm it works fine.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is closed. For ongoing discussions (and a solution), please see bug 1705369 instead.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Or see bug 1706474 which you logged, thanks :)

Revision history for this message
shantanu saha (shantanucse18-gmail) wrote :

I have tested with nvidia-384 and 387, issue is not fixed with gdm3. Lightdm works fine.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is closed, rightly or wrongly. Adding new comments here won't lead to any new resolution. The best thing to do now is to log a new bug.

Mathew Hodson (mhodson)
affects: gdm → gnome-shell
Displaying first 40 and last 40 comments. View all 132 comments or add a comment.