drm-kmod-515

Hi!

My sytem:
Code:
AMD Radeon(TM) Vega 8 Graphics

freebsd-version -kru
14.1-RELEASE
14.1-RELEASE
14.1-RELEASE-p2

I have installed drm-kmod-515 and I do not have problems just sometimes it freezing for a while and works again.
But when I start
glxinfo I got msg:
"amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!"
Please, check attached glx.txt for more.
glxinfo -B:
Code:
name of display: :0
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Vega 8 Graphics (radeonsi, raven, LLVM 15.0.7, DRM 3.42, 14.1-RELEASE) (0x15d8)
    Version: 24.0.9
    Accelerated: yes
    Video memory: 2048MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 1935 MB, largest block: 1935 MB
    VBO free aux. memory - total: 2746 MB, largest block: 2746 MB
    Texture free memory - total: 1935 MB, largest block: 1935 MB
    Texture free aux. memory - total: 2746 MB, largest block: 2746 MB
    Renderbuffer free memory - total: 1935 MB, largest block: 1935 MB
    Renderbuffer free aux. memory - total: 2746 MB, largest block: 2746 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 5120 MB
    Currently available dedicated video memory: 1935 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Vega 8 Graphics (radeonsi, raven, LLVM 15.0.7, DRM 3.42, 14.1-RELEASE)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.9
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.9
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.9
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I didn't have a problem with drm-kmod-510

Thank you.
 

Attachments

  • glxinfo.txt
    122.6 KB · Views: 28
I don't know about the freezing, but I also get the message with graphics/drm-61-kmod on my minipc with AMD Radeon 780M graphics. According to https://github.com/freebsd/drm-kmod/issues/21 this message results from an unimplemented kcmp syscall on FreeBSD, but it seems to be harmless. I don't see any bad effects on my side. Also according to this issue the missing syscall is now available on 15-CURRENT and probably 14-STABLE, so this message should disappear if you use those versions or 14.2-RELEASE later.
 
Note , i have on quarterly,
drm-61-kmod-6.1.92 DRM drivers modules
drm-kmod-20220907_3 Metaport of DRM modules for the linuxkpi-based KMS components
 
Note , i have on quarterly,
drm-61-kmod-6.1.92 DRM drivers modules
drm-kmod-20220907_3 Metaport of DRM modules for the linuxkpi-based KMS components
I am using packages (latest) and there are no drm-61-kmod. I tried to built from ports once but not successful. And as I did read on github there are problems with 61 too.
 
I am using packages (latest) and there are no drm-61-kmod.

amdgpu, i915, and radeon DRM drivers modules.
Currently corresponding to Linux 6.1 DRM.
This version is for FreeBSD 14-STABLE 1400508
and above.

Looks like the package isn't ready for RELEASE yet.

Like you I also have the warning message but as others explained already it isn't an issue, I don't have any freeze BUT I am on 13.3-RELEASE and have got drm-510-kmod and the port is built on poudriere as well as:
www/linux-widevine-cdm
graphics/drm-kmod
graphics/drm-510-kmod
graphics/gpu-firmware-kmod

I only build these 4 ports in order to avoid weirdness or strange freezes, for now it is fine I didn't face any issue.
 
I think it is, some users have reported having trouble with the graphic display until they build the ports themselves, I observed that a lot from people who did an upgrade from 13-2 -> 13-3 or 13.x -> 14.x and even 14.0 to 14.1
So I did not take the risk to be in the same situation, I did some reading about poudriere and then made a VM where poudriere build only 4 packages (those I listed in my previous message), it takes less than 30min. I don't want to build every single package in poudriere, it's not for me.
I keep the official FreeBSD repo of course, just added mine, I rebuild the 4 ports from time to time and then reinstall them, so far it's okay.
for a very long time I had a weird bug in Chromium/Firefox with PDF viewer that doesn't exist anymore, and one strange lock on the system itself that went away too.
All that seemed related to the graphic display and I didn't know ...
 
I think it is, some users have reported having trouble with the graphic display until they build the ports themselves, I observed that a lot from people who did an upgrade from 13-2 -> 13-3 or 13.x -> 14.x and even 14.0 to 14.1
So I did not take the risk to be in the same situation, I did some reading about poudriere and then made a VM where poudriere build only 4 packages (those I listed in my previous message), it takes less than 30min. I don't want to build every single package in poudriere, it's not for me.
I keep the official FreeBSD repo of course, just added mine, I rebuild the 4 ports from time to time and then reinstall them, so far it's okay.
for a very long time I had a weird bug in Chromium/Firefox with PDF viewer that doesn't exist anymore, and one strange lock on the system itself that went away too.
All that seemed related to the graphic display and I didn't know ...
The problem is because I cannot build 515 or 61 and also drm-kmod on FreeBSD 14.1-RELEASE p2 - get error.
 
Screenshot 2024-07-17 at 10.12.35.png


I also can't get this package so I can't run startx
 
fernandel, what graphics card / GPU do you have?


By the looks of it seems from ca. 2018, but I vould be wrong.
Yes, AMD Radeon(TM) Vega 8 Graphics on Lenovo T495. And was not a problem with drm-510-kmod and works with drm-515-kmod too but sometime (now I didn't have long ger time) are some problems.
And kldstat shows:
Code:
2220 amdgpu_picasso_gpu_info_bin.ko
17    1 0xffffffff830a5000     64e0 amdgpu_picasso_sdma_bin.ko
18    1 0xffffffff830ac000    2c2e0 amdgpu_picasso_asd_bin.ko
19    1 0xffffffff830d9000     c4e0 amdgpu_picasso_ta_bin.ko
20    1 0xffffffff830e6000     7560 amdgpu_picasso_pfp_bin.ko
21    1 0xffffffff830ee000     6560 amdgpu_picasso_me_bin.ko
22    1 0xffffffff830f5000     4560 amdgpu_picasso_ce_bin.ko
23    1 0xffffffff830fa000     b9c8 amdgpu_picasso_rlc_bin.ko
24    1 0xffffffff83106000    43800 amdgpu_picasso_mec_bin.ko
25    1 0xffffffff8314a000    43800 amdgpu_picasso_mec2_bin.ko
26    1 0xffffffff8318e000    5b4c0 amdgpu_picasso_vcn_bin.ko
 
In your case you could build either
graphics/drm-515-kmod
or
graphics/drm-61-kmod
I suggest that you try first building drm-515-kmod from ports. drm-61-kmod is very new and for your GPU you most likely don't need it*.

If I understand correctly, you had some problems with the package drm-515-kmod, that probably won't happen when you build drm-515-kmod from ports.

The shortest way to get your drm-515-kmod build from ports and working on your laptop is:
First do:
pkg delete drm-kmod
then install the firmware for the AMD GPUs separately:
pkg install gpu-firmware-amd-kmod

Now follow the Handbook, 4.5. Using the Ports Collection:
- get the source files for the port graphics/drm-515-kmod;
you probably already have that, but check that you have the source from the head of the ports branch, also known as "latest"
- build the port as explained in the Handbook

If there are any problems, show what steps you have taken and copy the output and error messages here on the forum.

___
* After drm-61-kmod becomes available as a package for 14.1-RELEASE you can to switch back to using packages any drm-xxx-kmod.
 
In your case you could build either
graphics/drm-515-kmod
or
graphics/drm-61-kmod
I suggest that you try first building drm-515-kmod from ports. drm-61-kmod is very new and for your GPU you most likely don't need it*.

If I understand correctly, you had some problems with the package drm-515-kmod, that probably won't happen when you build drm-515-kmod from ports.

The shortest way to get your drm-515-kmod build from ports and working on your laptop is:
First do:
pkg delete drm-kmod
then install the firmware for the AMD GPUs separately:
pkg install gpu-firmware-amd-kmod

Now follow the Handbook, 4.5. Using the Ports Collection:
- get the source files for the port graphics/drm-515-kmod;
you probably already have that, but check that you have the source from the head of the ports branch, also known as "latest"
- build the port as explained in the Handbook

If there are any problems, show what steps you have taken and copy the output and error messages here on the forum.

___
* After drm-61-kmod becomes available as a package for 14.1-RELEASE you can to switch back to using packages any drm-xxx-kmod.
The problem is that I cannot compile or better I got an error.
Now I am not sure if is /usr/src updated because there are also some older dates. For install version 14.1-RELEASE from 14.0 I did use freebsd-update upgrade...
Thank you.

Code:
--- dma-buf-kmod.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-buf-kmod.c:30:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.
*** [dma-buf-kmod.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- dma-fence-array.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-fence-array.c:27:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- dma-fence.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-fence.c:27:
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/linuxkpi/bsd/include/linux/dma-fence.h:30:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/err.h:32:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- dma-fence-chain.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-fence-chain.c:27:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- sync_file.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/sync_file.c:9:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/file.h:32:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- dma-resv.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-resv.c:36:
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/linuxkpi/gplv2/include/linux/dma-resv.h:42:
In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/ww_mutex.h:29:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- dma-buf.o ---
In file included from /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/drivers/dma-buf/dma-buf.c:30:
In file included from /usr/src/sys/sys/param.h:116:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
--- dma-fence-array.o ---
1 error generated.
*** [dma-fence-array.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- dma-fence.o ---
1 error generated.
*** [dma-fence.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- dma-fence-chain.o ---
1 error generated.
*** [dma-fence-chain.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- sync_file.o ---
1 error generated.
*** [sync_file.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- dma-resv.o ---
1 error generated.
*** [dma-resv.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
--- dma-buf.o ---
1 error generated.
*** [dma-buf.o] Error code 1

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf
7 errors

make[1]: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0/dmabuf

make: stopped in /usr/ports/graphics/drm-515-kmod/work/drm-kmod-drm_v5.15.160_0
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-515-kmod
 
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
On my 14.1 installation I can build this port, the file that seems to be missing in your case is /usr/src/tools/build/cross-build/include/common/machine/endian.h.
Its contents without comments are this:
Code:
#if __has_include_next(<machine/endian.h>)
#include_next <machine/endian.h>
#endif

You could try to add such a file, but there may be more files missing.
 
On my 14.1 installation I can build this port, the file that seems to be missing in your case is /usr/src/tools/build/cross-build/include/common/machine/endian.h.
Its contents without comments are this:
Code:
#if __has_include_next(<machine/endian.h>)
#include_next <machine/endian.h>
#endif

You could try to add such a file, but there may be more files missing.
I have this file. Did you commented, please?
I will try.
 
Back
Top