# Farewell, drm-current-kmod and drm-devel-kmod – welcome, graphics/drm-54-kmod and graphics/drm-510-kmod; multiple ports and flavours for GPU firmware



## grahamperrin@ (May 1, 2022)

New:

graphics/drm-54-kmod
graphics/drm-510-kmod









						graphics: Delete drm-current-kmod and drm-devel-kmod · freebsd/freebsd-ports@fae9e49
					

For now please use drm-510-kmod and if you have problems with it please use drm-54-kmod and open a issue on https://github.com/freebsd/drm-kmod  Sponsored by:	Beckhoff Automation GmbH & Co. KG




					github.com
				






> … please use *drm-510-kmod* …





grahamperrin said:


> For the DRM stack (graphics), from <https://gitter.im/FreeBSDDesktop/Lobby/archives/2022/02/18?at=620fda5f4164105ab0a48254>:
> 
> _[irc] <manu> brief plan is 5.10, move most things to base (i.e. no linuxkpi_gplv2.ko)
> [irc] <manu> then have a dma-buf implem in base and if it's good enough perf-wise import everything_


----------



## jb_fvwm2 (May 1, 2022)

This is timely info. Also it should be mentioned some systems may also need a new kernel built locally.


----------



## grahamperrin@ (May 2, 2022)

jb_fvwm2 said:


> … some systems may also need a new kernel built locally.



Some of what's around <https://gitter.im/FreeBSDDesktop/Lobby/archives/2022/04/25> may be of interest. 

I'm OK, so far, with `1400057` (main-n255078-e140d551b78-dirty – screen shot).


----------



## sidetone (May 5, 2022)

I tried graphics/drm-510-kmod for 13.1. It works for the console, but it didn't work for the desktop.

My XDM login screen and window manager didn't display properly. The outer shapes show correctly, and cursor prompts show. Text is missing, and some colors are completely different. Also, the shadows stay up after making menus and other displays show up. Here's a screen shot of how it looks on my window manager:




It's difficult to get the user name and password entered to log in on XDM.

Uninstalling drm-510-kmod was easy.  Attempting to uninstall libdrm tried to uninstall every graphical port, but that might be necessary.

I'll try it again, then try, drm-54-kmod. If that doesn't work, I'll go back to the one I was using before for now.

I'll update this in a bit.


----------



## bsduck (May 5, 2022)

sidetone said:


> I tried graphics/drm-510-kmod for 13.1. It works for the console, but it didn't work for the desktop.


What kind of GPU and which driver are you using?


----------



## sidetone (May 5, 2022)

Intel i915kms. Not sure of the card, but its an older one that loaded automatically to this after everything was compiled with the previous kmod.

The problem could have been that, I needed to recompile libdrm.


----------



## bsduck (May 5, 2022)

I also use Intel graphics (Ivy Bridge HD Graphics 4000) and everything works as expected with drm-510-kmod here on 13.1-STABLE.

It could be worth to try with both x11-drivers/xf86-video-intel and default modesetting (both work for me).


----------



## sidetone (May 5, 2022)

Ok, that's all it needed. drm-510-kmod worked on 13.1-RC5.

I don't know if it's just me, but there seems to be less dependencies on some ports that were uninstalled and reinstalled. qt5 especially. I don't want to reinstall everything else to be sure of xorg. It seems like some dependencies aren't hardwired like they were before.


----------



## sidetone (May 5, 2022)

I'm not sure what happened. This stopped working.

As it was, it was working, but periodically logged out of the windowmanger to xdm. This is the error:

```
Xconnection to :0 broken (explicit kill or server shutdown).
xterm: xterm: xterm: fatal IO error 35 (resource temporarily unavailable) or KillClient on X server ":0"
```
Some of these errors showed up a few times.

Then, when reinstalling some ports, the errors got worse.


```
ATTENTION: default value of option mesa_glthread overriden by environment.
Exiting due to channel error.
Crash Annotation GraphicCriticalError: I[C0][GFX-]: Receive IPC close with reason=AbnormalShutdown (t=12.4294) Exiting due to channel error.
```
This is summarized, some errors were the same as from the previous error. Don't remember the exact sequence after which this error occurred.

After saving this message, and after doing more port reinstalling, the XDM screen kept flashing. It didnt show correctly, and I couldn't get to the console, without logging into single user mode.

What it looks like here, is dependency chains uninstalled drm-510-kmod (which obviously I didnt intend), and that messed things up. Checking later, modules in /boot were uninstalled, as could have been expected. Similar error messages showed up. I'm not going to troubleshoot this one now. I'm going to try kmod 54. If that doesn't work, I'll use Vesa. Right now, I just need a desktop.

Don't tell me not to mix packages and ports. This could have happened anyway with the port dependency chains, after hours of compiling. This is a lesser case of what dependency hell is. I want to get a system up fast, and not spend hours compiling. The point here, is that there's compatibility issues, and dependency requirements of uninstalled/reinstalled things. Before that was an issue, it automatically logs out to XDM. This lets people know what to expect, and to plan accordingly. Also the error messages can help with troubleshooting.

There's a package for drm-54-kmod, and not for drm-510-kmod, so this package may work and be compatible, without needing compiling.

UPDATE: I'm in the process of trying the available package drm-54-kmod on 13.1-RC5. It worked well on kldload-ing and starting my desktop. This package leaves the /boot/modules/ directory simplified.





Couldn't start Firefox with a mesa_glthread error (same error in code from previous post above), so, maybe recompiling and addressing that elsewhere.


----------



## grahamperrin@ (May 7, 2022)

If there's an issue, remember to raise it *in GitHub*. Thanks.


----------



## grahamperrin@ (May 14, 2022)

I found a more comprehensive explanation:

Changes in drm ports​– other ports that were added on 1st May include:

graphics/gpu-firmware-amd-kmod
graphics/gpu-firmware-intel-kmod
graphics/gpu-firmware-radeon-kmod
*Hint*

If you `pkg delete` graphics/gpu-firmware-kmod `20211014,1` or later, you should also either:

`pkg autoremove` then (if removals are allowed) install what's required; or
individually delete the eighty-something packages that are not required, and set the required packages to non-automatic.









						sysutils/gpu-firmware-kmod: Change it to be a metaport · freebsd/freebsd-ports@cfb6fe4
					

Now that we have flavored version for each GPU family and generation change the gpu-firmware-kmod to be a metaport that install all of them.  Sponsored by:   Beckhoff Automation GmbH & Co. KG




					github.com
				





*Side note*

If you have multimedia/gstreamer1-plugins-all, beware of unwanted findings in response to `pkg autoremove` (bug 263949 (fixed in _latest_)).


----------

