How to update MESA driver?

2,087 views
Skip to first unread message

KUCHID

unread,
Dec 7, 2018, 9:34:55 PM12/7/18
to Android-x86
Hi All,

Is this possible to update MESA driver?
If this possible, can someone give me tutorial how?

Mauro Rossi

unread,
Dec 8, 2018, 5:01:04 AM12/8/18
to Android-x86
Hi,
As a start just change the minimum set of libraries: mesa, libdrm and gralloc for mesa 18.3.0 and later.


The attached script recipe contains the sequence of commands for oreo-x86 for the essential three libraries I mentioned
Until now a patch for SwapBuffersWithDamage was required in frameworks/base, info in the file.

nougat-x86 script not updated, this may be required in art project: http://git.osdn.net/view?p=android-x86/art.git;a=commit;h=edb557db300d6632fa6d62f5695cfa9eca6bcbdf

Avoid the other changes if you are not interested in testing the other features (gbm_gralloc+drm_framebuffer, vulkan, kernel 4.19)
but your R7 Bonaire would be compatible with those changes if you want to try.
Please let me know if the kernel parameters allow to disable R7

For userdebug you'll need the patch to extend build id lenght.
For eng builds the mentioned Settings patch is required.

Mauro

PS: I am going to post an update about mesa status and launch a testing campaign soon, we have a few bugs we want to fix

Recipe_scripts_for_k419_llvm70_drmfb_vulkan_mesa-18.3.0.txt

not actual earth

unread,
Dec 8, 2018, 10:36:20 AM12/8/18
to Android-x86
Can you explain more detail? And about your relase, is possible to use kernel 4.20? I want test it on my device. Because until now, only kernel 4.13 that can boot on my device.

Mauro Rossi

unread,
Dec 8, 2018, 11:12:01 AM12/8/18
to Android-x86
Hi,


On Saturday, December 8, 2018 at 4:36:20 PM UTC+1, not actual earth wrote:
Can you explain more detail? And about your relase, is possible to use kernel 4.20? I want test it on my device. Because until now, only kernel 4.13 that can boot on my device.

Just copy & paste the parts of scripts you want to upgrade

Kernel 4.20 is still in development, kernel 4.18 and kernel 4.19 are working just fine with RX560
Could you please unlock the information on your side and be more clear about your HW?

Mauro

youling 257

unread,
Dec 8, 2018, 12:38:54 PM12/8/18
to Android-x86
any 32bit nougat-x86 build? i want replace some files to 32bit cm14.1.

在 2018年12月8日星期六 UTC+8下午6:01:04,Mauro Rossi写道:

Haukness

unread,
Dec 18, 2018, 9:25:49 AM12/18/18
to Android-x86
Hey there Mauro,

Sorry for the late reply.

I'm a bit confused.  I'm interested in updating the MESA libraries/binaries on my Android x86-64 7.1 R2 (using kernel 4.18) build as well, but should I just be copying and pasting each line of your script/batch into the terminal window and running them with SU, or do I only need to run specific parts of the script if I just want to update MESA and it's support software without changing anything else?

-Haukness

Mauro Rossi

unread,
Dec 18, 2018, 2:58:01 PM12/18/18
to Android-x86
Hi, no su needed,
check the commands, adapt them to your sources directory,

mesa 18.3 has changes requiring drm_gralloc updates, all documented in latest recipes (please read the notes)

libdrm needs to be updated too

nougat-x86 requires a patch, in a frameworks project, also used in anbox,
search one of the last threads with 'nougat-x86'

M.

KUCHID

unread,
Dec 25, 2018, 12:28:27 AM12/25/18
to Android-x86

Mauro Rossi

unread,
Dec 25, 2018, 1:08:04 AM12/25/18
to Android-x86
Hi,
I think the problem is that this commit is needed in nougat-x86 too:


In order to have it, I checked out used oreo-x86 drm_gralloc and applied the necessary commit for mesa-18.3

cd ~/nougat-x86/external/drm_gralloc/
git reset
--hard
git fetch x86 oreo
-x86
git checkout FETCH_HEAD
#THE FOLLOWING ARE REQUIRED to build with mesa 18.3.0-devel and later
git remote add maurossi https
://github.com/maurossi/hardware_drm_gralloc
git fetch maurossi mesa
-18.3
git cherry
-pick bf1265608b4cefa2cb1d7ecd074a0dcc22ea36ff


If you have an non bootable nougat-x86, there is a way to recover it, 
if you installed an official version just do the AutoUpdate
if you installation shows 2018-MM-DD as a trick you may edit


like this, but you need to set the MM and DD according to month and day you have in your installation:

try_upgrade()
{
	[ -d $1 ] && return
	PREV_VERS="$PREV_VERS 2018-MM-DD 7.1-r2 7.1-r1 7.1-rc2 7.1-rc1 6.0-r3 6.0-r2 6.0-r1 6.0-rc2 6.0-rc1 5.1-rc1 4.4-r5 4.4-r4 4.4-r3 4.4-r2 4.4-r1 4.4-RC2 4.4-RC1 4.4-test 4.3-test 4.2-test 4.0-r1 4.0-RC2 4.0-RC1"


Mauro

KUCHID

unread,
Dec 25, 2018, 2:37:12 AM12/25/18
to Android-x86
Hi Mauro,

I have already successfully booted after copying all vendor files, thanks..

zjaro

unread,
Dec 29, 2018, 3:45:32 AM12/29/18
to Android-x86
Hi,

I was trying to update the nougat-x86 graphics stack to the oreo-x86 versions. But every time i try to upgrade it no matter which version of what i am using i get PlayStore setupwizard ANR. The OS works fine but the setupwizard always get an ANR. So i don't think the ANR. I think i am missing something here , Could you help me with it ?
Also you mentioned a patch required in frameworks-base which i have not found anywhere.

Here is my current configuration:

Mesa , libdrm , drm_gralloc repos are on oreo-x86 branch.

LLVM70 is using your oreo-x86_llvm70 branch for it (It compiles perfectly with it).

drm_hwcomposer: I have tried both oreo-x86 and nougat-x86 with (DRM_ROTATE_* defines) patch

framework_native: I have tried both stock nougat-x86 and with (enforce BGRA in HWC1) patch.

kernel: maurossi-kernel-4.19

Regards

Mauro Rossi

unread,
Dec 29, 2018, 5:52:56 AM12/29/18
to Android-x86
Hi,

then please provide info on your hardware, GPU
and /data/log.txt and /data/tombstones/tombstone_0x

Thanks
Mauro

Guneet Atwal

unread,
Dec 29, 2018, 6:25:11 AM12/29/18
to andro...@googlegroups.com
Yes that art patch is already included in the nougat-x86 branch.
I have tried my build on multiple hardwares (i3,i5,celeron, atom , laptops desktops you get the point) of different gens and all using intel driver.
Can you please elaborate more about this patch?
#Following hack is needed for Intel even after fd734608c3 (egl: Fix missing clamping in eglSetDamageRegionKHR)
git apply 0001-HACK-EglMananger-disable-EGL_KHR_partial_update-code.patch
I will give you logs but i think i am missing something here or not patching something which causes this problem.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

Guneet Atwal

unread,
Dec 29, 2018, 6:52:31 AM12/29/18
to andro...@googlegroups.com
I have attached the log.txt but i was not able to get any log in /data/tombstones directory.
log.txt

Christian

unread,
Dec 29, 2018, 8:10:47 AM12/29/18
to Android-x86
I Checked this ISO with Kernel 4.19 on my Thinkpad 8 LTE 

Better 3D Support as Original 8.1 rc2
Videos Playing Smooth (in 8.1 rc2 not)
No Bluetooth (on 8.1 rc2 it turn on but no connection to any Device)
No Sound
Battery & Changing State OK
No Webcams

I am only a user but not a developer.

zjaro

unread,
Jan 2, 2019, 2:30:22 AM1/2/19
to Android-x86
Hi,

Can you please reply to my issue ? I need to upgrade the mesa but i can't seem to find a workaround for the Setupwizard ANR.

Mauro Rossi

unread,
Jan 2, 2019, 6:07:38 AM1/2/19
to Android-x86
Hi,

The only error I see in the graphics stack is the following, along with messages clearly not belonging to android-x86 (Prime OS, RIL messages).

E libEGL  : eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c


In any case you can upgrade mesa using the provided scripts, the frameworks/base  EGL patch is in the attachment
and in oreo-x86 latest mesa branches are 18.3.1_oreo-x86 and 19.0.0-devel_w51

To proceed with analysis, please provide dmesg to see what causing SIG 3 and /data/anr/traces.txt file.

I would also suggest to try with a clean nougat-x86 image

Mauro


On Wednesday, January 2, 2019 at 8:30:22 AM UTC+1, zjaro wrote:
Hi,

Can you please reply to my issue ? I need to upgrade the mesa but i can't seem to find a workaround for the Setupwizard ANR.

On Saturday, December 29, 2018 at 4:22:56 PM UTC+5:30, Mauro Rossi wrote:
Hi,

then please provide info on your hardware, GPU
and /data/log.txt and /data/tombstones/tombstone_0x

Thanks
Mauro


On Saturday, December 29, 2018 at 9:45:32 AM UTC+1, zjaro wrote:
Hi,

I was trying to update the nougat-x86 graphics stack to the oreo-x86 versions. But every time i try to upgrade it no matter which version of what i am using i get PlayStore setupwizard ANR. The OS works fine but the setupwizard always get an ANR. So i don't think the ANR. I think i am missing something here , Could you help me with it ?
Also you mentioned a patch required in frameworks-base which i have not found anywhere.

Here is my current configuration:

Mesa , libdrm , drm_gralloc repos are on oreo-x86 branch.

LLVM70 is using your oreo-x86_llvm70 branch for it (It compiles perfectly with it).

Not needed a
0001-HACK-EglMananger-disable-EGL_KHR_partial_update-code.patch

Cezar

unread,
Feb 21, 2019, 7:49:15 AM2/21/19
to Android-x86
@ Mauro Rossi mind to update the patch for current mesa used on oreo-x86?
The patch fails on git rebase @ git rebase freedesktop/master
I also tried to adapt it fetching 18.3.1_oreo-x86 but no joy...

Mauro Rossi

unread,
Feb 21, 2019, 8:55:21 AM2/21/19
to Android-x86
There is no need to update script,
or you could be kind to update yourself.

In oreo-x86 branch you have mesa 18.3.4, just do a repo sync.

In case you want 19.0.0 or 19.1.0-devel_w0x, please fetch it from github.com/maurossi/mesa

19.0.0 and 19.1.0 are building fine
You're welcome

Mauro

Cezar

unread,
Feb 21, 2019, 10:37:47 AM2/21/19
to Android-x86
oreo_x86 is slow and have some nasty bug on wireless card(broadcom) so I am forced for now to stay on nougat and update the mesa and kernel(another bug that I try to solve is the slow RNDIS driver)
So the question was for nougat-x86 thanks.

null.z...@gmail.com

unread,
Feb 21, 2019, 10:56:05 PM2/21/19
to Android-x86
Hi Mauro,
sort of a noob question but I've never compiled anything in my life so don't mind too much -
Is the script you provided for MESA driver update when you're compiling x86 build from the source or can I apply this to the running build that I have?
Also, how much different it is since I'm running nougat_x86_x64 (r2)?

I'm trying to solve the problem I've described here:
Reply all
Reply to author
Forward
0 new messages