Kepler ( Nvidia GTX 770M) + Wayland = No Go

The GTX 770M is based on NVIDIA's Kepler architecture. Kepler support was officially dropped after the 470.xx legacy driver series. It cannot use the modern 5xx series drivers.

Modern Wayland compositors (Sway, Hyprland, Wayfire, Labwc, modern GNOME/KDE) require GBM (Generic Buffer Management) and modern KMS (nvidia-drm modeset=1). NVIDIA did not implement generic GBM support until driver 495.xx.

The 470.xx series relied on NVIDIA’s proprietary EGLStreams protocol, which almost all modern Wayland compositors have completely dropped. Furthermore, FreeBSD’s port of nvidia-drm.ko (needed to run Wayland directly on proprietary NVIDIA) is tailored toward modern driver branches.

In summary, the only way to use Nvidia GTX 770M on FreeBSD is to use X11. Let this be an obituary for Nvidia Wayland support for this card. In its good days in 2010 it even mined something like a quarter of a bitcoin or something.
 
loveydovey one viable option is to bring nouveau+nvk to the drm tree. That would cover both OpenGL and Vulkan (Kepler and above, +OpenCL but no CUDA). The performance differences are reducing with each upstream release. NetBSD supports at least the nouveau driver and has a similar approach to FreeBSD to DRM (but different implementation of LinuxKPI) and can be used as reference.

Open issues with this solution:
  • Deciding which is the cutoff point:
    • for a modesetting only solution the starting support is G80+ (i.e. X11+Wayland)
    • for cards older than G80 the target would have to be X11 only and it would also need re-importing on the X11 tree the DDX driver
  • nouveau's licence should be compatible with FreeBSD, but I'm not sure about the nvk code
  • the gpu blobs (for Kepler+) will also need coordination with the current maintainers, maybe some package spliting is needed
  • nouveau covers a lot of hardware, how will validation work be done?
  • the Foundation sponsorship on DRM updates will probably not cover this work
I tried doing this but it had to leave it due to lack of time for both doing the initial work as well as the ensuing maintenance that would be required.
 
On a side note, when/if this MR gets merged with luck the fbdev drm driver may be used to initialize a software only wayland session.
 
Nouveau was once tried to be ported and been in ports tree as x11-drivers/xf86-video-nouveau for a while, but soon abandoned. As far as I know (lost track of the sources), it never become stable and usable on FreeBSD while in ports tree.
And even if it's running on NetBSD, unless LinuxKPI (or alike) on both are almost the same, porting it would require non-trivial works.
 
Nouveau was once tried to be ported and been in ports tree as x11-drivers/xf86-video-nouveau for a while, but soon abandoned. As far as I know (lost track of the sources), it never become stable and usable on FreeBSD while in ports tree.
And even if it's running on NetBSD, unless LinuxKPI (or alike) on both are almost the same, porting it would require non-trivial works.
yeah, that previous work would probably be thrown out of the window now. It was for more simple times :p
As far as I understood from the netbsd code that I looked at their approach was similiar in terms of how to handle drm code, i.e. leave it as close to upstream as possible. The differences are mostly on the KPI glue which is different.
 
yeah, that previous work would probably be thrown out of the window now. It was for more simple times :p
As far as I understood from the netbsd code that I looked at their approach was similiar in terms of how to handle drm code, i.e. leave it as close to upstream as possible. The differences are mostly on the KPI glue which is different.
At best, macro to override different function names in glue codes would be what's needed, but maybe not and far more complexed. I can't be optimistic here.
 
I don't know much about optimus. I also have an nvidia gt 710 gpu. It's getting really difficult to use the 470 driver, also on linux. the number of backported patches debian applies is, well, long. FreeBSD still offers the driver though, so it might be possible to have it work OK with X11, wayland is a lost cause.
 
And nouveau on Linux worked before, I had my Nvidia working and HDMI working...

Yes, I don't even care about Wayland right now, I just want the HDMI port working, but I think that requires nvidia-drm-kmod, which does not exist for this old Nvidia card. And nouveau, per posts above, is not ported.
 
Ohhh, also, it seems you canNOT use Nvidia's libglxserver_nvidia.so--Nvidia's OpenGL / GLX hardware acceleration module for Xorg (and potentially client OpenGL apps loading Nvidia's proprietary GL libraries)--unless you allow w^x! Crazy!
 
Yeah, that's what I'm using: nvidia-driver-470, nvidia-kmod-470...drivers load, i have nvidia.ko and nvidia-modeset.ko. Xorg seems to detect the card, all the modes, but it never detects HDMI plugged in!
that probably means the hdmi port is wired to the nvidia card and prime (or the old bumblebee methods of dma copy) was used to shuffle data. FreeBSD may only be enumerating what is connected to the igpu (screen is obvious).
if you are able, see if you can figure out to which device is the port actually wired on linux.
You can also try to disable the nvidia card and see if hdmi shows up on linux.
 
that probably means the hdmi port is wired to the nvidia card and prime (or the old bumblebee methods of dma copy) was used to shuffle data. FreeBSD may only be enumerating what is connected to the igpu (screen is obvious).
if you are able, see if you can figure out to which device is the port actually wired on linux.
You can also try to disable the nvidia card and see if hdmi shows up on linux.
I think the HDMI port is wired to the nvidia card. FreeBSD is listing HDMI-1, but it's always 'disconnected'. AI is telling me along the same lines as you do. SOL basically with this old laptop and the card.

I don't have Linux installed anywhere anymore.
 
The GTX 770M is based on NVIDIA's Kepler architecture. Kepler support was officially dropped after the 470.xx legacy driver series. It cannot use the modern 5xx series drivers.

Modern Wayland compositors (Sway, Hyprland, Wayfire, Labwc, modern GNOME/KDE) require GBM (Generic Buffer Management) and modern KMS (nvidia-drm modeset=1). NVIDIA did not implement generic GBM support until driver 495.xx.

The 470.xx series relied on NVIDIA’s proprietary EGLStreams protocol, which almost all modern Wayland compositors have completely dropped. Furthermore, FreeBSD’s port of nvidia-drm.ko (needed to run Wayland directly on proprietary NVIDIA) is tailored toward modern driver branches.

In summary, the only way to use Nvidia GTX 770M on FreeBSD is to use X11. Let this be an obituary for Nvidia Wayland support for this card. In its good days in 2010 it even mined something like a quarter of a bitcoin or something.
Yesterday I plugged in my GTX 1080TI and tried to use the 580 driver...without success. Used the 470 driver but could only get a screen resolution of 800X600. Switched back to the onboard graphics. Maybe I should sell the 1080TI, not doing me any good laying in a shoebox.
 
Yesterday I plugged in my GTX 1080TI and tried to use the 580 driver...without success. Used the 470 driver but could only get a screen resolution of 800X600. Switched back to the onboard graphics. Maybe I should sell the 1080TI, not doing me any good laying in a shoebox.
if you are using x11 remove any custom configs you may have not related with input, and try with modesetting.
 
Yesterday I plugged in my GTX 1080TI and tried to use the 580 driver...without success. Used the 470 driver but could only get a screen resolution of 800X600. Switched back to the onboard graphics. Maybe I should sell the 1080TI, not doing me any good laying in a shoebox.
If you're installing via pkg and NOT using 14.4 or 15.1, I strongly recommend building locally from ports.

As you can find a number of reports in this forums, FreeBSD{-ports}-kmods repo seems to have regressions that doesn't build pkgs sanely, while main FreeBSD{-ports} repo is fine.

And if you're going to run Wayland, don't forget to install graphics/nvidia-drm-kmod-580 port. Wayland seem to mandating DRM/KMS interface, and graphics/nvidia-drm-kmod-580 should choose proper graphics/drm-*-kmod ports/pkgs corresponding to your base OS version.

If you're on 15.{1|2} and having issue with graphics/drm-612-kmod, you'd need NOT to use graphics/nvidia-drm-kmod-580 and install graphics/drm-66-kmod and graphics/nvidia-drm-66-kmod-580 manually instead.
 
Back
Top