Solved How to migrate to amber branch for mesa

I recently updated pkg on Freebsd 12.4 and the i915 driver seems to be missing from mesa loader message. I looked at some documentation that says version after Mesa 21.3 has removed the driver and need to migrate to the amber branch: https://docs.mesa3d.org/amber.html

I dont seem to find any documentation on how to do that and on the bug reporting site shows a link to using meson: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269006

I'll do more digging to see if I can figure this one out but if anyone have done this before please share your knowledge.

Thanks.
 
I followed another thread for this guide on compiling the mesa-dri port with makefile modification needed to add the i915 to the gallium driver option (there are other variables such as problem srwast vulkan, pkg-plist install paths) and fetch the driver file from the stage working directory to be moved to the local dri folder. Once the driver has been moved then need to disable the original driver.

The method above is a quick way since most likely you need to build from meson for the amber flag and use this logic to work with recent mesa releases I'll post another update if i manage to build mesa with meson.
 
The amber branch has been installed on my laptop and able to install the dri drivers, i removed the mesa-dri package test it's working fine.
 
The amber branch has been installed on my laptop and able to install the dri drivers, i removed the mesa-dri package test it's working fine.
Could you please share the steps you followed to install the amber branch? I have a ThinkPad X60 which is also affected by the removal of i915 support in the latest mesa-dri.
 
You'll need to first install meson and ninja to perform this build: you'll use meson to configure options for the build and ninja to install it. The amber branch file can be found here, you'll need to download it: https://gitlab.freedesktop.org/mesa/mesa/-/tree/amber/. The folder you put into will be the source directory, create another folder that's not in the same directory, that will be your build directory.

The meson.build file contains the drivers it'll be installing during the setup so you can reference this file in case it has issues finding a driver during the setup which you can comment out to skipping install them.

You can cd into the source directory to run the command:

meson setup *path to build directory*

This will read the meson.build file and run those the list of drivers to be build for the setup. If there are errors most likely it's missing certain drivers not found in your current system. For example, it posted an error with the nouveau driver since it's not available with mesa-dri, I comment it out from the file to skip checking it.

Once it completes, you'll want to run the command:

meson *path to build directory* -Damber=true

You can see all the options by running meson configure but that's the logic that need to be enabled from their writing.

Next you'll need to performing the compiling process:

ninja -C *path to build directory*
ninja -C *path to build directory* install

During the completion of the step, the drivers will be located at /usr/local/lib/dri.

There is another post that was referenced earlier: https://forums.freebsd.org/threads/mesa-missing-i915-driver.88338/#post-616388 that compile the mesa-dri port which can create the driver, this step involves disabling all other drivers since it'll look at the staging folder (this behavior is setup by pkg-plist file), OP also upload the i915 driver that you can move to the dri folder.
 
Thanks!!!

I am on the same boat!! I am fairly new to BSD but a bit experienced in Linux, so I think I can follow the instructions/steps, I will try.

Thanks!!!

M
 
Thanks!!!

I am on the same boat!! I am fairly new to BSD but a bit experienced in Linux, so I think I can follow the instructions/steps, I will try.

Thanks!!!

M
Great, a good place to start is using the handbook at the freebsd website. The documentation will most likely let you understand some of the basics.
 
Thanks I am reading some guides. I have the following ideas

A Try to downgrade the mesa-dri with pkg

B Try to use ports

C Manually compile the amber branc and make a pkg. Remove mesa-dri pkg. Install the new package

A should be easy but how to mark the mesa-dri to not update upgrade in future?

B should take care of the above cons but I never used ports. But I am used to void linux pkg-src that should be similar.

C meh not convinced.

Any thoughts?
 
A Try to downgrade the mesa-dri with pkg
I don't think you can directly downgrade pkg, it looks at the repo to find what version is there if you haven't backed up then only the new files will be available. In order to install a custom version you need to find the source code with the make file to use that version but that's what the amber branch does.

B Try to use ports
You can use this method suggested from the forum post referenced earlier, you just need to know on what to add and know the compiling process. The original OP provided the driver you can test on your system if it doesn't work then I would suggest compiling the port yourself to create the driver.

C Manually compile the amber branc and make a pkg. Remove mesa-dri pkg. Install the new package
The amber branch installs the version that contains the driver you'll need which the current mesa-dri doesn't provide and it's also being maintained somewhat by their team so most likely if there's a updated version you would need to compile it again to install the driver.
 
Back
Top