How to use Mesa3d's Iris instead of i965

1,041 views
Skip to first unread message

İlhan Atahan

unread,
Apr 4, 2021, 9:16:23 AM4/4/21
to Android-x86
Hi, i am trying to get GALLIUM_HUD works, but i unsuccesfull on it, i guess it is not uses Intel Iris driver.
GALLIUM_HUD works well with Linux Mint on my system.

Here is my cpu/kernel/mesa info:

Intel(R) Core(TM) i5-10210U CPU
Kernel 5.10.26(in android x86)
Mesa 20.3.5(in android x86)

Kernel 5.4.0(Linux Mint)
Mesa 20.2.6(linux Mint)

I am simply edited init.rc file(found as attachment).
But it not worked, i also used "kill -10 xxxx" to restart surfaceflinger.
I hope get a solution on this topic :-)

İlhan Atahan

unread,
Apr 4, 2021, 9:18:11 AM4/4/21
to Android-x86
init.7z

Mauro Rossi

unread,
Apr 5, 2021, 3:38:02 PM4/5/21
to Android-x86
Hello, 
in order to use iris instead of i965, as per the thread subject,
you could either compile mesa with the following changes


or, as an alternative, change init.x86.rc in a write enabled installation in the following way, save it and reboot,
but mesa 20.1 or later is required - NOTE: I have not tested this way

diff --git a/init.x86.rc b/init.x86.rc
index b36a722..fa9d8e8 100644
--- a/init.x86.rc
+++ b/init.x86.rc
@@ -8,5 +8,5 @@ on early-init
     export force_s3tc_enable true
     export EGL_LOG_LEVEL info
-#   export EGL_DRIVERS egl_dri2
+    export MESA_LOADER_DRIVER_OVERRIDE iris
 
You need to be aware that the only visible difference between i965 aka 'classic driver' and iris aka 'gallium driver' visible in android-x86 is in the Settings,
in the GL renderer i965 classic driver has 'DRI', while iris gallium driver does not have it.


In order to enable GALLIUM_HUD there is a thread in this forum, please search 'GALLIUM_HUD' without quotes
Cheers

Mauro

On Sunday, April 4, 2021 at 3:18:11 PM UTC+2 ata.ilhan...@gmail.com wrote:

İlhan Atahan

unread,
Apr 6, 2021, 2:02:27 AM4/6/21
to Android-x86
Thanks you, i tried editing init.rc and it is worked :-) , but somehow i saw multiple GALLIUM_HUD overlays at the same time.IMG_20210406_085826.jpg
5 Nisan 2021 Pazartesi tarihinde saat 22:38:02 UTC+3 itibarıyla issor...@gmail.com şunları yazdı:

İlhan Atahan

unread,
Apr 6, 2021, 2:50:30 AM4/6/21
to Android-x86
Hey, it was due to i set "xport GALLIUM_HUD_VISIBLE true" instead of false, it works normally when i set it false and restart surface flinger, thanks you again :-)

6 Nisan 2021 Salı tarihinde saat 09:02:27 UTC+3 itibarıyla İlhan Atahan şunları yazdı:

youli...@gmail.com

unread,
Apr 6, 2021, 10:49:26 PM4/6/21
to Android-x86
iris can work with gralloc.drm? needn't hwcomposer.intel and gralloc.intel or gralloc.minigbm?

Huy Minh Bui

unread,
Apr 7, 2021, 12:47:20 AM4/7/21
to Android-x86
Yes we are still using gralloc.drm . But according to ilhan himself and some users with 11th Gen CPU reported, there are a lot of app crashing and people can't use it now.

Vào lúc 09:49:26 UTC+7 ngày Thứ Tư, 7 tháng 4, 2021, youli...@gmail.com đã viết:

Huy Minh Bui

unread,
Apr 7, 2021, 12:48:46 AM4/7/21
to Android-x86
by the way can you show me how to compile gralloc.minigbm, gralloc.intel and hwcomposer.intel on nougat-x86 again ? The last time I tried I got black screen on my Intel HD Graphic 2000

Vào lúc 09:49:26 UTC+7 ngày Thứ Tư, 7 tháng 4, 2021, youli...@gmail.com đã viết:
iris can work with gralloc.drm? needn't hwcomposer.intel and gralloc.intel or gralloc.minigbm?

youli...@gmail.com

unread,
Apr 7, 2021, 1:00:13 AM4/7/21
to Android-x86
kabylake gen9.5 can work with iris on android? i test not work.
i965 driver is used for KBL/CML, iris driver is used for TGL.

04-07 04:37:06.269 1813 1813 I SurfaceFlinger: EGL information: format=0x1
04-07 04:37:06.269 1813 1813 I SurfaceFlinger: vendor : Android
04-07 04:37:06.269 1813 1813 I SurfaceFlinger: version : 1.4 Android META-EGL
04-07 04:37:06.271 1813 1813 W EGL-MAIN: dri2_image_front allocation failed
04-07 04:37:06.325 1863 1863 F DEBUG : pid: 1813, tid: 1813, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
04-07 04:37:06.325 1863 1863 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-07 04:37:06.325 1863 1863 F DEBUG : eax f79d858c ebx 00000000 ecx 00000002 edx 00000000
04-07 04:37:06.325 1863 1863 F DEBUG : esi 00000000 edi f79d858c
04-07 04:37:06.326 1863 1863 F DEBUG : xcs 00000023 xds 0000002b xes 0000002b xfs 00000003 xss 0000002b
04-07 04:37:06.326 1863 1863 F DEBUG : eip f7be866c ebp ffefa748 esp ffefa648 flags 00210202
04-07 04:37:06.327 1863 1863 F DEBUG : 
04-07 04:37:06.327 1863 1863 F DEBUG : backtrace:
04-07 04:37:06.327 1863 1863 F DEBUG : #00 pc 0001966c /system/lib/libc.so (memcpy+716)
04-07 04:37:06.327 1863 1863 F DEBUG : #01 pc 0080f154 /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.327 1863 1863 F DEBUG : #02 pc 0080c18c /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.327 1863 1863 F DEBUG : #03 pc 00815d8b /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.327 1863 1863 F DEBUG : #04 pc 003f7f40 /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.327 1863 1863 F DEBUG : #05 pc 00b23313 /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.327 1863 1863 F DEBUG : #06 pc 00b22f66 /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.328 1863 1863 F DEBUG : #07 pc 00a37b72 /system/vendor/lib/dri/gallium_dri.so
04-07 04:37:06.328 1863 1863 F DEBUG : #08 pc 00a39c40 /system/vendor/lib/dri/gallium_dri.so

For now, glxinfo using iris_dri.so should show:
OpenGL vendor string: Mesa Project
OpenGL renderer string: HD Graphics 630 (Kaby Lake GT2)
while glxinfo using i965_dri.so should show:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) 

youli...@gmail.com

unread,
Apr 7, 2021, 1:05:59 AM4/7/21
to Android-x86
my 2560x1600 screen hdmi1 connect amd3400g vega11, hdmi2 connect intel7820hk, they not blackscreen used hwcomposer.minigbm and gralloc.minigbm. my hwc and minigbm can found on my github.

youli...@gmail.com

unread,
Apr 7, 2021, 1:14:48 AM4/7/21
to Android-x86
i only want to test if use iris, 32bit chrome will crash or not on intel gpu? 
i use 32bit chrome 71.0.3578.99 on amdgpu.

Huy Minh Bui

unread,
Apr 7, 2021, 6:22:50 AM4/7/21
to Android-x86
That is the same crash that I have when I use amdgpu back then, 32bit Chrome (or Webview) crash. I tested old version like 60 or latest one like 81 or more and it didn't work. Sadly my GPU broke now



Vào lúc 12:14:48 UTC+7 ngày Thứ Tư, 7 tháng 4, 2021, youli...@gmail.com đã viết:

Huy Minh Bui

unread,
Apr 7, 2021, 6:23:20 AM4/7/21
to Android-x86
Also on nougat-x86, iris can't even open browsers
Vào lúc 12:14:48 UTC+7 ngày Thứ Tư, 7 tháng 4, 2021, youli...@gmail.com đã viết:

crw

unread,
Apr 7, 2021, 9:24:42 AM4/7/21
to Android-x86
But why use nougat x86? There are many issues with it, for me.

İlhan Atahan

unread,
Apr 7, 2021, 4:19:59 PM4/7/21
to Android-x86
Firefox works for me with intel iris.

7 Nisan 2021 Çarşamba tarihinde saat 13:23:20 UTC+3 itibarıyla buin...@gmail.com şunları yazdı:

crw

unread,
Apr 8, 2021, 6:05:31 AM4/8/21
to Android-x86
Even chrome opens for me, i think thats because 11th gen hardware are unstable.

Huy Minh Bui

unread,
Jun 22, 2021, 6:41:57 AM6/22/21
to andro...@googlegroups.com
Hey youling, can you compile and test iris now ?
But this time, cherry-pick these 2 commits 
and then test

the new crocus driver crashed just like iris so I made 2 exact same commit for crocus
I compile and it's running fine now, not a single crash anymore so far. (Only low performance due to the fact that I use Sandy Bridge CPU)

Vào Th 4, 7 thg 4, 2021 vào lúc 12:14 youli...@gmail.com <youli...@gmail.com> đã viết:
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/2fe0cc5e-a432-44c2-9814-b4b8c3fcfaben%40googlegroups.com.

Huy Minh Bui

unread,
Jun 22, 2021, 8:31:10 AM6/22/21
to andro...@googlegroups.com
Here as you can see, crocus can run, even with drm_gralloc (gralloc0)

image.png

Vào Th 3, 22 thg 6, 2021 vào lúc 17:41 Huy Minh Bui <buin...@gmail.com> đã viết:

youli...@gmail.com

unread,
Jun 22, 2021, 12:03:36 PM6/22/21
to Android-x86
nice! test "INTERNAL: Fix iris driver crash on 32 bit system""INTERNAL: Remove performance info query resulting in CFI kernel panic", iris can work on 32bit cm14.1, 32bit chrome also can work, no different feel between i965 and Iris, only different is gl vendor.
Screenshot_20210622-234838.png
Screenshot_20210622-235008.png

Huy Minh Bui

unread,
Jun 22, 2021, 12:13:57 PM6/22/21
to Android-x86
Let's goooooo, now we got both crocus and iris running :DDDDD

Vào lúc 23:03:36 UTC+7 ngày Thứ Ba, 22 tháng 6, 2021, youli...@gmail.com đã viết:

youli...@gmail.com

unread,
Jun 23, 2021, 1:06:59 AM6/23/21
to Android-x86
export MESA_LOADER_DRIVER_OVERRIDE crocus

I test crocus can work on Baytrail gen7 gpu, not used "HACK: loader: enable crocus by removing i965 and iris in driver_map[]".

在2021年6月22日星期二 UTC+8 下午6:41:57<buin...@gmail.com> 写道:

Huy Minh Bui

unread,
Jun 23, 2021, 1:15:57 AM6/23/21
to Android-x86
Well yea you can export it like that, it just I'm too lazy editing init :p

Vào lúc 12:06:59 UTC+7 ngày Thứ Tư, 23 tháng 6, 2021, youli...@gmail.com đã viết:

İlhan Atahan

unread,
Jun 23, 2021, 5:27:28 AM6/23/21
to Android-x86
Lol, i am prefer it because i not have experience about compiling mesa xD
23 Haziran 2021 Çarşamba tarihinde saat 08:15:57 UTC+3 itibarıyla buin...@gmail.com şunları yazdı:

Huy Minh Bui

unread,
Jun 23, 2021, 12:34:17 PM6/23/21
to Android-x86
Update : Mesa3d has officially made a prefer loader for crocus, so I can now revert "HACK: loader: enable crocus by removing i965 and iris in driver_map[]".

youling might already know this too. So we can kinda ditch i965 completely in the future when crocus got stabilized.
Vào lúc 16:27:28 UTC+7 ngày Thứ Tư, 23 tháng 6, 2021, ata.ilhan...@gmail.com đã viết:

youli...@gmail.com

unread,
Jul 3, 2021, 1:31:41 PM7/3/21
to Android-x86
src/loader/Android.mk, -DPREFER_IRIS, -DPREFER_CROCUS, 

Huy Minh Bui

unread,
Jul 3, 2021, 1:38:34 PM7/3/21
to Android-x86
looks good
Vào lúc 00:31:41 UTC+7 ngày Chủ Nhật, 4 tháng 7, 2021, youli...@gmail.com đã viết:

Huy Minh Bui

unread,
Jul 10, 2021, 12:01:27 AM7/10/21
to Android-x86
Is 32bit Chrome still crash on amdgpu ? Or we have a fix ?
Vào lúc 12:14:48 UTC+7 ngày Thứ Tư, 7 tháng 4, 2021, youli...@gmail.com đã viết:
Reply all
Reply to author
Forward
0 new messages