Improve NVIDIA GL/EGL situation
Closed, ResolvedPublic

Tokens
"Yellow Medal" token, awarded by WampaCowboy."Love" token, awarded by FancyCicada."Like" token, awarded by m-delvalle."Orange Medal" token, awarded by euoar."100" token, awarded by kyrios123.
Assigned To
Authored By
ikey, Oct 30 2017

Description

Just tracking this for myself so I don't forget tomorrow..

  • Investigate plausibility of libglvnd. Would love to drop the filesystem butchery we currently do
  • Figure out what to do about NVIDIA libglx.so xorg extension (private directory + custom xorg config line..?)
  • Drop filesystem butchery from LDM
  • Add egl-streams / wayland-egl components to enable NVIDIA+Wayland support
  • Make xrandr calls PRIME centric in LDM
  • Once all this is done, start working towards step 2, improved optimus support

Details

Differential Revisions
D1774: Initial inclusion of libglvnd
ikey created this task.Oct 30 2017, 5:39 PM
ikey claimed this task.
ikey triaged this task as Unbreak Now! priority.Oct 30 2017, 11:51 PM
euoar awarded a token.Oct 31 2017, 8:16 AM
m-delvalle added a subscriber: m-delvalle.
euoar added a subscriber: euoar.Oct 31 2017, 2:43 PM

If you need some testing done give me a call

This comment was removed by sudopluto.
MrMonotone added a subscriber: MrMonotone.EditedNov 1 2017, 11:30 AM

@ikey I was curious what your thoughts were on EGL-Streams. I know that KWin has refused to support them. Will that affect Budgies move to Qt?

blog post: https://blog.martin-graesslin.com/blog/2017/10/plasmawayland-and-nvidia-2017-edition/

mrkucho added a subscriber: mrkucho.Nov 1 2017, 1:32 PM
hitori added a subscriber: hitori.Nov 1 2017, 2:38 PM
miwilc added a subscriber: miwilc.Dec 6 2017, 9:10 AM

XWayland probably will support NVIDIA EGLStreams next year with version Xorg 1.20: https://www.phoronix.com/scan.php?page=news_item&px=Xorg-Server-1.20-Features

Investigate plausibility of libglvnd. Would love to drop the filesystem butchery we currently do

@ikey are there currently any plans/WIP for libglvnd?
I just implemented it for Mesa (wasn't hard) : https://github.com/mati865/solus-glvnd


However I think it needs more tests as it's something that can break desktop for inexperienced users.

If this direction is appreciated I can prepare nvidia-glx-drivers to use it as well.

ikey closed this task as Wontfix.Dec 29 2017, 7:54 PM

I've got EGL enabled but I'm going to dismiss glvnd until it matures significantly and all drivers support it. We support 304 + 340 and glvnd would break this right now.

ikey reopened this task as Open.Dec 29 2017, 9:16 PM

Yknow what if we don't fix this before Solus 4 then I'm a complete and utter eejit.

@mati865 you have most experience here with glvnd - mind helping me plan how we do this?

@ikey I made final touches on nvidia-current, xorg-server, mesalib, libgvlnd and was about to send it when I was your comment TBH.
I have no idea what to do with 304 and 340, allow them to replace libglvnd libs maybe?

I dropped /usr/lib/glx-provider completely so Nvidia drivers are discovered by conf files in /usr/share/X11/xorg.conf.d/. It's similar to the Fedora and Arch but they are backporting few patches (merged in xorg 1.20; maintainers are hoping to release it in January) to have only 1 conf file instead of 2.

I can't tell about optimus but on the desktop it seems to work fine (tested with Garry's Mod). Should I resend diffs?

ikey added a comment.Dec 29 2017, 9:55 PM

Well we need to plan what we're changing. LDM will need to lose the butcher approach (which makes my rewrite simpler tbh)
and we'll have to use the custom patch for xorg extension directory for nvidia. We can't allow any file replacement for any of
this to work properly, so we need glvnd working on all of them. We also need to deal with the obvious fallout which will be
the impact on snapd. :)

mati865 added a comment.EditedDec 29 2017, 10:37 PM

We can't allow any file replacement for any of this to work properly, so we need glvnd working on all of them.

So Arch way (replacing files for 304 and 340) doesn't fit and you cannot patch binary files to work with libglvnd.

Maybe Fedora way then?
All conflicting files are moved to /usr/lib/nvidia-340 and they are added to the PATH via ld.conf.so.d but I have no idea if it works for 32 bit libs.

Having plan of the changes surely would make this mess easier to understand.

ikey closed this task as Resolved.Jan 22 2018, 12:03 AM

Happy to now close this. We'll fix the bugs during the week before the sync (like the now broken snapd :P)

files/xorg.conf for nvidia-glx-driver-384.111 needs to be fixed, aside from that LGTM for desktop users.

Early adopters with Optimus laptops might get a bit angry but it should make things easier in the future.

ikey added a comment.Jan 23 2018, 12:00 AM

Needs fixing how? Its working here and i'm using it. Also what do you mean optimus users might get a bit angry..?

My bad about nvidia-glx-driver, https://dev.solus-project.com/R2210:fca60614a17a5adbc40f9674c425c39748a4abdb wasn't linked to this task.

Also what do you mean optimus users might get a bit angry..?

I was talking about Early adopters.
I remember when Arch switched to libglvnd and broke Optimus for some users, then there was Ubuntu did it and again Optimus was broken OOTB for some users. I hope it will be smoother this time.

ikey added a comment.Jan 23 2018, 1:09 AM

Ah right. Yeah I have an Optimus laptop which is working just like it did before. The main thing that is broken right now is snapd, but one thing at a time :)
What we need to do is try to make sure the always-on support is correctly prime synced, because I'm still experiencing some tearing (like before)