nvidia-drm.modeset=1, gdm3 and optimus laptop results in no external monitors detected by Xorg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdm3 (Ubuntu) |
Opinion
|
Undecided
|
Unassigned | ||
nvidia-graphics-drivers-375 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
nvidia-graphics-drivers-418 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
nvidia-graphics-drivers-430 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
nvidia-graphics-drivers-435 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
nvidia-graphics-drivers-470 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Context:
17.10 development packages, nvidia binary driver 375, modeset=1 for the nvidia driver.
ubuntu desktop (gnome shell), fresh install
ThinkPad W520 in Nvidia Optimus bios mode.
Nvidia profile.
Result:
no external monitors are detected.
xrandr does not even list them as disconnected (normally it would list five external disconnected monitors)
lsmod
shows that nvidia driver is loaded
and the modesetting is working at some level because there is no tearing on the laptop panel
Note: modeset=1 is the only way to get flicker-free graphics on the laptop panel. modeset=1 is not the default setting but it is highly desirable.
It works if lightdm is used which is why I have reported this against gdm3
My sessions in this configuration have mostly crashed after a few minutes with a gdm3 fail whale message in syslog but nothing else looks interesting.
summary: |
- gdm3, hybrid nvidia in modeset, no external monitors detected + gdm3, hybrid nvidia with modeset=1, no external monitors detected |
tags: | added: nvidia |
tags: | added: artful bionic |
Changed in mutter (Ubuntu): | |
status: | New → Confirmed |
tags: | removed: artful |
tags: | added: cosmic |
tags: | added: nvidia-drm.modeset |
no longer affects: | gdm3 (Debian) |
tags: | added: eoan |
Changed in nvidia-graphics-drivers-430 (Ubuntu): | |
status: | New → Confirmed |
Changed in nvidia-graphics-drivers-435 (Ubuntu): | |
status: | New → Confirmed |
summary: |
nvidia-drm.modeset=1, gdm3 and optimus laptop results in no external - monitors detected by Xorg, Pop!OS fix works. + monitors detected by Xorg |
ubuntu user Hon Weng Chong has emailed me as he continues to investigate the problem.
He believes he has proof that it is is GDM configuration issue and has provided the following fix
Hey Tim,
I figured out a hack solution to the GDM prime issue. If you replace /lib/systemd/ system/ gdm3.service with this file:
https:/ /gist.github. com/hwchong/ b3634b387e91b38 d355a0500ffecfc 7d
and /etc/X11/xorg.conf with this:
https:/ /gist.github. com/hwchong/ 28d7c70aafd62a0 d3114c5746da7da 36
You should be able to use Prime Sync with your Intel graphics card and have an external monitor connected to the Nvidia GPU without using LightDM.
Cheers,
Hon
His proposed changes to xorg are probably not significant. He is proposing to add this to nvidia options, but this can be done via the GUI or command line.
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositi onPipeline= On, ForceFullCompos itionPipeline= On}"
The revised /lib/systemd/ system/ gdm3.service he proposes is /usr/bin/ xinit /usr/share/ gdm/generate- config /usr/share/ gdm/generate- config
is
--> Compared to Fedora 27's config, changes seem to be the addition of
ExecStartPre=
.
.
.
RestartSec=1s
ExecReload=
[Unit]
Description=GNOME Display Manager
# replaces the getty
<email address hidden>
<email address hidden>
# replaces plymouth-quit since it quits plymouth on its own plymouth- quit.service quit.service
Conflicts=
After=plymouth-
# Needs all the dependencies of the services it's replacing quit.service quit-wait. service since it waits until local.service plymouth- start.service systemd- user-sessions. service
# pulled from getty@.service and plymouth-
# (except for plymouth-
# plymouth is quit, which we do)
After=rc-
# GDM takes responsibility for stopping plymouth, so if it fails plymouth- quit.service
# for any reason, make sure plymouth still stops
OnFailure=
[Service] /usr/bin/ xinit /usr/share/ gdm/generate- config /usr/sbin/ gdm3 org.gnome. DisplayManager syslog inherit =-/etc/ default/ locale /usr/share/ gdm/generate- config /bin/kill -SIGHUP $MAINPID
ExecStartPre=
ExecStart=
KillMode=mixed
Restart=always
RestartSec=1s
IgnoreSIGPIPE=no
BusName=
StandardOutput=
StandardError=
EnvironmentFile
ExecReload=
ExecReload=