Is accelerated graphics possible with i915kms on FreeBSD 13 and 14 [32-bit]?

I used the installation a bit. Will have to backup and reinstall FreeBSD 14 amd64. It may take some time. Will report if I get any success. But I really want to run 32-bit version for my other machine which is an Intel Atom machine.

What is the spec of the Intel Atom machine? Is it 64-bit?
 

"Intel Atom is a line of IA-32 and x86-64 instruction set ultra-low-voltage processors."

So some atom cpu's are 32-bit and some of the later ones are 64-bit, and you need to check which one you have. If it's an older netbook that you have lying around it might be 32-bit. But you need to run something like "cpuid" to find out what your cpu is on that machine, or look in the bios, that might tell you what the processor is. If you have a 64-bit atom, there is no advantage to running the 32-bit freebsd on it. The 32-bit code is not somehow faster or smaller than the 64-bit version. So just find out what your atom cpu is, and choose the right install image (32 or 64 bit) to match it.

And on your continued errors trying to run glxinfo on freebsd 32-bit, I think the basic problem is that you are still running on a 32-bit build and the xorg drivers have not loaded correctly. If it was working you would see the same "crocus" output from xdriinfo that you saw when running linux. So you really need to re-install the 64-bit version of freebsd on that 64-bit machine that you have been testing on before you can get any further with this.
 
What is the spec of the Intel Atom machine? Is it 64-bit?

So some atom cpu's are 32-bit and some of the later ones are 64-bit, and you need to check which one you have.

It is Intel Atom N2600 1.6 GHz. It runs 32-bit OSs only even though I found the specs saying it has 64-bit support. I previously tried to boot other 64-bit live images and it failed always. Tried with a Windows 7 setup USB years ago and it didn't show 64 bit install option.

But just to confirm, I tried to boot "FreeBSD-14.0-RELEASE-amd64-memstick.img.xz" on the Intel Atom machine with no success. When I press enter from boot menu, it says after a while "CPU doesn't support long mode".

Then I tried "FreeBSD-14.0-RELEASE-i386-memstick.img.xz". It booted to the install screen without issues.

Interestingly, outputs from commands on the existing Linux installation say otherwise:

Code:
$ grep flags /proc/cpuinfo | grep " lm "
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
$ sudo dmidecode -t processor
# dmidecode 3.4
...
    Version: Intel(R) Atom(TM) CPU N2600   @ 1.60GHz
    Voltage: 1.6 V
    External Clock: 400 MHz
    Max Speed: 1600 MHz
    Current Speed: 1600 MHz
...
    Core Count: 2
    Core Enabled: 2
    Thread Count: 4
    Characteristics:
        64-bit capable

$ sudo lshw -C processor | grep width
       width: 64 bits      
          width: 64 bits
          width: 64 bits
          width: 64 bits
          width: 64 bits
$ lscpu
Architecture:           i686
  CPU op-mode(s):       32-bit, 64-bit
...
Vulnerabilities:        
  Gather data sampling: Not affected
  Itlb multihit:        Not affected
  L1tf:                 Not affected
  Mds:                  Not affected
  Meltdown:             Not affected
  Mmio stale data:      Not affected
  Retbleed:             Not affected
  Spec rstack overflow: Not affected
  Spec store bypass:    Not affected
  Spectre v1:           Not affected
  Spectre v2:           Not affected
  Srbds:                Not affected
  Tsx async abort:      Not affected

Not sure why that is. Maybe the vendor did something to limit it to only 32-bit.

btw I just noticed those "Not affected" lines. It sure feels good not having to worry about those vulnerabilities. A plus to have Atom cpu I guess.

And on your continued errors trying to run glxinfo on freebsd 32-bit, I think the basic problem is that you are still running on a 32-bit build and the xorg drivers have not loaded correctly.

Why is it not loading on 32-bit? Is it not supported?
 
According to Intel, your cpu has a 64-bit instruction set, so it's a 64-bit processor.


I wonder if the failure to boot from the 64-bit freebsd iso is a bios problem. What machine is it? Is it a netbook or SFF pc?

What version of linux are you running on it? What does "uname -a" say on linux? Cat /proc/cmdlilne?
 
But just to confirm, I tried to boot "FreeBSD-14.0-RELEASE-amd64-memstick.img.xz" on the Intel Atom machine with no success. When I press enter from boot menu, it says after a while "CPU doesn't support long mode".
So it does boot? If it wasn't able to boot you wouldn't get to see the boot menu. When exactly are you getting this error? I'm not too fond of pictures but in this case it would probably help identify the issue.
 
32-bit is Tier 2 and receives very limited support. As some others I would really recommend to use the 64-bit version of FreeBSD.
I understand. But Tier 2 doesn't mean it is ok to crash whenever it likes. This is abnormal for a mainstream BSD system to fail like this. This is a failure for a project. And this is old hardware. A ThinkPad, which is said to be most compatible with non-Windows systems. I haven't even tried it on Atom machine yet. Boy this is just unexpectedly bad.

I wonder if the failure to boot from the 64-bit freebsd iso is a bios problem. What machine is it? Is it a netbook or SFF pc?
It came with Windows 7 originally, which was 32-bit. Checked the BIOS settings, there isn't any settings related to 64-bit support or even No Execute / NX. It is a HP Mini 110-4100 machine with 2g of RAM. it could be that HP disabled 64-bit support.

What version of linux are you running on it? What does "uname -a" say on linux?
Devuan daedalus (stable) i686

Code:
$ uname -mrs
Linux 6.1.0-17-686 i686
$ cat /etc/os-release 
PRETTY_NAME="Devuan GNU/Linux 5 (daedalus)"
NAME="Devuan GNU/Linux"
VERSION_ID="5"
VERSION="5 (daedalus)"
VERSION_CODENAME="daedalus"
...
 
So it does boot? If it wasn't able to boot you wouldn't get to see the boot menu. When exactly are you getting this error? I'm not too fond of pictures but in this case it would probably help identify the issue.
It just shows the FreeBSD bootloader menu. When I press enter it tries to load the kernel and it fails with that message. I'll have to write the 64-bit image again to USB. Will run it and report on what it shows on screen (probably some time later).
 
Just make sure details line up: mobo manufacturer, chipset, hardware revision number, making sure the BIOS image is the correct one for your mobo/chipset, and flashing procedure. That is usually included in the manual for the mobo.

But do read the caveats on the HP forums... do they make sense?

FreeBSD should have no problem running a 64-bit OS on hardware that only has 2GB of RAM, though.

So, first do the BIOS flash, then OS install, in that order.
 
I think Charlie has found your problem, at least on the HP netbook. Personally I would give up on that machine at this point, unless you want to risk bricking it by flashing the bios. Use it for something else. There comes a point where it's cheaper / less effort to get different hardware.

OK, so going back to your thinkpad X201i; I have an X201i (along with a couple of X201's) here, and I can definitely install 64-bit freebsd 14.0 on it. I think that is the thing to try next, I am struggling to understand why you are unable to install 64-bit freebsd 14 on your thinkpad X201i. What happens if you try to do that?
 
So, first do the BIOS flash, then OS install, in that order.
What should I flash? I checked the links shared, searched around and found no HP Mini user saying that they have successfully enabled 64-bit support. Did you find anything?
I think Charlie has found your problem, at least on the HP netbook. Personally I would give up on that machine at this point
What if Void Linux i686 runs fine on that Atom machine too? Should I give up on that machine still?

People have suggested to give up on ThinkPad x201i machine too on this forum, in which acceleration works with Void Linux i686 with fullscreen videos working without being slowing down. Even on FreeBSD, it can play videos (unresized) when I install mesa-classic ports I posted earlier. Don't you think it is unfair to say to give up on the hardware (ThinkPad) without fixing it? The problem is with FreeBSD side, so why not fix it? Me changing hardware will not fix it.
I have an X201i (along with a couple of X201's) here, and I can definitely install 64-bit freebsd 14.0 on it.
Good to hear. Can it play videos on mpv, with fullscreen/resize? Does acceleration work? What's your cpu model?
I think that is the thing to try next
That is next on my list too.
I am struggling to understand why you are unable to install 64-bit freebsd 14 on your thinkpad X201i
No. I did not say there are installation issues on 64-bit. There are other reasons which I said earlier:
I used the installation a bit. Will have to backup and reinstall FreeBSD 14 amd64. It may take some time. Will report if I get any success.
Give me some time and I'll install it. But the point is, even if it works on 64-bit, the problem still remains on 32-bit. 32-bit is still not discontinued (yet) and it crashes, has serious issues on a ThinkPad. On A ThinkPad!
 
I think there's a bit of confusion here. At the risk of repeating myself, for clarity, my advice (FWIW!) at this stage is:-

1. give up on the HP atom netbook, since it only supports 32-bit CPU and has a known BIOS problem; just use that for something else

2. Install 64-bit Freebsd 14.0 on your thinkpad X201i, I have every confidence that that will work, since I have the same machine working here with that same software. This one:- FreeBSD-14.0-RELEASE-amd64-dvd1.iso

For more info see https://www.freebsd.org/releases/14.0R/announce/

Then if you still have some problem running that on the X201i, come back and say here.

PS Your thinkpad X201i is a 64-bit machine, there's no reason to run a 32-bit operating system on it, and I'm not at all surprised that there are driver problems when you try to do so. Just run the 64-bit o/s on it.
 
So it does boot? If it wasn't able to boot you wouldn't get to see the boot menu. When exactly are you getting this error? I'm not too fond of pictures but in this case it would probably help identify the issue.

When I press enter it tries to load the kernel and it fails with that message. I'll have to write the 64-bit image again to USB. Will run it and report on what it shows on screen (probably some time later).

I tried to load amd64 image again on Atom machine.

When FreeBSD bootloader menu appears I press enter to select the first item ("Boot Installer [Enter]")

Then it shows:

Code:
Loading kernel...
/boot/kernel/kernel text=0x... ... ...
Loading configured modules...
cannot load '/boot/entropy'
cannot load '/etc/hostid'

CPU doesn't support long mode

Hit [enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
CPU doesn't support long mode

Type '?' for a list of commands, 'help' for more detailed help.
OK

(I have a faulty screen, so some characters might be slightly off)

I'm not at all surprised that there are driver problems when you try to do so.
My understanding is that if it was not supposed to work then it shouldn't have worked on Void Linux i686.

64-bit hardware should be backwards compatible with 32-bit OS/software as far as I know. Do you know of any reason why this should not be?

I wish I had more in depth understanding of this, but it seems FreeBSD's implementation is faulty. If intel has specifically made it impossible to run it on FreeBSD 32-bit I would understand. But FreeBSD is using Linux drivers (through LinuxKPI):

LinuxKPI is a small compatibility layer that allows Linux drivers to run in a FreeBSD environment with minor modification.... A quick look at the code reveals that the kernel programming interface (KPI) is simply a collection of Linux headers and source files that map Linux-exclusive functions to FreeBSD equivalents.... The drm-kmod package includes Linux drivers for AMD/Intel graphics and is able to compile and run smoothly on FreeBSD using LinuxKPI.

So I don't know why the implementation is that bad that it can't even handle a well-known ThinkPad line machine.
 
64-bit hardware should be backwards compatible with 32-bit OS/software as far as I know.
The CPU, yes. The AMD64/Intel 64 instructions are extensions on the IA-32 instruction set. This type of CPU is therefor still compatible with the original IA-32 instruction set. The Itanium for example has a true IA-64 instruction set, it is NOT compatible with IA-32. The original IA-32 platform is pretty much dead now though. There's even talk of actually removing the old IA-32 instructions from the next generation of CPUs.

Do you know of any reason why this should not be?
It appears HP more or less crippled the hardware. See Charlie_ 's post on it. They probably did this so they can sell you a non-crippled version at a higher price.
 
It appears HP more or less crippled the hardware. See Charlie_ 's post on it.
The quote I commented on was about ThinkPad machine. Here's the full paragraph:

PS Your thinkpad X201i is a 64-bit machine, there's no reason to run a 32-bit operating system on it, and I'm not at all surprised that there are driver problems when you try to do so. Just run the 64-bit o/s on it.
I'm testing FreeBSD 14 i386 on a ThinkPad x201i machine. This machine supports running 64-bit OSs. blackbird9's argument was that why run 32-bit when there is 64-bit support. There is logic behind the reasoning. I'd choose 64-bit OS normally too. I was testing it for using it later with Intel Atom machine. My point is that it is not working as expected. Video is not playing, if I can make it play with older mesa ports it slows down when I resize mpv window. And it crashes under default kernel. These issues are not there on Void Linux i686 Live XFCE image when I ran it on the same ThinkPad. I can play videos, resize mpv and it plays just fine. That's why I blamed FreeBSD implementation of Intel graphics drivers.

Multiple people have suggested to replace both ThinkPad and Intel Atom machine from time to time. But it won't solve the issue.
 
The quote I commented on was about ThinkPad machine. Here's the full paragraph:


I'm testing FreeBSD 14 i386 on a ThinkPad x201i machine. This machine supports running 64-bit OSs. blackbird9's argument was that why run 32-bit when there is 64-bit support. There is logic behind the reasoning. I'd choose 64-bit OS normally too. I was testing it for using it later with Intel Atom machine. My point is that it is not working as expected. Video is not playing, if I can make it play with older mesa ports it slows down when I resize mpv window. And it crashes under default kernel. These issues are not there on Void Linux i686 Live XFCE image when I ran it on the same ThinkPad. I can play videos, resize mpv and it plays just fine. That's why I blamed FreeBSD implementation of Intel graphics drivers.

Multiple people have suggested to replace both ThinkPad and Intel Atom machine from time to time. But it won't solve the issue.
Well, you can complain about what is or you can run the way more stable 64bit version on your Thinkpad.
 
I'm testing FreeBSD 14 i386 on a ThinkPad x201i machine. This machine supports running 64-bit OSs. blackbird9's argument was that why run 32-bit when there is 64-bit support. There is logic behind the reasoning. I'd choose 64-bit OS normally too.

Until you've installed amd64 on the X201i there's no point in further discussion about it.

I was testing it for using it later with Intel Atom machine.

You can't make any conclusion at all about a HP i386 aka i686 laptop from what happens on a Lenovo amd64 laptop. None.

Different CPU generation, BIOS, support hardware, everthing.

Please treat problems with dissimilar machines as distinct issues, to avoid confusion - yours and ours.

My point is that it is not working as expected. Video is not playing, if I can make it play with older mesa ports it slows down when I resize mpv window. And it crashes under default kernel.

Suspect your expectations, and accept that these things are happening with your current, likely incorrect configurations.

These issues are not there on Void Linux i686 Live XFCE image when I ran it on the same ThinkPad. I can play videos, resize mpv and it plays just fine. That's why I blamed FreeBSD implementation of Intel graphics drivers.

Similarly, comparison between different OSes are not useful here. Perhaps your best bet is to use void Linux instead, we don't beg you to use FreeBSD but will help where we can, if you'll try what's suggested.

Multiple people have suggested to replace both ThinkPad and Intel Atom machine from time to time. But it won't solve the issue.

The HP machine with i386 is a different matter, for separate determination. Maybe void Linux would be a superior solution there, and skill with multiple OSes never hurts.

For a Thinkpad known to work with 14.0 amd64, the next step's surely obvious ...
 
Until you've installed amd64 on the X201i there's no point in further discussion about it.
I got you. I previously said I'll install FreeBSD 64-bit and report back.
You can't make any conclusion at all about a HP i386 aka i686 laptop from what happens on a Lenovo amd64 laptop. None.
But I can show errors! I can describe issues.
Suspect your expectations, and accept that these things are happening with your current, likely incorrect configurations.
Then tell me which configurations might be causing this.
Similarly, comparison between different OSes are not useful here. Perhaps your best bet is to use void Linux instead, we don't beg you to use FreeBSD but will help where we can, if you'll try what's suggested.
I had to test Void Linux i686 because people were saying that ThinkPad x201i is old hardware, graphics acceleration will not work, and to replace it. Then it worked ok on Void. I wonder where are they now. Comparison was necessary here. And FreeBSD uses Linux drivers through LinuxKPI, so shouldn't it be relevant?

It seems FreeBSD is at fault here. If Intel drivers has imposed limitations, I'd understand. If you have any reason to believe this please share the information because I couldn't find any limitation imposed by Intel that it can't work on FreeBSD 32 bit.
i686 is a 32-bit platform...
Yes. This ThinkPad x201i can give graphics acceleration on 32-bit Linux system. But not on FreeBSD 32-bit for some reason.
Yeah... that's why you're stuck using 32-bit OSes with it. So, go with FreeBSD i386, which will be compatible.
Maybe I will. But this issue isn't solved on the ThinkPad x201i machine. It seems to be an issue on the FreeBSD side.
 
I tried FreeBSD 14 64-bit on ThinkPad x201i machine and graphics acceleration is working. I didn't even need to install xf86-video-intel. I even uninstalled drm-kmod, drm-515-kmod and installed drm-510-kmod, rebooted. It worked with it too. Fullscreen video doesn't slow down and plays as normal.

Here are some outputs:

Code:
$ uname -a
FreeBSD ... 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
$ xdriinfo
Screen 0: crocus
$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics (ILK) (0x46)
    Version: 23.3.2
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics (ILK)
OpenGL version string: 2.1 Mesa 23.3.2
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 23.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

$ xvinfo
X-Video Extension version 2.2
screen #0
  Adaptor #0: "GLAMOR Textured Video"
    number of ports: 16
    port base: 133
    operations supported: PutImage
    supported visuals:
      depth 24, visualID 0x21
    number of attributes: 5
      "XV_BRIGHTNESS" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_SATURATION" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_HUE" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_COLORSPACE" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
    maximum XvImage size: 8192 x 8192
    Number of image formats: 3
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x3231564e (NV12)
        guid: 4e563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 2
        type: YUV (planar)
$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
304 frames in 5.0 seconds = 60.665 FPS
302 frames in 5.0 seconds = 60.305 FPS
302 frames in 5.0 seconds = 60.305 FPS
...

Full xorg log is attached

So the issues are on 32-bit only
 

Attachments

So there is no graphics acceleration. As far as I remember, on 12.4 on the same machine I used to get "yes". But 12.4 is going EOL soon, so running it is not an option. Is there any way to get accelerated graphics back on 14?
I said the above in the first post. Thankfully I found a FreeBSD 12.4 32-bit install. Graphics acceleration used to work on ThinkPad x201i with FreeBSD 12 32-bit. But it is not on 32-bit 13 and 14.

Here are some outputs from that 12.4 32-bit install on the ThinkPad x201i machine:

Code:
$ uname -a
FreeBSD ... 12.4-RELEASE FreeBSD 12.4-RELEASE r372781 GENERIC  i386
$ xdriinfo 
Screen 0: crocus
$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics (ILK) (0x46)
    Version: 22.3.7
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics (ILK)
OpenGL version string: 2.1 Mesa 22.3.7
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 22.3.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
$ xvinfo 
X-Video Extension version 2.2
screen #0
  Adaptor #0: "GLAMOR Textured Video"
    number of ports: 16
    port base: 133
    operations supported: PutImage 
    supported visuals:
      depth 24, visualID 0x21
    number of attributes: 5
      "XV_BRIGHTNESS" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_CONTRAST" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_SATURATION" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_HUE" (range -1000 to 1000)
              client settable attribute
              client gettable attribute (current value is 0)
      "XV_COLORSPACE" (range 0 to 1)
              client settable attribute
              client gettable attribute (current value is 0)
    maximum XvImage size: 8192 x 8192
    Number of image formats: 3
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x30323449 (I420)
        guid: 49343230-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
      id: 0x3231564e (NV12)
        guid: 4e563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 2
        type: YUV (planar)
 
I had to test Void Linux i686 because people were saying that ThinkPad x201i is old hardware, graphics acceleration will not work, and to replace it. Then it worked ok on Void. I wonder where are they now. Comparison was necessary here. And FreeBSD uses Linux drivers through LinuxKPI, so shouldn't it be relevant?
I'm here.
Hardware Graphics acceleration for decoding and watching video will not work as your video card doesn't have hardware capabilities to decode VC,1VP9,AV1 codecs. It's all done on your CPU which can't keep up with 720p or 1080p.

If you want to see it by yourself install multimedia/vdpauinfo pkg install vdpauinfo and run it. in terminal then post back here the output of "Decoder capabilities:" section for all video codecs.

The only think that you can use on it is OpenGL for GL_Renderer you can check the capabilities via glinfo or glxinfo and drm_info
 
Back
Top