After upgrading form 14.1 to 14.2, when loading i915kms (from rc.conf or after removing form rc.conf through kldload) turns the screen black. I also tried to reinstall all packages with pkg-static upgrade -f (same result) Hardware: - Lenovo X1 carbon gen 8
Have you built the package yourself using a 14.2 kernel? My understanding is that the official package repos are still currently building with 14.1, and will for another... 3 months? So right now when kmods fail to load on 14.2, you probably have to build them yourself.
Yeah if you look at https://pkg-status.freebsd.org/ you can see that the 14 packages are still being build with 141 jails.
Thanks for getting back. After some digging I had the same suspicion and tried to rebuild the drm-kmod from ports. However this didn't seem to fix it (maybe I am doing something wrong - using mainly binary pkgs). Here is what I did: 1) pkg delete drm-kmod 2) git clone ports to /usr/ports (cmd: git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports) 3) cd /usr/ports/graphics/drm-kmod 4) make install clean 5) reboot I then tried after reboot to load the driver with: # kldload i915kms Still black screen after loading into the kernel. Not sure what I am missing.
The drm-kmod port is only a metaport. The code lives in other ports that get pulled in as a dependency. Make sure you uninstall those before you start building the port. A "pkg autoremove" after "pkg delete drm-kmod" might be enough. Then try again to build "drm-kmod". If this doesn't help, you can try the other variants. For me the one that was installed changed from 14.1 to 14.2. I think the old one was drm-515-kmod so I would try that one first.
(In reply to Daniel Tameling from comment #4) Unfortunately I already rolled back the update before I saw your comment (seemed to have worked well as I am now back on 14.1). However I would like to upgrade again and try what you suggested. Do you know if I can just upgrade again from the rollback 14.1 version with: # freebsd-update -r 14.2-RELEASE upgrade Is there anything else I should remove / delete first to have a clean environment before attempting to upgrade again (e.g. remove 14.2 boot environment create for the previous upgrade attempt; any other files which should be removed)? Thanks for your help.
If you still have the boot environments from the previous attempts, I would use them to figure out how to fix the issue and leave the main environment untouched. That way what you do can be easily reverted. You can select the enviroment in the boot loader or you use "bectl activate -t ENVIRONMENT". The -t means that it will be active only for the next boot, so if you reboot your healthy system should come back up.
Forgot to mention: I think the environments created are not the final 14.2. So you might have to execute the final freebsd-update commands.
Just switched to the 14.2 be as you suggested (you were right I needed to execute freebsd-update again - as the environment was not complete). Also checked with uname that I was indeed in the 14.2. be. Then I did the following: # pkg delete drm-kmod # pkg autoremove After that I switched to compiled the drm-kmod port as follows: # cd /usr/ports/graphics/drm-kmod # make This ended with error messages asking me to run make with MAKE_JOBS_UNSAFE=yes, which I did as follows: # make clean # make MAKE_JOBS_UNSAFE=yes Same thing still get errors - make output: ====================================================================================== ===> License NA accepted by the user ===> drm-kmod-20220907_3 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by drm-kmod-20220907_3 for building ===> Extracting for drm-kmod-20220907_3 ===> Patching for drm-kmod-20220907_3 ===> Configuring for drm-kmod-20220907_3 ===> Staging for drm-kmod-20220907_3 ===> drm-kmod-20220907_3 depends on package: gpu-firmware-kmod>=20220511 - not found ===> License NA accepted by the user ===> gpu-firmware-kmod-20241114,1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by gpu-firmware-kmod-20241114,1 for building ===> Extracting for gpu-firmware-kmod-20241114,1 ===> Patching for gpu-firmware-kmod-20241114,1 ===> Configuring for gpu-firmware-kmod-20241114,1 ===> Staging for gpu-firmware-kmod-20241114,1 ===> gpu-firmware-kmod-20241114,1 depends on package: gpu-firmware-radeon-kmod-aruba>0 - not found ===> License RADEON accepted by the user ===> gpu-firmware-radeon-kmod-aruba-20220511 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by gpu-firmware-radeon-kmod-aruba-20220511 for building ===> Extracting for gpu-firmware-radeon-kmod-aruba-20220511 => SHA256 Checksum OK for freebsd-drm-kmod-firmware-20220511_GH0.tar.gz. ===> Patching for gpu-firmware-radeon-kmod-aruba-20220511 ===> Configuring for gpu-firmware-radeon-kmod-aruba-20220511 ===> Building for gpu-firmware-radeon-kmod-aruba-20220511 make: stopped in /usr/ports/graphics/gpu-firmware-radeon-kmod/work-aruba/drm-kmod-firmware-20220511 *** Error code 1 Stop. make[2]: stopped in /usr/ports/graphics/gpu-firmware-radeon-kmod *** Error code 1 Stop. make[1]: stopped in /usr/ports/graphics/gpu-firmware-kmod *** Error code 1 Stop. make: stopped in /usr/ports/graphics/drm-kmod ==================================================================================== Went back to the 14.2 errata and under open issues it says: "drm-kmod packages compiled on FreeBSD 14.1 result in the text console being inoperative when the kernel module is loaded. Recompiling the package from the ports tree will restore the lost functionality. This issue will also resolve itself after the FreeBSD 14.1 EoL, when packages for 14-STABLE will start being built on FreeBSD 14.2-RELEASE." So compiling the package should work. Anyway, I tried your second suggestion (i.e. to install drm-515-kmod) and with that pkg installed I then could kldload i915kms and start X11 successfully under 14.2. Do you want me to test anything else?
FYI: After rebooting I was back in the 14.1 environment (-t switch from bectl) which then came up with kernel page errors and auto rebooted. I then switched to single user (which gave me a shell) and activated the 14.2 environment again with bectl as before and booted into the 14.2 environment. Removed the drm-kmod package which I installed previously (i.e. drm-515-kmod) and booted back into the 14.1 environment through a reboot which then started again normally. Reinstalled drm-kmod in 14.1, kldload i915kms and 14.1 is working again (i.e can start x11 fine).
It depends on how motivated you are. Since you have a working workaround, you can just wait until 14.1 hits EOL and once the pkg packages get updated to 14.2 you try drm 6.1 again and file a new bug if you hit any issues again. Or you try to figure out why building the port failed and try to get a successful build. There should be some log files that tell you what failed. If you need a successful build as comparison, you can use the logs from the pkg builds. This is a recent one: https://pkg-status.freebsd.org/beefy22/build.html?mastername=141amd64-default&build=35e33b5b9186 You can use the search function to find the port. For instance the log for your failed port is this: https://pkg-status.freebsd.org/beefy22/data/141amd64-default/35e33b5b9186/logs/gpu-firmware-radeon-kmod-aruba-20220511.log
I just ran into this issue upgrading from 14.1 to 14.2 and was in for a surprise. It felt like the machine had hung on boot, even though now I realize that it was just a frozen text console. To solve this problem I tried to uninstall the packages and reinstall from ports, however I'm still getting this issue with the text console hanging. I ran: # pkg delete drm-kmod # pkg autoremove Then verified that the gpu-firmware* and drm-*-kmod packages were gone. I then reinstalled just drm-61-kmod and gpu-firmware-intel-kmod-kabylake by compiling from ports: # cd /usr/ports/graphics/drm-61-kmod && make install # cd /usr/ports/graphics/gpu-firmware-intel-kmod && make FLAVOR=kabylake install I rebooted but still run into the text console frozen issue. I can of course still bindly log in and startx. Is there another port that I forgot to rebuild?
(In reply to Daniel Tameling from comment #10) I think I read somewhere that kernel modules need the kernel source for it to compile (don’t have them installed as I didn’t need them until upgrading to 14.2). Could that be the reason why I get the build errors when compiling drm-kmod?
Yes, you need them under /usr/src and you need the right version. (As far as I know, /usr/src is not part of boot environments. So if you had content there and did a rollback that should be 14.1 and not 14.2.) You can find instructions for getting /usr/src here: https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-src-obtaining-src If you don't want to keep these files around and delete them after building the port, you can also do a shallow clone by adding --depth=1: git clone --depth=1 --branch releng/14.2 https://git.FreeBSD.org/src.git /usr/src
(In reply to Kevin Zheng from comment #11) There is no other port. You should probably open a new bug and might check dmesg -a or /var/log/messages in xterm for any error messages.
(In reply to Daniel Tameling from comment #14) From this discussion, I found that I had old (14.1) sources checked out from Git at /usr/src. Apparently drm-kmod port generates the warning from the running version of FreeBSD and not the version of sources at /usr/src. Now my console is working fine after loading i915kms. Thanks all!
(In reply to Daniel Tameling from comment #13) Just cloned the /usr/scr as you described, compiled, loaded i915kms and all good under 14.2. Thanks.
Just one final question. How do I now properly upgrade again from 14.1. to 14.2? i.e. Can I just delete the boot environments starting with 14.2-RELEASE..... and do a fresh upgrade as per release instructions? Or is there anything else I should / need to do? Thanks.
That's one way to do it. You could also keep using the 14.2 boot environment, delete the others (and do a bectl rename if you want to keep the name "default").
(In reply to Daniel Tameling from comment #18) Thank you Daniel for all your help highly appreciated.
I thought to summaries what I would have done if I had fully understood the bullet point under open issues from the 14.2. errata (https://www.freebsd.org/releases/14.2R/errata/) i.e.: - drm-kmod packages compiled on FreeBSD 14.1 result in the text console being inoperative when the kernel module is loaded. Recompiling the package from the ports tree will restore the lost functionality. This issue will also resolve itself after the FreeBSD 14.1 EoL, when packages for 14-STABLE will start being built on FreeBSD 14.2-RELEASE. pre-upgrade steps for people using binary packages like me: 1) if you are using /etc/rc.conf to load i915km - comment it out i.e.: #kld_list="i915kms ..." upgrade as per the 14.2. release instructions: https://www.freebsd.org/releases/14.2R/installation/#upgrade-binary post-upgrade tasks: 1) Make sure you have the 14.2 source code and the latest ports code downloaded (required to recompile drm-kmod). P.S. If you already have files in this folders and are not sure you have the right version, I would just delete them all. cmd for source code: git clone --depth=1 --branch releng/14.2 https://git.FreeBSD.org/src.git /usr/src cmd for ports code: git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports 2) Un-installed drm-kmod package and all dependencies: cmd: pkg delete drm-kmod cmd: pkg autoremove 3) Compile drm-kmod: cmd: cd /usr/ports/graphics/drm-kmod cmd: make install clean 4) Test if the new version is working cmd: kldload i915kms 5) if all is working, un-comment line in /etc/rc.conf again i.e. kld_list="i915kms ..." 6) Reboot your system Alternatively you can just wait until eol of 14.1. which will be end of March 2025 approx. as mentioned in the errata above. Hope this helpful. P.S. If I missed anything please feel free to correct me.