Solved Cannot get the X Window System (xorg) working with drm-kmod and Intel graphic card (again)

Last year I upgraded from 13.2 to 14 and had this exact same problem that I now have after upgrade from 14.2 to 14.3.

Last time I fix it installing drm-510-kmod but now it is marked as IGNORE: not supported on FreeBSD 14.2 and higher, I had it working on 14.2, so I have tried again with drm-515-kmod, drm-61-kmod and drm-kmod with no luck.

It works with xf86-video-intel and scfb, but with graphics glitches.

Xorg.0.log

My user is in the video group and the module is loading kldstat ...

My hardware specs
Code:
Lenovo ThinkPad 11e
Celeron CPU N2940 @ 1.83GHz
Graphics card Atom Processor Z36xxx/Z37xxx Series Graphics & Display

Thanks in advance.
 
On 14.3 a new special KMOD repository was added, this will have various kernel module and have been specifically compiled for 14.3. But you may need to upgrade your packages. The kernel version is part of the 'version' so the 14.3 modules would be 'newer' than the 14.2 versions in the 'regular' repository. Or you could simply force a reinstallation of the DRM kernel modules.

Code:
Repositories:
  FreeBSD: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
Code:
root@fbsd-test:~ # pkg search -r FreeBSD drm-515-kmod
drm-515-kmod-5.15.160.1402000_4 DRM drivers modules
nvidia-drm-515-kmod-570.153.02.1402000_1 NVIDIA DRM Kernel Module
root@fbsd-test:~ # pkg search -r FreeBSD-kmods drm-515-kmod
drm-515-kmod-5.15.160.1403000_4 DRM drivers modules

Note the versions 5.15.160.1402000_4 (for 14.2) and 5.15.160.1403000_4 (for 14.3)
 
Last year I upgraded from 13.2 to 14 and had this exact same problem that I now have after upgrade from 14.2 to 14.3.
IF you need graphics/drm-510-kmod (referring to your link) and specifically that one, you shoul build it from source yourself; it doesn't seem present any more as a package for the 14 branch (only the 13 branch).
Edit: drm-510-kmod isn't supported on 14.2-R and later, see below
Edit2: and I completely overlooked it in your OP.

If you want to try drm-61-kmod with its most recent and suitable instance for 14.3-RELEASE, you need to verify that you have the 'FreeBSD-kmods' repository set correctly. In that case, you should be seeing:
Rich (BB code):
[1-0] % pkg rquery -x '[%R] %n %v' '^drm(-|-510-|-515-|-61-)kmod' | column -t
[FreeBSD]        drm-515-kmod  5.15.160.1402000_4
[FreeBSD]        drm-61-kmod   6.1.128.1402000_4
[FreeBSD]        drm-kmod      20250428
[FreeBSD-kmods]  drm-515-kmod  5.15.160.1403000_4
[FreeBSD-kmods]  drm-61-kmod   6.1.128.1403000_4   <-- this drm-61-kmod is specifically for 14.3-RELEASE
[2-0] %

For drm-61-kmod, this, showing what I did after upgrading 14.2-R -> 14.3-RELEASE may help.
 
[...]
Code:
Repositories:
  FreeBSD: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
This set up mixes packages repositories. It mixes the FreeBSD repository of the main Latest branch:
(containing the the bulk of packages)
Rich (BB code):
Repositories:
  FreeBSD: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest",
with the specific FreeBSD-kmods Quarterly branch:
(containing a very limited number of packages containing kernel modules)
Rich (BB code):
FreeBSD-kmods: {
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3",
That cannot be intended; I cannot think of that as a viable combination.

Using pkg-repositories(8) and having the FreeBSD-kmods set up correctly, one should be seeing:
  • On 14.3-RELEASE, using Latest:
    Code:
    [1-0] % pkg repositories
    FreeBSD: {
        url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/latest",
        enabled         : yes,
        priority        : 0,
        mirror_type     : "SRV",
        signature_type  : "FINGERPRINTS",
        fingerprints    : "/usr/share/keys/pkg"
      }
    FreeBSD-kmods: {
        url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_latest_3",
        enabled         : yes,
        priority        : 0,
        mirror_type     : "SRV",
        signature_type  : "FINGERPRINTS",
        fingerprints    : "/usr/share/keys/pkg"
      }
    [2-0] %
  • On 14.3-RELEASE, using Quarterly:
    Code:
    [2-0] % pkg repositories
    FreeBSD: {
        url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly",
        enabled         : yes,
        priority        : 0,
        mirror_type     : "SRV",
        signature_type  : "FINGERPRINTS",
        fingerprints    : "/usr/share/keys/pkg"
      }
    FreeBSD-kmods: {
        url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3",
        enabled         : yes,
        priority        : 0,
        mirror_type     : "SRV",
        signature_type  : "FINGERPRINTS",
        fingerprints    : "/usr/share/keys/pkg"
      }
    [3-0] %
 
This set up mixes packages repositories from the main FreeBSD Latest branch:
Oh, yeah, shoot. Forgot to remove that /usr/local/etc/pkg/repos/FreeBSD.conf, it's a test server I typically use to check for availability in the FreeBSD repositories. All my other servers use my own local repository.
 
IF you need graphics/drm-510-kmod (referring to your link) and specifically that one, you shoul build it from source yourself; it doesn't seem present any more as a package for the 14 branch (only the 13 branch).

FYI, graphics/drm-510-kmod is not supported on current and future 14 / 15 versions, the driver is only available on the 13 branch. With 14.1 EoL, there is no package for the 14 branch build, and no port installation on >=14.2 possible either.

ports/graphics/drm-510-kmod/Makefile
Rich (BB code):
34 .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1401501
35 IGNORE=         not supported on FreeBSD 14.2 and higher
36 .endif
37 IGNORE_FreeBSD_15=      not supported anymore

To bad, that driver was very stable on 14.1, newer drm-515|61-drm tend to freeze xorg on 14.2/14.3 on my system (still investigating if drm or xorg issue, but nothing conclusive so far).
 
Ok, as a last resort I compiled drm-510-kmod bypassing the IGNORE, and it is working :D, I don't know if that will bring more problems but as of now I haven't noticed anything wrong.
 
I'm going to mention my stupidity (https://srobb.net/stupid.mp4) in the hope it helps others. I recently ran a pkg upgrade, and my nvidia-drm-kmod got updated. When I restarted X, I found that suddenly I had a resolution of 1024x768. (This is a 32" monitor and usually I have 2550x1440 or something like that.

I tried reinstalling all nvidia packages from ports but no luck. Suddenly, with a Homer Simpson-esque "D'oh" I realized that I hadn't updated my ports tree in awhile, probably at least a month. I updated my ports tree, and then build the nvidia-kmod from ports and all was well.

I'm mentioning this in case someone with a similar issue starts web searching and finds this thread.
 
Last edited:
On a laptop with Haswell, the only thing I needed to do extra was 'pkg install drm-515-kmod'. I did not need to compile from source and did not need to touch /boot/loader.conf or /etc/rc.conf. I think I am on the quarterly package repo.
 
Just compile graphics/drm-kmod from ports, that way you're gonna have GPU drivers that match the kernel version. Having drivers that match the installed kernel version is the bump that trips up pretty much everyone who's got GPU issues with FreeBSD. And that's why I recommend ports - make && make install will take care of GPU problems with a snap of your fingers, a push of the enter key, and a round of dancing a jig that you did something correct ;)
 
Back
Top