black screen at login after pkg upgrade

I run pkg upgrade last night and upgraded 587 packages, I get a black screen when boot to the plasma login window, the same with single user mode.
 
If you're on 15.1 then you probably unintentionally installed the display drivers for 15.0. The ones in FreeBSD-ports are newer than the ones in FreeBSD-ports-kmods. But the drivers in FreeBSD-ports are built for 15.0, which won't work on 15.1.
 
The safest bet at the moment is building the drm-XYZ-kmod (61, 66 or 612) port directly from source.
Especially if NVIDIA GPU is in use.
Unfortunately, official builders for FreeBSD-ports-kmods repo doesn't build NVIDIA related kmods other than x11/nvidia-kmod.

If you're OK with X11 (maybe regardless with xorg or xlibre) only and old-school drivers alone is fine (not requiring graphics/nvidia-drm-*-kmod*), possibly x11/nvidia-kmod* ports built for 15.0 (official main pkg repo, FreeBSD-ports) could work, but graphics/nvidia-drm-*-kmod* is quite sensitive to commits to kernel as these require LinuxKPI.
 
I had installed drm-66-kmod from ports, but doesn't work
Okay, then ensure you have an synchronized /usr/src, either from the git repository (ensure you are on the branch that matches your release, i.e.: the releng/15.1 branch) or by installing the FreeBSD-src-sys package (easier), pull the ports repository using one of the methods that T-Aoki mentioned above.
And compile graphics/drm-66-kmod (if you wish to use the same version). If you wish to create a package to install with pkg, it should be something like:

  1. $ cd /usr/ports/graphics/drm-66-kmod
  2. $ make package
  3. # pkg install work/pkg/*.pkg
 
my steps
Code:
git clone https://git.freebsd.org/ports.git /usr/ports/
git clone https://git.freebsd.org/src.git /usr/src/
cd /usr/ports/graphics/drm-66-kmod/
make install clean
Is your source tree (/usr/src, at least /usr/src/sys) 100% matches with your running kernel?
what it mean? I use 15.1
 
my steps
Code:
git clone https://git.freebsd.org/ports.git /usr/ports/
git clone https://git.freebsd.org/src.git /usr/src/
cd /usr/ports/graphics/drm-66-kmod/
make install clean

what it mean? I use 15.1
Ah, you should've pulled main branch of src. Not at all matches for 15.1.
Try:
  1. freebsd-update to update to latest patch release 15.1-RELEASE-p1.
  2. git checkout releng/15.1 at /usr/src to switch to releng/15.1 branch, which is used for building 15.1-RELEASE{-p*}.
  3. git pull at /usr/src
  4. build/install graphics/drm-66-kmod again.
  5. restart your computer.
 
I had deinstalled drm-66-kmod, reinstalled drm-66-kmod with pkg, system restarted before boot to the login prompt.
 
Ah, you should've pulled main branch of src. Not at all matches for 15.1.
Try:
  1. freebsd-update to update to latest patch release 15.1-RELEASE-p1.
  2. git checkout releng/15.1 at /usr/src to switch to releng/15.1 branch, which is used for building 15.1-RELEASE{-p*}.
  3. git pull at /usr/src
  4. build/install graphics/drm-66-kmod again.
  5. restart your computer.
I run git checkout/15.1 && git pull in /usr/src and reinstalled drm-66-kmod, still doesn't work, 612 and 61 the same.
 
I run git checkout/15.1 && git pull in /usr/src and reinstalled drm-66-kmod, still doesn't work, 612 and 61 the same.
git checkout/15.1 should surely fail! Do precisely.
git checkout releng/15.1
"g" "i" "t" space "c" "h" "e" "c" "k" "o" "u" "t" space "r" "e" "l" "e" "n" "g" slash "1" "5" period "1"
 
Back
Top