Solved Intel i3-2120 Integrated Graphics with drm-kmod is working only in software rendering mode (llvmpipe)?

This is my /etc/rc.conf :
Code:
% cat /etc/rc.conf   
clear_tmp_enable="YES"
sendmail_enable="NONE"
hostname="abrhm.bsd.cpu"
keymap="us.kbd"
ifconfig_em0="DHCP"
moused_enable="YES"
ntpdate_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
###############################################################
dbus_enable="YES"
#hald_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
firewall_enable="YES"
firewall_quiet="YES"
firewall_type="workstation"
firewall_logdeny="YES"
firewall_myservices="80/tcp 443/tcp"

microcode_update_enable="YES"
 
Ok, so it is the old driver from base that is loaded. Try not enabling gdm nor gnome, login with the console and then kldstat -v | grep i915kms .
Do you have files in /etc/rc.conf.d/, or maybe there exist the following file /boot/loader.conf.local ? If so put here the content.
 
Ok, so it is the old driver from base that is loaded. Try not enabling gdm nor gnome, login with the console and then kldstat -v | grep i915kms .
Do you have files in /etc/rc.conf.d/, or maybe there exist the following file /boot/loader.conf.local ? If so put here the content.
No i915kms module loaded when gdm & gnome disabled at /etc/rc.conf. This is a fresh install, there is no custom files except xorg horizontal & vertical freq for monitor (LG 22MK430H).
Code:
 %cat /usr/local/etc/X11/xorg.conf.d/monitor-freq.conf
Section "Monitor"
    Identifier   "Monitor0"
    HorizSync    30.0-85.0   # kHz
    VertRefresh  56.0-75.0   # Hz
EndSection
 
Ok so gnome or gdm somewhat try to loading i915kms, try setting in /etc/rc.conf
Code:
kld_list="/boot/modules/i915kms.ko"

And in your home directory edit the following file: .xinitrc (you may need to mark it as executable, I am not sure if it is mandatory)
Code:
#!/bin/sh
exec ck-launch-session dbus-launch --auto-syntax --exit-with-session gnome-session

Check before that you have consolkit with which ck-launch-session (if you don't have just remove it from the exec line)

Then reboot and login in the console.
Check that the correct i915kms.ko is loaded with kldstat -v | grep i915kms, and then run startx
If you get a gnome desktop with 3D acceleration, then you can try to re enable gdm and gnome and see if you still get 3D acceleration or not
 
Ok so gnome or gdm somewhat try to loading i915kms, try setting in /etc/rc.conf
Code:
kld_list="/boot/modules/i915kms.ko"

And in your home directory edit the following file: .xinitrc (you may need to mark it as executable, I am not sure if it is mandatory)
Code:
#!/bin/sh
exec ck-launch-session dbus-launch --auto-syntax --exit-with-session gnome-session

Check before that you have consolkit with which ck-launch-session (if you don't have just remove it from the exec line)

Then reboot and login in the console.
Check that the correct i915kms.ko is loaded with kldstat -v | grep i915kms, and then run startx
If you get a gnome desktop with 3D acceleration, then you can try to re enable gdm and gnome and see if you still get 3D acceleration or not
I tried this. But, no display. The modules getting loaded are drm.ko and not drm2.ko. The line kld_list="/boot/modules/i915kms.ko" ends up loading drm.ko and no display.
As of now, Gnome works only in software rendering mode. I thought, since this is a decade old integrated graphics, this would be better supported.

Code:
%  glxinfo |grep llvm
    Device: llvmpipe (LLVM 8.0, 256 bits) (0xffffffff)
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
^ This is what is running. I hope to get 3D support working. I am confused what to do now?

I am ready to work to get things working. However, I have no clue on the driver modules and how they're loading. For this processor - i3-2120, which are the driver modules that are to be loaded? I am currently in Gnome session, and kldstat <snipped> says these modules are loaded:
Code:
10    1 0xffffffff82b17000    7e070 i915kms.ko (/boot/kernel/i915kms.ko)
    Contains modules:
         Id Name
        520 vgapci/i915kms
        522 intel_gmbus/iicbus
        524 intel_iicbb/iicbb_nostop
        525 drmn/intel_sdvo_ddc_proxy
        523 drmn/intel_iicbb
        521 drmn/intel_gmbus
11    1 0xffffffff82b96000    44448 drm2.ko (/boot/kernel/drm2.ko)
    Contains modules:
         Id Name
        516 drmn/drm_iic_dp_aux
        517 drmn

dmesg showing the error messages and gnome-keyring (2nd attempt login) related warnings:
Code:
fbd0 on drmn0
VT: Replacing driver "efifb" with new "fb".
drmn0: No ACPI video bus found
info: [drm] Initialized i915 1.6.0 20080730 for drmn0 on minor 0
info: [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
pid 8493 (tracker-miner-fs), jid 0, uid 1001: exited on signal 11
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:i915_reset] *ERROR* GPU hanging too fast, declaring wedged!
error: [drm:pid0:i915_reset] *ERROR* Failed to reset chip.
pid 78218 (gnome-keyring-daemo), jid 0, uid 1001: exited on signal 11
pid 71388 (tracker-miner-fs), jid 0, uid 1001: exited on signal 11
 

Attachments

  • glxinfo-new.txt
    81.3 KB · Views: 122
  • dmesg-new1.txt
    12.8 KB · Views: 125
I tried this. But, no display.

It's pretty clear you are deliberately messing with us by dodging the drm-kmod question and substituting "3d acceleration in gnome with a legacy driver" instead. Don't do this. The legacy drivers will be removed in less than a year. It's a waste of everyone's time trying to get them to work.
 
Let's set some expectations:
Code:
% pkg info -l drm-fbsd12.0-kmod-4.16.g20200221
drm-fbsd12.0-kmod-4.16.g20200221:
    /boot/modules/amdgpu.ko
    /boot/modules/amdkfd.ko
    /boot/modules/debugfs.ko
    /boot/modules/drm.ko
    /boot/modules/i915kms.ko
    /boot/modules/linuxkpi_gplv2.ko
    /boot/modules/radeonkms.ko
    /boot/modules/ttm.ko
    /boot/modules/vmwgfx.ko
    /usr/local/share/licenses/drm-fbsd12.0-kmod-4.16.g20200221/BSD2CLAUSE
    /usr/local/share/licenses/drm-fbsd12.0-kmod-4.16.g20200221/GPLv2
    /usr/local/share/licenses/drm-fbsd12.0-kmod-4.16.g20200221/LICENSE
    /usr/local/share/licenses/drm-fbsd12.0-kmod-4.16.g20200221/MIT
    /usr/local/share/licenses/drm-fbsd12.0-kmod-4.16.g20200221/catalog.mk
% sha256 /boot/modules/i915kms.ko
SHA256 (/boot/modules/i915kms.ko) = 7e7fd61eab6aaa85eaf7f6fcd979d61f96b45358421a21d2b4b765d2cc2dc543
% sha256 /boot/modules/drm.ko
SHA256 (/boot/modules/drm.ko) = e660c80edb08c9b644be3690b2759fdee86e14d205927fa6343224c866f1cc13
 
It's pretty clear you are deliberately messing with us by dodging the drm-kmod question and substituting "3d acceleration in gnome with a legacy driver" instead. Don't do this. The legacy drivers will be removed in less than a year. It's a waste of everyone's time trying to get them to work.
I am using drm-kmod and you may be confusing with my early posts where I had used drm-legacy-kmod. I did not say about drm-legacy-kmod after that. check . Perhaps, I should update the question to remove mentioning legacy kmod to get some attention? (I'm editing the title)
 
You realize the driver has a version string that it prints, do you?

This is what I have in the system:
Code:
% pkg info|grep drm
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS components
drm_info-2.2.0_1               Small utility to dump info about DRM devices
libdrm-2.4.102,1               Userspace interface to kernel Direct Rendering Module services

sha256sums are the same as above.
it's not enabling 3D driver.
 
What does strings /boot/modules/i915kms.ko | grep kmod | head print?
Code:
% strings /boot/modules/i915kms.ko | grep kmod | head
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_lrc.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_fbdev.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/linuxkpi/gplv2/include/linux/dma-fence.h
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_fbc.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_guc.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_lvds.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/i915_drv.h
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/i915_irq.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_audio.c
/wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/i915/intel_panel.c
 
Do you have anything i915-related in /boot/loader.conf?
No.
Code:
% cat /boot/loader.conf
autoboot_delay="0"
fuse_load="YES"
kern.vty=vt
coretemp_load="YES"
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"
 
I have no such line loading i915kms.ko in /etc/rc.conf. If I add the line, no display.

Right. That's what I'm talking about:
It's pretty clear you are deliberately messing with us by dodging the drm-kmod question and substituting "3d acceleration in gnome with a legacy driver" instead. Don't do this. The legacy drivers will be removed in less than a year. It's a waste of everyone's time trying to get them to work.
 
@shkhln : I'm not sure how to get the display working. The kernel driver is getting loaded, I undertands that. But, with the kld_list="/boot/modules/i915kms.ko" , X is not working.
 
I've yet to see the /var/log/Xorg.0.log for the kld_list="/boot/modules/i915kms.ko" case.
I rebooted with kld_list="/boot/modules/i915kms.ko" and as expected, no display. I tried startx and the log is attached.
Should I trry with xf86-video-intel removed?
 

Attachments

  • Xorg.0.log1.txt
    5.4 KB · Views: 123
Code:
[   171.145] (EE) open /dev/dri/card0: No such file or directory

means the kernel driver is not loaded or is improperly initialized. (Or doesn't see the hardware, although I don't think anything was deliberately disabled.)
 
Perhaps it needs a rebuild from source? It would be easier to switch to FreeBSD release, STABLE isn't really helping this situation.
 
I think you can carefully unpack release tarballs over your installation, but that's not really a foolproof or noob-friendly procedure.
Thank you for helping figuring out, what went wrong.
I will go for a re-install. Perhaps, will choose KDE next time. Gnome seems too much work.
Any DE recommendation by members are welcome.
 
Back
Top