When i915kms.ko is loaded, no matter whether it is the one from the base system (/boot/kernel/i915kms.ko) or from the drm-legacy-kmod (version g20190109) port (/boot/modules/i915kms.ko), the system consoles can no more be seen. Apart from the display problem, the consoles remain functional. Text input is still possible.
The error may be caused by either i915kms.ko or /boot/kernel/drm2.ko, which seems to be loaded automatically with i915kms.ko.
When i915kms.ko is loaded manually from the console, the screen gets black. When it is loaded automatically on xinit, the console is hidden anyway. Switching to the console with ctrl-alt-F1/F2... leads to a distorted screen. Switching back to X works properly. When X terminates, the screen gets black.
GPU is Intel Haswell 4600 (part of Intel Core i7-4790S CPU).
See my comments in #217689 for further details. As opposed to the classification of that previous bug, the issue is not X11 related, as it can be observed without X11 as well.
When in doubt try,
# pkg delete drm-kmod-legacy
# pkg delete xf86-video-intel
# pkg install drm-kmod
Move away stuff that could cause issues
# mv /boot/kernel/drm.ko /root/
# mv /boot/kernel/drm2.ko /root/
# mv /boot/kernel/i915kms.ko /root/
# mv /etc/X11/xorg.conf /root/xorg.conf
# mv /etc/X11/xorg.d /root/
Clear any module loading and sysctl entries for graphics drivers from /boot/loader.conf and /etc/rc.conf.
Disconnect external/multiple displays
# kldload i915kms
# kldstat -v (confirm that drm.ko and i915kms.ko are loaded from /boot/modules)
Haswell is definitely supported by the new drivers and a default, empty configuration should be sufficient to have functional X and VTs. In most cases, the error is due to conflicts with existing older drm drivers, intel ddx or misconfiguration.
If this still doesn't work we need to troubleshoot further. Maybe some quirks with that specific GPU?
Just upgraded the kernel, the base system and all the ports and reconfigured a few things. Many problems are gone now, except this.
I do have the drm-kmod (drm-kmod-g20190710) port installed now and loaded and no drm-kmod-legacy (never had that in use except for testing). I had to remove "#device drm" from the kernel config because it was obsolated.
I can't delete the xf86-video-intel port because that's the one driver that supports my onboard graphics chip, and the vesa driver wouldn't support the 1920 x 1200 resolution of my monitor.
There is no /etc/X11/xorg.d, and removing /etc/X11/xorg.conf doesn't seem to help. Switching to the console still causes the screen to either turn white or black.
My kernel modules are loaded from /boot/kernel/, not /boot/modules/. What's the difference? The modules in both directories have the same names, but the modules in /boot/modules are significantly bigger.
Is this still a problem, even when not using drm-legacy?
Kernel modules installed in /boot/modules are from ports, modules in /boot/kernel are from base.
(In reply to Niclas Zeising from comment #3)
For me it is, but I haven't reinstalled any of these since. Did you commit a fix that is worth testing?
Why are drm.ko and i915kms.ko in the ports when they are already in the base system?
Which of those are better - the files from the ports, or the files from the base system?
Still wondering why the files from the ports are so much bigger (even when compiled with the same optimization options).
(In reply to Friedrich Volkmann from comment #4)
drm-legacy, which is the base version (and also in ports for now, since the base version has been removed in FreeBSD 13) is quite old, and lacks support for newer GPUs. It completely lacks support for amdgpu based graphics cards, and support for intel GPUs end around the Haswell generation. This driver is not updated, and barely maintained (only bugfixes and so on)
The new drm-kmod (drm-fbsd11.2-kmod, drm-fbsd12.0-kmod, drm-current-kmod) are based on the Linux GPU drivers, and are using the linux KPI translation layer in FreeBSD. This makes them much easier to keep up to date. A lot has happened, and these drivers are much more up to date, and actively maintained, so I suggest you update to try them.
On 12.1-p10 drm-kmod works fine for me on my ThinkPad T430, with ivy bridge graphics, but I saw the behaviour described in this bug on 12.2-RELEASE