gdm3 nvidia modeset=1 is broken, external screens don't work on a Thinkpad p50

Bug #1706474 reported by Tim Richardson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Invalid
Undecided
Unassigned
nvidia-graphics-drivers-375 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

ubuntu 17.04 with gnome desktop.
The laptop is a Thinkpad p50 with a quadro M1000M.
To get this bug I am using the hybrid graphics mode.

This problem occurs with 375.82 and also with the new 384 driver.

When using gdm3 and
options nvidia_375_drm modeset=1

the greeter only shows the laptop screen. My two external displays are not turned on.
they do not appear in the listing of diplays in xrandr

the problem does not occur if
modeset=0
or if I use lightdm

I suspect this is a known bug but I am not quite sure so I'm reporting it.

description: updated
Revision history for this message
Tim Richardson (tim-richardson) wrote :
Revision history for this message
Tim Richardson (tim-richardson) wrote :
tags: added: black-screen gnome-17.10 multimonitor nvidia
tags: added: zesty
removed: gnome-17.10
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think it might be a general problem with Wayland (which is what gets used if you set modeset=1):

https://bugs.freedesktop.org/show_bug.cgi?id=94851

So GDM/Wayland uses the first GPU only, which is your Intel GPU, the one wired to the laptop screen.

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

I suggest you should just avoid Wayland if you want multi-GPU to work properly. That means using modeset=0.

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: [Bug 1706474] Re: gdm3 nvidia modeset=1 is broken, external screens don't work

The problem is that Optimus (Nvidia's hybrid driver technology) requires
modeset=1 to use it properly so there are millions of laptop users who will
have a problem with this :)
https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/

Plus it works fine with lightdm.

On 26 July 2017 at 13:58, Daniel van Vugt <email address hidden>
wrote:

> I suggest you should just avoid Wayland if you want multi-GPU to work
> properly. That means using modeset=0.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1706474
>
> Title:
> gdm3 nvidia modeset=1 is broken, external screens don't work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/+subscriptions
>

--
Tim Richardson

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: gdm3 nvidia modeset=1 is broken, external screens don't work

If everything works fine with lightdm then you can configure gdm to behave the same as lightdm.

Just edit /etc/gdm3/custom.conf and uncomment: #WaylandEnable=false

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: [Bug 1706474] Re: gdm3 nvidia modeset=1 is broken, external screens don't work
  • syslog Edit (5.2 MiB, application/octet-stream; name=syslog)

That;s even worse. I don't any working screen, no login.
This is not a trivial bug, I think, although I'd be happy for an easy
solution.

ul 26 17:26:38 raffles systemd[2817]: Starting Accessibility services bus...
Jul 26 17:26:38 raffles dbus-daemon[2832]: Successfully activated service
'org.a11y.Bus'
Jul 26 17:26:38 raffles systemd[2817]: Started Accessibility services bus.
Jul 26 17:26:38 raffles at-spi-bus-launcher[2843]: Activating service
name='org.a11y.atspi.Registry'
Jul 26 17:26:38 raffles at-spi-bus-launcher[2843]: Successfully activated
service 'org.a11y.atspi.Registry'
Jul 26 17:26:38 raffles org.a11y.atspi.Registry[2848]: SpiRegistry daemon
is running with well-known name - org.a11y.atspi.Registry
Jul 26 17:26:38 raffles gnome-session[2839]: gnome-session-binary[2839]:
WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
Jul 26 17:26:38 raffles gnome-session-binary[2839]: WARNING: Application
'org.gnome.Shell.desktop' killed by signal 11
Jul 26 17:26:38 raffles kernel: [ 21.885358] show_signal_msg: 1 callbacks
suppressed
Jul 26 17:26:38 raffles kernel: [ 21.885360] gnome-shell[2869]: segfault
at 28 ip 00007f00f6c3ad74 sp 00007ffef4304940 error 4 in
libmutter-0.so.0.0.0[7f00f6bf3000+131000]
Jul 26 17:26:39 raffles gnome-session[2839]: gnome-session-binary[2839]:
WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
Jul 26 17:26:39 raffles gnome-session[2839]: gnome-session-binary[2839]:
WARNING: App 'org.gnome.Shell.desktop' respawning too quickly
Jul 26 17:26:39 raffles gnome-session-binary[2839]: WARNING: Application
'org.gnome.Shell.desktop' killed by signal 11
Jul 26 17:26:39 raffles gnome-session-binary[2839]: Unrecoverable failure
in required component org.gnome.Shell.desktop
Jul 26 17:26:39 raffles gnome-session[2839]: gnome-session-binary[2839]:
CRITICAL: We failed, but the fail whale is dead. Sorry....
Jul 26 17:26:39 raffles gnome-session-binary[2839]: WARNING: App
'org.gnome.Shell.desktop' respawning too quickly
Jul 26 17:26:39 raffles gnome-session-binary[2839]: CRITICAL: We failed,
but the fail whale is dead. Sorry....
Jul 26 17:26:39 raffles org.a11y.atspi.Registry[2848]: XIO: fatal IO error
11 (Resource temporarily unavailable) on X server ":0"
Jul 26 17:26:39 raffles org.a11y.atspi.Registry[2848]: after 21
requests (21 known processed) with 0 events remaining.
Jul 26 17:26:39 raffles /usr/lib/gdm3/gdm-x-session[2822]: (**) Option "fd"
"33"
Jul 26 17:26:39 raffles /usr/lib/gdm3/gdm-x-session[2822]: (**) Option "fd"
"36"

On 26 July 2017 at 15:01, Daniel van Vugt <email address hidden>
wrote:

> If everything works fine with lightdm then you can configure gdm to
> behave the same as lightdm.
>
> Just edit /etc/gdm3/custom.conf and uncomment: #WaylandEnable=false
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1706474
>
> Title:
> gdm3 nvidia modeset=1 is broken, external screens don't work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/+subscriptions
>

--
Tim Richardson

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: gdm3 nvidia modeset=1 is broken, external screens don't work

Oh, it appears your "p50 with a quadro M1000M" is relatively new.

I read that Canonical has a kernel fix on the way that *might* help, but that discussion is hidden in private bug 1647617. So if and when that fix gets released I will give updates here.

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: [Bug 1706474] Re: gdm3 nvidia modeset=1 is broken, external screens don't work

Thanks, I look forward to it. It works with lightdm, though. What is GDM
doing that leads to a kernel panic, that lightdm does not do?

On 31 July 2017 at 12:03, Daniel van Vugt <email address hidden>
wrote:

> Oh, it appears your "p50 with a quadro M1000M" is relatively new.
>
> I read that Canonical has a kernel fix on the way that *might* help, but
> that discussion is hidden in private bug 1647617. So if and when that
> fix gets released I will give updates here.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1706474
>
> Title:
> gdm3 nvidia modeset=1 is broken, external screens don't work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/+subscriptions
>

--
Tim Richardson

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: gdm3 nvidia modeset=1 is broken, external screens don't work

Update & simplication.
This bug affects 17.10 & 17.04 with the current LTS support nvidia drivers.
This bug affects both my laptops with nvidia hardware.
External monitors are not necessary to reproduce.

Reproduction is simple.
1. Activate the nvidia hardware using discrete mode. Therefore no intel graphics hardware is present.

2. Enable the nvidia driver in modeset=1

make a file /etc/modprobe.d/zz-nvidia-modeset.conf
with contents
options nvidia_384_drm modeset=1

3. sudo update-initramfs

4. make sure gdm3 is your display manager

5. reboot

6. attempt to start a gnome session

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

And also note that modeset=1 is not designed to activate wayland. It is necessary to use the Prime Synchonization feature of the new nvidia drivers, which is actually a feature of X 1.19

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

It is also broken on a ThinkPad W520, which is much older hardware (although still supported by current nvidia drivers). The Nvidia driver, gdm3, gnome (or gnome ubuntu) and modeset=1 is broken. Replace gdm3 with lightdm, and everything works.

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

On the newer machine, the P50, I reinstalled 17.10 ubuntu yesterday, with pre-release packages enabled. It is using gdm3. It works, even with nvidia modeset=1 and external monitors. It is not obvious to me which updated packages have fixed this, since I also tried pre-release on the broken install. The conclusion is that I had something broken in my configuration. I uninstalled X and the desktop environment a few times, which didn't work. In pure Nvidia mode, not Optimus, I am offered a Wayland session, which seems to work (I only did a few minutes of testing).

My broken install was an upgrade from 17.04. When 17.10 goes beta, I will install 17.04, fully update it, and test a migration to 17.10. If this doesn't work, I will seek help to track down which configuration settings could cause this.

It is certainly encouraging that it works from a reinstall.

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

Sorry, that was premature. I had not enabled modeset=1 properly.
After doing that
a) in Optimus mode, only the laptop display works. The nvidia settings control panel opens, but it detects no screens.
b) in discrete nvidia BIOS mode, gdm is stuck in a greeter loop when trying to start a Gmome or Gnome classic session
c) in discrete Nvidia BIOS mode, Wayland is a session option, and it works.

So this is still a bug: 17.10 Ubuntu is still broken for Optimus users who want tear-free graphics.

Revision history for this message
Doug McMahon (mc3man) wrote :

As far as hybrid (optimus) machines maybe this is hardware dependent?
On all mine (660m, 775m, 940m) nvidia modeset=1 & Prime Synchronization work just fine, 16.04.3 thru 17.10.
In 16.04.3 obviously using lightdm, in 17.10 using gdm3.

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: [Bug 1706474] Re: gdm3 nvidia modeset=1 is broken, external screens don't work

HI Doug, it could be hardware dependent although my two Optimus laptops are
very mainstream (both Quadro). It's more likely to be configuration (I hope)
How do you achieve modeset=1? How do you confirm that you have Prime Sync
working? I use xrandr --verbose | grep PRIME

regards

Tim

On 27 August 2017 at 00:19, Doug McMahon <email address hidden> wrote:

> As far as hybrid (optimus) machines maybe this is hardware dependent?
> On all mine (660m, 775m, 940m) nvidia modeset=1 & Prime Synchronization
> work just fine, 16.04.3 thru 17.10.
> In 16.04.3 obviously using lightdm, in 17.10 using gdm3.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1706474
>
> Title:
> gdm3 nvidia modeset=1 is broken, external screens don't work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/+subscriptions
>

--
Tim Richardson

Revision history for this message
Doug McMahon (mc3man) wrote : Re: gdm3 nvidia modeset=1 is broken, external screens don't work

bug reports aren't suitable for troubleshooting but anyway I do as shown here
https://ubuntuforums.org/showthread.php?t=2365449
noting that I've lenovo ideapads, no options to use discrete only so using the typical optimus, i.e. intel handles display, nvidia handles rendering, all via nvidia-prime, have no external monitors..

Revision history for this message
Tim Richardson (tim-richardson) wrote : Re: [Bug 1706474] Re: gdm3 nvidia modeset=1 is broken, external screens don't work

Thanks Doug, that bug report is exactly as the nvidia forum so you and I
are doing the same thing.

On 28 August 2017 at 02:41, Doug McMahon <email address hidden> wrote:

> bug reports aren't suitable for troubleshooting but anyway I do as shown
> here
> https://ubuntuforums.org/showthread.php?t=2365449
> noting that I've lenovo ideapads, no options to use discrete only so using
> the typical optimus, i.e. intel handles display, nvidia handles rendering,
> all via nvidia-prime, have no external monitors..
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1706474
>
> Title:
> gdm3 nvidia modeset=1 is broken, external screens don't work
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/+subscriptions
>

--
Tim Richardson

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

Good news from my side; I just updated everything on th ThinkPad W520, an
old Optimus laptop. the Uubntu 17.10 desktop now works with hybrid
graphics, prime sync and gdm3 using the latest updates (pre-release
channel). I have not added any PPAs so it's using the 375 driver currently
in the 17.10 repository.

On 28 August 2017 at 21:08, Tim Richardson <email address hidden> wrote:

> Thanks Doug, that bug report is exactly as the nvidia forum so you and I
> are doing the same thing.
>
> On 28 August 2017 at 02:41, Doug McMahon <email address hidden>
> wrote:
>
>> bug reports aren't suitable for troubleshooting but anyway I do as shown
>> here
>> https://ubuntuforums.org/showthread.php?t=2365449
>> noting that I've lenovo ideapads, no options to use discrete only so
>> using the typical optimus, i.e. intel handles display, nvidia handles
>> rendering, all via nvidia-prime, have no external monitors..
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1706474
>>
>> Title:
>> gdm3 nvidia modeset=1 is broken, external screens don't work
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1706474/
>> +subscriptions
>>
>
>
>
> --
> Tim Richardson
>

--
Tim Richardson

summary: - gdm3 nvidia modeset=1 is broken, external screens don't work
+ gdm3 nvidia modeset=1 is broken, external screens don't work on a
+ Thinkpad p50
Revision history for this message
Tim Richardson (tim-richardson) wrote :

Daniel, with the latest 17.10 the nvidia problems are now more specific and easier to reproduce.
Neither of my Thinkpads gets to the login screen in discrete Nvidia mode iff modeset=1 is used.

In hybrid graphics, the session starts, I suspect this is due to the intel driver being available. If I'm correct, then any machine with only an nvidia card should fail with nvidia modesetting.

I have opened bug https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1714881

This bug (1706474) could be closed I think.

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

Closed per comment #20. Discussion continues in bug 1714881...

Changed in gdm3 (Ubuntu):
status: New → Invalid
Changed in nvidia-graphics-drivers-375 (Ubuntu):
status: New → Invalid
Revision history for this message
Tim Richardson (tim-richardson) wrote :

I should add that the "fix" I reported is only a narrow fix. The internal display works. But external displays don't work if you have nvidia drivers, gdm3 and if you are using modeset=1

Revision history for this message
David Coronel (davecore) wrote :

I just found out about this. I wanted to get rid of the screen tearing that I observed on my Nitro AN515-53 laptop running Ubuntu 18.04.3 LTS with NVIDIA GeForce GTX 1050 Mobile GPU.

I used https://askubuntu.com/a/1111020 and set nvidia_drm modeset=1 but then my external monitors didn't work after the reboot. So I switched from gdm3 to lightdm and that does the trick for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.