GDM should not allow X11 sessions when NVIDIA's KMS is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| gdm |
Unknown
|
Medium
|
||
| gdm3 (Ubuntu) |
Medium
|
Alberto Milone |
Bug Description
Due to a current limitation in the nvidia binary driver, when enabling KMS (to use Wayland), any X11 sessions will crash.
Ideally, GDM would check if modesetting is enabled in the nvidia driver, and blacklist the X11 sessions.
The following command can tell you whether the parameter is enabled or not:
:$ sudo cat /sys/module/
Y
NOTE: KMS is disabled by default in the nvidia driver, and it is possible to enable it by editing the following file
/etc/modprobe.
and by changing the following line:
options nvidia_375_drm modeset=0
to this:
options nvidia_375_drm modeset=1
Then you will probably have to update the initramfs too.
Related branches
- Iain Lane: Approve on 2017-09-04
- Daniel van Vugt (community): Needs Fixing on 2017-07-13
- Jeremy Bicha: Pending requested 2017-06-28
-
Diff: 271 lines (+256/-0)2 files modifieddebian/patches/95_hide_x11_sessions_with_nvidia_kms.patch (+255/-0)
debian/patches/series (+1/-0)
Changed in gdm3 (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
tags: | added: gnome-17.10 wayland |
Changed in gdm3 (Ubuntu): | |
assignee: | nobody → Alberto Milone (albertomilone) |
status: | New → In Progress |
Changed in gdm: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in gdm: | |
status: | Confirmed → Incomplete |
Doug McMahon (mc3man) wrote : | #1 |
Doug McMahon (mc3man) wrote : | #2 |
Actually stand corrected, after a couple of restarts PRIME Synchronization is now working.
So until you all can provide nvidia thru Wayland X11 sessions Should be allowed..
$ xrandr --verboseScreen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+0+0 (0x46) normal (normal left inverted right x axis y axis) 345mm x 194mm
Identifier: 0x42
Timestamp: 18328
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
filter:
_MUTTER_
EDID:
00fffffffffff
0015010380231
0e50540000000
0101010101017
350059c210000
0000000000000
4720446973706
004c503135365
PRIME Synchronization: 1
supported: 0, 1
Doug McMahon (mc3man) wrote : | #3 |
Just to reiterate, scorecard here on i7-4700MQ, GeForce GT 755M, nvidia-375.66 drivers, prime profile of nvidia selected.
gnome-wayland session, gdm, KMS = total fail
gnome-wayland session. gdm = total fail
default (ubuntu) session, gdm KMS, = all good, happy days, PRIME Synchronization = yes
default (ubuntu) session, lightdm, KMS = all good, even happier days, PRIME Synchronization = yes
So just the opposite of what is stated here & elsewhere, i.e. Will Cooke -
"While Wayland requires KMS (kernel mode setting) to be enabled, there is
a current limitation in the nvidia driver that causes X11 sessions to
crash with KMS. For this reason I am keeping KMS disabled by default, at
least for now. This is not going to be fixed anytime soon, as it
requires major changes in the driver.
Users who want to try Wayland with nvidia will have to set modeset=1 in
/etc/modprobe.
initramfs.
When KMS is enabled, GDM will start, but entering the default session
will fail with no error that is visible to the user. Ideally, I think we
would check if KMS is enabled with nvidia, and either show only the
Wayland sessions or maybe simply
default to the Wayland session."
Iain Lane (laney) wrote : | #4 |
Doug, are you saying that what Alberto is saying - that X11 sessions with KMS enabled on Nvidia is broken - isn't right?
Maybe the two of you could look into that together.
Doug McMahon (mc3man) wrote : Re: [Bug 1697882] Re: GDM should not allow X11 sessions when NVIDIA's KMS is enabled | #5 |
On 07/11/2017 12:35 PM, Iain Lane wrote:
> Doug, are you saying that what Alberto is saying - that X11 sessions
> with KMS enabled on Nvidia is broken - isn't right?
>
> Maybe the two of you could look into that together.
>
Absolutely isn't broken, at least here with a hybrid(optimus) device.
To re-confirm just did fresh install from iso of a couple of days ago.
Updated that install fully today.
Installed nvidia drivers (375
rebooted
Enabled KMS via nvidia-
sudo update-initramfs -u
Rebooted to default session, works fine inc. the added bonus of PRIME
Synchronization: 1 on primary display.
And as mentioned any attempt to log in to a gnome-wayland session fails
with login loop.
Alberto Milone (albertomilone) wrote : | #6 |
@Doug: we are going to leave PRIME systems alone in any case. This bug report is about non hybrid systems. You are using the intel GPU to drive the screen, and that is why X11 + KMS works for you. As far as I know, Wayland doesn't support that yet.
Tim Richardson (tim-richardson) wrote : | #7 |
What's the bug report for hybrid systems? I can't get gdm working with modeset=1 (aiming to get PRIME sync working). Is good in lightdm. There are so many bug reports with similar symptoms.
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package gdm3 - 3.25.90.1-0ubuntu4
---------------
gdm3 (3.25.90.
[ Jeremy Bicha ]
* Don't build for s390x since gnome-shell isn't available there
[ Iain Lane ]
* We only need to do the above for gdm3 itself. This will make future
enablement a bit easier; maintaining arch lists is error prone.
* debian/rules: Only do gdm3 things when we're building gdm3.
-- Iain Lane <email address hidden> Thu, 07 Sep 2017 16:51:10 +0100
Changed in gdm3 (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in gdm: | |
status: | Incomplete → Unknown |
Don't see it crashing X11 session here at all, 17.10 -
$ echo $DESKTOP_SESSION
ubuntu
sudo cat /sys/module/ nvidia_ drm/parameters/ modeset
Y
(- But the disappointing thing is this -
$ xrandr --verbose
0. 000000 1.000000 0.000000
0. 000000 0.000000 1.000000 PRESENTATION_ OUTPUT: 0 f0030e4d9020000 0000 3780a15d59e5950 9826 101010101010101 0101 e3680b070381f40 3020 019000000000000 0000 0000000000000fe 004c c61790a20200000 00fe 746312d544c4232 004b
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
eDP1 connected primary 1920x1080+0+0 (0x48) normal (normal left inverted right x axis y axis) 350mm x 190mm
Identifier: 0x43
Timestamp: 14688
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
filter:
_MUTTER_
EDID:
00fffffffffff
0015010380231
0e50540000000
0101010101017
350059c210000
0000000000000
4720446973706
004c503135365
PRIME Synchronization: 0
supported: 0, 1
So currently -
no nvidia support in gdm3/wayland
nvidia support in gdm3/xserver-xorg but no PRIME Synchronization support.
i.e., a complete fail in Ubuntu all around