xDoge26 / proot-setup

64 stars 13 forks source link

Request for Adreno 7xx series support and DRI3 support #26

Open hansm629 opened 1 year ago

hansm629 commented 1 year ago

Hello. I am using Termux-X11 PRoot-Distro Ubuntu 22.04 LTS XFCE4-SESSION 4.18 for my Galaxy S23 Ultra (Adreno 740) and Galaxy Tab S8+ 5G (Adreno 730).

I installed mesa-vulkan-kgsl_23.3.0-devel-20230803_arm64.deb that you build, and I found that it did not work.

As it works well with the Galaxy S20 (Adreno 650) PRoot, it does not appear that the currently built package supports the Adreno 7xx series.

Recently, freedreno turnip for the Termux package supports DRI3 as a patch, which seems to work with Turnip without inputting the MESA_VK_WSI_DEBUG=sw environment variable and perform better.

I request Adreno 7xx series support and DRI3 patching for the turnip package for PRoot.

TapetalArray commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb

This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian.

The latest commit contents of mesa git are reflected.

Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Fcucgvhhhvjv commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Kde plasma does work with USE_HEAP=1 vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname

Fcucgvhhhvjv commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb

This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian.

The latest commit contents of mesa git are reflected.

Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

is the dri3 patch performing better? also what mesa version . I tested it last time i found no difference in glxgears

TapetalArray commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Kde plasma does work with USE_HEAP=1 vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname

Yes, It's work, but Kwin does not support zink driver

hansm629 commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Enter the command below in Termux to install virgl packages.

$ pkg install virglrenderer-android

Then enter the commands below one by one.

Then, enter the following commands one by one in the Termux terminal.

Based on example PRoot-Distro Debian environment (su id : test )

$ termux-x11 :0 &
$ virgl_test_server_android &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

If you enter the above command Linux runs via termux-x11 and virgl is available for xfce sessions.

If successful In the xfce4 information the GPU is listed as virgl.

스크린샷_2023-09-05_16-33-09

Another method is to combine the Android host Vulkan driver and mesa-zink and then perform GPU acceleration through virgl.

Performance is slightly lower than virglrenderer-android, but it has higher compatibility than virglrenderer-android.

p.s For some reason this method does not work for Adreno 7xx series. :(

Enter the command below in Termux to install packages.

$ pkg update -y && pkg upgrade -y
$ pkg install tur-repo
$ pkg install vulkan-loader-android mesa-zink virglrenderer-mesa-zink

Then enter the command below to run Linux and xfce4 sessions.

$ termux-x11 :0 &
$ MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink ZINK_DESCRIPTORS=lazy virgl_test_server --use-egl-surfaceless --use-gles &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

Lastly, there is a way to combine angle and virgl.

In terms of compatibility Significantly lower compared to virglrenderer-android and virglrenderer-mesa-zink

It feels like it only supports minimal GPU acceleration. I don't really recommend it.

On select Mali GPU devices Since virglrenderer-android does not work, it can be used as a replacement.

$ pkg update -y && pkg upgrade -y
$ pkg install angle-android virglrenderer-android

angle gl

$ termux-x11 :0 &
$ virgl_test_server_android --angle-gl &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

angle vulkan

$ termux-x11 :0 &
$ virgl_test_server_android --angle-vulkan &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

angle vulkan-null

$ termux-x11 :0 &
$ virgl_test_server_android --angle-vulkan-null &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

Based on personal testing angle-vulkan and angle-vulkan-null could not run any 3D programs except glmark2 and glxgears.

Some games, such as supertuxkart, worked with angle-gl, but the graphics did not display properly.

In case of

recommend using a combination of the three.

Here for Adreno6xx series I think it would be perfect if I combined it with I built and the the DRI3 patch Turnip driver.

hansm629 commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

is the dri3 patch performing better? also what mesa version . I tested it last time i found no difference in glxgears

Based on Adreno 740 It has improved by about 2.5 times compared to before the patch.

TapetalArray commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Enter the command below in Termux to install virgl packages.

$ pkg install virglrenderer-android

Then enter the commands below one by one.

Then, enter the following commands one by one in the Termux terminal.

Based on example PRoot-Distro Debian environment (su id : test )

$ termux-x11 :0 &
$ virgl_test_server_android &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

If you enter the above command Linux runs via termux-x11 and virgl is available for xfce sessions.

If successful In the xfce4 information the GPU is listed as virgl.

스크린샷_2023-09-05_16-33-09

Another method is to combine the Android host Vulkan driver and mesa-zink and then perform GPU acceleration through virgl.

Performance is slightly lower than virglrenderer-android, but it has higher compatibility than virglrenderer-android.

p.s For some reason this method does not work for Adreno 7xx series. :(

Enter the command below in Termux to install packages.

$ pkg update -y && pkg upgrade -y
$ pkg install tur-repo
$ pkg install vulkan-loader-android mesa-zink virglrenderer-mesa-zink

Then enter the command below to run Linux and xfce4 sessions.

$ termux-x11 :0 &
$ MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink ZINK_DESCRIPTORS=lazy virgl_test_server --use-egl-surfaceless --use-gles &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

Lastly, there is a way to combine angle and virgl.

In terms of compatibility Significantly lower compared to virglrenderer-android and virglrenderer-mesa-zink

It feels like it only supports minimal GPU acceleration. I don't really recommend it.

On select Mali GPU devices Since virglrenderer-android does not work, it can be used as a replacement.

$ pkg update -y && pkg upgrade -y
$ pkg install angle-android virglrenderer-android

angle gl

$ termux-x11 :0 &
$ virgl_test_server_android --angle-gl &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

angle vulkan

$ termux-x11 :0 &
$ virgl_test_server_android --angle-vulkan &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

angle vulkan-null

$ termux-x11 :0 &
$ virgl_test_server_android --angle-vulkan-null &
$ proot-distro login debian --user test --shared-tmp --no-sysvipc
$ export DISPLAY=:0 GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2
$ dbus-launch --exit-with-session startxfce4 &

Based on personal testing angle-vulkan and angle-vulkan-null could not run any 3D programs except glmark2 and glxgears.

Some games, such as supertuxkart, worked with angle-gl, but the graphics did not display properly.

  • Adreno6xx series
  • PowerVR
  • Xclipse920(mRDAN2)

In case of

  • vulkan-loader-android
  • mesa-zink
  • virglrenderer-mesa-zink

We recommend using a combination of the three.

Here for Adreno6xx series I think it would be perfect if I combined it with I built and the the DRI3 patch Turnip driver.

Thank you for reply😉

Fcucgvhhhvjv commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

is the dri3 patch performing better? also what mesa version . I tested it last time i found no difference in glxgears

Based on Adreno 740 It has improved by about 2.5 times compared to before the patch.

whar are the steps? Im using a poco x3 pro SD 860 Adreno 640 . I did try your steps building mesa from source witht the patch but it didnt work , termux complaining that screen isnt dri3 compatible , i used termux-x11 latest verison .

Fcucgvhhhvjv commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Kde plasma does work with USE_HEAP=1 vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname

Yes, It's work, but Kwin does not support zink driver

yes for some reason kwin crashes , idk i used udroid jammy:kdeRaw and it flawless , when u move around windows u cant feel any lag .

hansm629 commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

is the dri3 patch performing better? also what mesa version . I tested it last time i found no difference in glxgears

Based on Adreno 740 It has improved by about 2.5 times compared to before the patch.

whar are the steps? Im using a poco x3 pro SD 860 Adreno 640 . I did try your steps building mesa from source witht the patch but it didnt work , termux complaining that screen isnt dri3 compatible , i used termux-x11 latest verison .

  1. Install PRoot-Distro Debian or PRoot-Distro Ubuntu in Termux. (I recommend Debian.)

  2. In case of debian Add debian sid repo to source.list and update all packages to the latest version. (can be updated to mesa 23.1.6)

  3. Install the DRI3 patch Turnip driver (my build)

  4. After installing glmark2 and vulkaninfo, enter the command below to check if it works well.

$ MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform glmark2
$ TU_DEBUG=noconform vkcube

If Termux-x11 supports DRI3

It works well even without the MESA_VK_WSI_DEBUG=sw environment variable.

In the case of glmark2, there is a performance improvement of at least 2~3x compared to before the patch.

(Adreno 740 had a performance improvement of almost 4~5x)

TapetalArray commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Kde plasma does work with USE_HEAP=1 vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname

Yes, It's work, but Kwin does not support zink driver

yes for some reason kwin crashes , idk i used udroid jammy:kdeRaw and it flawless , when u move around windows u cant feel any lag .

Thank you for reply, Is udroid jammy:kdeRaw work with zink driver? I want to try it, what is link😉

hansm629 commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you run xfce with virgl? I have KDE Plasma but it not work with virgl. Sorry for my bad English.

Kde plasma does work with USE_HEAP=1 vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname

Yes, It's work, but Kwin does not support zink driver

yes for some reason kwin crashes , idk i used udroid jammy:kdeRaw and it flawless , when u move around windows u cant feel any lag .

Thank you for reply, Is udroid jammy:kdeRaw work with zink driver? I want to try it, what is link😉

Does Termux-x11 work on udroid? (I failed.)

If Termux-x11 works, it should work in theory. But I can't be sure because I haven't tested it directly.

PRoot is guaranteed to work on xfce4 on Debian and Ubuntu.

and In the case of zink, it will be activated in mesa distributed on Ubuntu.

TapetalArray commented 1 year ago

Yes, termux-x11 can work on udroid, check this link https://udroid-rc.gitbook.io/udroid-wiki/udroid-landing/setting-up-gui/termux-x11

Fcucgvhhhvjv commented 1 year ago

@hansm629 dri3 mesa kgsl works ,I found 2x difference in glmark2 but not so much in glxgears , glxgears with vblank_mode=0 uses vsysnc so I'm not sure .

Termux-x11 does work with udroid by default udroid binds the /usr/tmp to /tmp so it works . To start it u have to use termuc-x11 in termux then login udroid login suite and export DISPLAY=:0

I suggest you to try jammy:kdeRaw from udroid because I found it to be fastest and no lag when moving windows .

Also I like to know your theme for xfce4 Thanks

lazimk commented 1 year ago

Thanks @hansm629 ,

I was able to do it with ur previous build in Proot Debian 12 (bookworm). I could get 385ish score on glmark2 on Adreno730 (8gen1).

Blender opens. I can rotate model smoothly, but when selected using click and drag, it freezes with error saying "MESA: Device lost", because of some bug Maybe i will try with ur newest build.

Thank you.

hansm629 commented 1 year ago

Thanks @hansm629 ,

I was able to do it with ur previous build in Proot Debian 12 (bookworm). I could get 385ish score on glmark2 on Adreno730 (8gen1).

Blender opens. I can rotate model smoothly, but when selected using click and drag, it freezes with error saying "MESA: Device lost", because of some bug Maybe i will try with ur newest build.

Thank you.

Oh...I forgot.

Currently, there is a slight problem with the turnip driver, limited to Adreno730.

A representative example is Blender 3D, which you mentioned. When I select an object the program freezes and does not work.

SD8 Gen1 (Adreno 730) device Galaxy S22 Ultra and Galaxy Tab S8+ 5G. The same symptom occurs on both

but SD865 (Adreno 650) device Galaxy S20 SD8 Gen2 (Adreno 740) device Galaxy S23 Ultra and Galaxy Tab S9 Ultra 5G This symptom does not occur and Blender 3D works well except for some artifact issues.

I guess is that it is either a mesa zink bug or a compatibility issue with turnip itself.

hansm629 commented 1 year ago

@hansm629 dri3 mesa kgsl works ,I found 2x difference in glmark2 but not so much in glxgears , glxgears with vblank_mode=0 uses vsysnc so I'm not sure .

Termux-x11 does work with udroid by default udroid binds the /usr/tmp to /tmp so it works . To start it u have to use termuc-x11 in termux then login udroid login suite and export DISPLAY=:0

I suggest you to try jammy:kdeRaw from udroid because I found it to be fastest and no lag when moving windows .

Also I like to know your theme for xfce4 Thanks

What advantages does Udroid have over the existing PRoot-Distro?

In the case of PRoot-Distro Debian or Ubuntu, which is used in the existing Termux-x11, symptoms that are not smooth occur intermittently when moving the program window. (15~30FPS?)

Doesn’t Udroid have those symptoms?

Fcucgvhhhvjv commented 1 year ago

@hansm629 dri3 mesa kgsl works ,I found 2x difference in glmark2 but not so much in glxgears , glxgears with vblank_mode=0 uses vsysnc so I'm not sure . Termux-x11 does work with udroid by default udroid binds the /usr/tmp to /tmp so it works . To start it u have to use termuc-x11 in termux then login udroid login suite and export DISPLAY=:0 I suggest you to try jammy:kdeRaw from udroid because I found it to be fastest and no lag when moving windows . Also I like to know your theme for xfce4 Thanks

What advantages does Udroid have over the existing PRoot-Distro?

In the case of PRoot-Distro Debian or Ubuntu, which is used in the existing Termux-x11, symptoms that are not smooth occur intermittently when moving the program window. (15~30FPS?)

Doesn’t Udroid have those symptoms?

Not much really , but they have some extra fixes for example u can use software center and install something from there.You can even use gnome-shell , you just need a small fix for that . You Should check their website

hansm629 commented 1 year ago

@hansm629 dri3 mesa kgsl works ,I found 2x difference in glmark2 but not so much in glxgears , glxgears with vblank_mode=0 uses vsysnc so I'm not sure . Termux-x11 does work with udroid by default udroid binds the /usr/tmp to /tmp so it works . To start it u have to use termuc-x11 in termux then login udroid login suite and export DISPLAY=:0 I suggest you to try jammy:kdeRaw from udroid because I found it to be fastest and no lag when moving windows . Also I like to know your theme for xfce4 Thanks

What advantages does Udroid have over the existing PRoot-Distro? In the case of PRoot-Distro Debian or Ubuntu, which is used in the existing Termux-x11, symptoms that are not smooth occur intermittently when moving the program window. (15~30FPS?) Doesn’t Udroid have those symptoms?

Not much really , but they have some extra fixes for example u can use software center and install something from there.You can even use gnome-shell , you just need a small fix for that . You Should check their website

There seems to be no difference in performance.

Debian SID provides more recent packages than Ubuntu without adding a separate PPA, so it doesn't seem to have much merit other than the gnome environment.

The speed of xfce4 is also faster than gnome...

Fcucgvhhhvjv commented 1 year ago

I'll try Debian , didn't know it was better than ubuntu .

hansm629 commented 1 year ago

I'll try Debian , didn't know it was better than ubuntu .

In the debian sid repository Provides the latest mesa 23.1.6 version zink is also enabled.

Fcucgvhhhvjv commented 1 year ago

I'll try Debian , didn't know it was better than ubuntu .

In the debian sid repository Provides the latest mesa 23.1.6 version zink is also enabled.

how to add the sid repository ? also can it be build for x86 emulation through fex and qemu static?

hansm629 commented 1 year ago

@Fcucgvhhhvjv

$ sudo nano etc/apt/sources.list

Run sources.list with nano or vim editor. (The above command is based on nano)

deb https://ftp.debian.org/debian/ sid contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ sid contrib main non-free non-free-firmware

And add the repository at the bottom of sources.list.

$ sudo apt update -y && apt upgrade -y

Finally, enter the apt update and apt upgrade commands to update the entire package.

If you have Mesa installed, it will be upgraded to version 23.1.6.

In the case of the debian sid repository, packages are constantly updated to the latest version.

I can't say for sure because I haven't tried FEX. Instead, the debian sid repository provides the box64 package.

$ sudo apt install box64 

It can be easily installed by entering the above command.

TapetalArray commented 1 year ago

@hansm629

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb

This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian.

The latest commit contents of mesa git are reflected.

Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you build dri3 patch turnip driver😉

Azedin1111 commented 1 year ago

Poco f1 no work dri3

hansm629 commented 1 year ago

Poco f1 no work dri3

Have you installed the latest version of termux-x11 that supports DRI3?

In theory, Adreno 6xx/7xx series should work.

Azedin1111 commented 1 year ago

Exagear xegw

Azedin1111 commented 1 year ago

Screenshot_2023-09-09-04-26-52-350_com antutu ABenchMark

hansm629 commented 1 year ago

Screenshot_2023-09-09-04-26-52-350_com antutu ABenchMark

This package is for PRoot Linux only.

hansm629 commented 1 year ago

@hansm629

mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb This is the DRI3 patch Turnip driver newly build by PRoot-Distro Debian. The latest commit contents of mesa git are reflected. Confirmed Issue :

  • Artifacts occur in animated bones, 2D images, and other wireframes in Blender 3D (probably zink bug?)
  • Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

Hi, How do you build dri3 patch turnip driver😉

@TapetalArray

Please add thesrc-deb repository to etc/apt/source.list.

Install the packages for mesa compilation.

$ sudo apt update -y && apt upgrade -y
$ sudo apt build-dep mesa 
$ sudo apt install make cmake git wget vulkan-tools mesa-utils g++-arm-linux-gnueabihf g++-aarch64-linux-gnu
$ sudo apt install zlib1g-dev:arm64 libexpat1-dev:arm64 libdrm-dev:arm64 libx11-dev:arm64 libx11-xcb-dev:arm64 libxext-dev:arm64 libxdamage-dev:arm64 libxcb-glx0-dev:arm64 libxcb-dri2-0-dev:arm64 libxcb-dri3-dev:arm64 libxcb-shm0-dev:arm64 libxcb-present-dev:arm64 libxshmfence-dev:arm64 libxxf86vm-dev:arm64 libxrandr-dev:arm64 libwayland-dev:arm64 wayland-protocols:arm64 libwayland-egl-backend-dev:arm64  

Then, enter the command below.

$ cp /usr/include/libdrm/drm.h /usr/include/libdrm/drm_mode.h /usr/include/

Enter the command below to download mesa source.

$ BUILD_PREFIX=~/Desktop
$ MESA_PREFIX=${BUILD_PREFIX}/mesa-turnip-feature-a7xx-basic-support

$ wget --continue --directory-prefix ${BUILD_PREFIX} https://gitlab.freedesktop.org/Danil/mesa/-/archive/turnip/feature/a7xx-basic-support/mesa-turnip-feature-a7xx-basic-support.tar.gz
$ tar -xf ${BUILD_PREFIX}/*.tar.gz --directory ${BUILD_PREFIX}

Enter the commands below one by one

$ MESA_VER=$(cat ${MESA_PREFIX}/VERSION)
$ DATE=$(date +"%F" | sed 's/-//g')
$ MESA_64=${BUILD_PREFIX}/mesa-vulkan-kgsl_${MESA_VER}-${DATE}_arm64
$ echo "\
[binaries]
c = 'arm-linux-gnueabihf-gcc'
cpp = 'arm-linux-gnueabihf-g++'
ar = 'arm-linux-gnueabihf-ar'
strip = 'arm-linux-gnueabihf-strip'
pkgconfig = 'arm-linux-gnueabihf-pkg-config'

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'aarch64'
endian = 'little'
" > ${MESA_PREFIX}/arm.txt

dri.zip You are now ready to build. After downloading dri.zip, place wsi-termux-x11-v3.patch in the mesa source path.

To apply the dri3 patch, go to the source path and enter the patch command.

$ cd ${MESA_PREFIX}
$ git apply -v wsi-termux-x11-v3.patch

Once the patch application is complete wsi_common_x11.c in dri.zip

replace src/vulkan/wsi/wsi_common_x11.c with file from archive

Now, build turnip by entering the commands below one by one.

$ sudo meson build64/ --prefix /usr --libdir lib/aarch64-linux-gnu/ -D platforms=x11,wayland -D gallium-drivers=freedreno -D vulkan-drivers=freedreno -D freedreno-kmds=msm,kgsl -D dri3=enabled -D buildtype=release -D glx=disabled -D egl=disabled -D gles1=disabled -D gles2=disabled -D gallium-xa=disabled -D opengl=false -D shared-glapi=false -D b_lto=true -D b_ndebug=true -D cpp_rtti=false -D gbm=disabled -D llvm=disabled -D shared-llvm=disabled -D xmlconfig=disabled
$ sudo meson compile -C build64/
$ sudo meson install -C build64/ --destdir ${MESA_64}

Enter the commands below one by one to create turnip as a deb package.

$ cd ${BUILD_PREFIX}

$ sudo apt remove -y mesa-vulkan-drivers:arm64
$ sudo apt download mesa-vulkan-drivers:arm64
$ sudo dpkg-deb -e mesa-vulkan-drivers_*_arm64.deb ${MESA_64}/DEBIAN/
$ sudo sed -ie "3s/.*/Version: ${MESA_VER}-${DATE}/g" ${MESA_64}/DEBIAN/control
$ sudo rm mesa-vulkan-drivers_*_arm64.deb
$ sudo rm ${MESA_64}/DEBIAN/md5sums ${MESA_64}/DEBIAN/triggers
$ sudo rm -rf ${MESA_64}/usr/share/drirc.d
$ sudo dpkg-deb --build --root-owner-group ${MESA_64}

Now the turnip deb package has been created in ~/Desktop path.

Install and use the generated turnip deb package.

lazimk commented 1 year ago

i get error running vkmark in proot. saying something like creating vkInstance failed Could anyone run vkmark?

hansm629 commented 1 year ago

i get error running vkmark in proot. saying something like creating vkInstance failed Could anyone run vkmark?

스크린샷_2023-09-10_03-58-56

hsm@localhost:~$ vkmark
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x5143
    Device ID:      0x6050002
    Device Name:    Turnip Adreno (TM) 650
    Driver Version: 96477283
    Device UUID:    135f5b8760943e55701559d6a6b23ea8
=======================================================
[vertex] device-local=true: FPS: 930 FrameTime: 1.075 ms
[vertex] device-local=false: FPS: 901 FrameTime: 1.110 ms
[texture] anisotropy=0: FPS: 676 FrameTime: 1.479 ms
[texture] anisotropy=16: FPS: 606 FrameTime: 1.650 ms
[shading] shading=gouraud: FPS: 574 FrameTime: 1.742 ms
[shading] shading=blinn-phong-inf: FPS: 543 FrameTime: 1.842 ms
[shading] shading=phong: FPS: 691 FrameTime: 1.447 ms
[shading] shading=cel: FPS: 678 FrameTime: 1.475 ms
[effect2d] kernel=edge: FPS: 790 FrameTime: 1.266 ms
[effect2d] kernel=blur: FPS: 530 FrameTime: 1.887 ms
[desktop] <default>: FPS: 672 FrameTime: 1.488 ms
[cube] <default>: FPS: 730 FrameTime: 1.370 ms
[clear] <default>: FPS: 701 FrameTime: 1.427 ms
=======================================================
                                   vkmark Score: 694
=======================================================

PRoot Debian is work

Galaxy S20 (Adreno 650) Galaxy S22 Ultra (Adreno 730) Galaxy Tab S8+ 5G (Adreno 730) Galaxy S23 Ultra (Adreno 740) Galaxy Tab S9 Ultra 5G (Adreno 730)

All of the above devices have been benchmarked.

but Adreno 7xx series has an issue where artifacts occur in vkmark.

hansm629 commented 1 year ago

mesa-vulkan-kgsl_23.3.0-devel-20230910_debian_arm64.deb mesa-vulkan-kgsl_23.3.0-devel-20230910_ubuntu_arm64.deb

new build of the DRI3 patch Turnip driver for PRoot Linux only.

I received a report that a package built on Debian was not installed on Ubuntu 22.04 due to a dependency issue.

deb package build on Debian trixie deb package build on Ubuntu 22.04

Each was build separately.

Confirmed Issue :

  1. Artifacts occur in animated bones, 2D images, and other wireframes in when moving the viewer in Blender 3D (probably zink bug?)

  2. Artifacts occur when running vkmark in Adreno7xx series (DRI3 patch Compatibility issue?)

  3. When you run Blender 3D on an Adreno 730 device and select a 3D object, the program freezes and becomes unusable. (this symptom does not Adreno740 and Adreno6xx series)

Fcucgvhhhvjv commented 1 year ago

How to do u install vkmark? I couldn't find it in repository in Debian and ubuntu @hansm629

playbyan1453 commented 12 months ago

do i still need to install turnip server android??

Fcucgvhhhvjv commented 12 months ago

do i still need to install turnip server android??

No u just need to install Zink in termux and mesa kgsl deb in proot

playbyan1453 commented 12 months ago

For clarity I used vnc server, Ubuntu Mantic (23.10) arm64 and my processor is Snapdragon 680 and Andreno 610. I'm trying to run blender and it seems like the viewport and text is not showing up and gliching a lot. And previously using virglrenderer-mesa-zink it says my device wasn't meeting the requirements zink needed, and I am using proot instead proot-distro with installer using this it seems my steps was wrong or something.

hansm629 commented 11 months ago

How to do u install vkmark? I couldn't find it in repository in Debian and ubuntu @hansm629

@Fcucgvhhhvjv

Ubuntu doesn't seem to have a separate PPA. In my case, I manually downloaded the deb packages from theDebian Sid Repository and installed them on Ubuntu. (Some dependency packages need to be resolved)

For Debian, you can install vkmark by adding the Debian Sid Repository to etc/apt/source.list.

hansm629 commented 11 months ago

For clarity I used vnc server, Ubuntu Mantic (23.04) arm64 and my processor is Snapdragon 680 and Andreno 610. I'm trying to run blender and it seems like the viewport and text is not showing up and gliching a lot. And previously using virglrenderer-mesa-zink it says my device wasn't meeting the requirements zink needed, and I am using proot instead proot-distro with installer using this it seems my steps was wrong or something.

@playbyan1453

Guaranteed to work with Termux-x11 supporting DRI3. VNC is not recommended.

In my case, PRoot-Distro of Ubuntu or Debian Because I tested it in XFCE environment

Please understand that other environments have not been tested.

playbyan1453 commented 11 months ago

I got it working with a few problem, first using glxgears llvm reaches 400+ fps and using zink got only around 200+ but on blender the difference is crazy. Playing animation can reach 12-15 fps while the llvm only gets to 9-10fps also I need to initialize the environment everytime using blender or glxgears and using zink causes blender's window to shift down then maximized, the obvious one is splash image is heavily distorted, eevee renderer works better with zink. demonstration

playbyan1453 commented 11 months ago

Got it working on termux x11, I expected better result but it seems glxgears running better and except blender with gliches and other lot of stuffs that I mentioned before.

MastaG commented 9 months ago

So has the patch been upstreamed into mesa yet? Or do I still need to download https://github.com/xDoge26/proot-setup/files/12564533/dri.zip ?

MastaG commented 9 months ago

So I'm trying this out on my OnePlus 7T running stock Android 12. My device features the Adreno 650 GPU. After installing the the latest termux and termux-x11 packages and install Ubuntu Jammy xfce4 using the udroid installer I got it to work by installing the mesa-vulkan-kgsl_23.3.0-devel-20230910_ubuntu_arm64.deb package which was posted here and also on Reddit: https://www.reddit.com/r/termux/comments/16fmwb9/proot_only_dri3_patch_freedreno_turnip_driver_new/

If I set TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink I can run glxgears just fine. However when I add these two variables to /etc/environment then xfce4 will not start anymore. It will give the error: MESA: error: kopper: could not create texture from pixmap

I believe this bug was fixed upstream lately. So when I would like to build mesa from source instead, should I build from the official main branch or use this fork: https://gitlab.freedesktop.org/Danil/mesa/-/archive/turnip/feature/a7xx-basic-support/mesa-turnip-feature-a7xx-basic-support.tar.gz ? Also in case I can use the original mesa main repository, do I still need to apply the wsi-termux-x11-v3.patch or replace wsi_common_x11.c from dri.zip? Or do both?

Verycuteabbey commented 9 months ago

So I'm trying this out on my OnePlus 7T running stock Android 12. My device features the Adreno 650 GPU. After installing the the latest termux and termux-x11 packages and install Ubuntu Jammy xfce4 using the udroid installer I got it to work by installing the mesa-vulkan-kgsl_23.3.0-devel-20230910_ubuntu_arm64.deb package which was posted here and also on Reddit: https://www.reddit.com/r/termux/comments/16fmwb9/proot_only_dri3_patch_freedreno_turnip_driver_new/

If I set TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink I can run glxgears just fine. However when I add these two variables to /etc/environment then xfce4 will not start anymore. It will give the error: MESA: error: kopper: could not create texture from pixmap

I believe this bug was fixed upstream lately. So when I would like to build mesa from source instead, should I build from the official main branch or use this fork: https://gitlab.freedesktop.org/Danil/mesa/-/archive/turnip/feature/a7xx-basic-support/mesa-turnip-feature-a7xx-basic-support.tar.gz ? Also in case I can use the original mesa main repository, do I still need to apply the wsi-termux-x11-v3.patch or replace wsi_common_x11.c from dri.zip? Or do both?

sorry hear about that my device is TB-138FC also Adreno 650 GPU, but i haven't any problem when i using Arch Linux with Xfce4 maybe you can try to use other distributions?

MastaG commented 9 months ago

@Verycuteabbey I can run any OpenGL/Vulkan application with: TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink vblank_mode=0 APPNAME It works as described in this thread. However I cannot start xfce4 with MESA_LOADER_DRIVER_OVERRIDE=zink already set. Then it will error out with: error: MESA: error: kopper: could not create texture from pixmap

There was already a bug report regarding this problem here: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9903

So I worked around it by adding TU_DEBUG=noconform and vblank_mode=0 to my /etc/environment. And I'll just set MESA_LOADER_DRIVER_OVERRIDE=zink when running box86/64 or other things utilizing OpenGL(ES).

I will try another distro in the near future as I'm not so much into the Debian/Ubuntu ecosystem.

Verycuteabbey commented 9 months ago

@Verycuteabbey I can run any OpenGL/Vulkan application with: TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink vblank_mode=0 APPNAME It works as described in this thread. However I cannot start xfce4 with MESA_LOADER_DRIVER_OVERRIDE=zink already set. Then it will error out with: error: MESA: error: kopper: could not create texture from pixmap

There was already a bug report regarding this problem here: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9903

So I worked around it by adding TU_DEBUG=noconform and vblank_mode=0 to my /etc/environment. And I'll just set MESA_LOADER_DRIVER_OVERRIDE=zink when running box86/64 or other things utilizing OpenGL(ES).

I will try another distro in the near future as I'm not so much into the Debian/Ubuntu ecosystem.

try to build GL4ES and set export LD_LIBRARY_PATH=/path/to/gl4es that to let Xfce4 using GL4ES also can set it into /etc/enviroment 2023-12-19_20-23

my script to start Xfce4 2023-12-19_20-25

but like Sublime Text and Firefox WebGL you may need to set back export LD_LIBRARY_PATH=/usr/lib because they will not work if using GL4ES

MastaG commented 9 months ago

@Verycuteabbey That's a great idea. So if I'm correct GL4ES will wrap around Zink's OpenGL ES implementation. So it's basically Turnip (DRI3) -> Zink -> OpenGL + ES -> GL4ES -> OpenGL (again).

Perhaps this will work around the MESA: error: kopper: could not create texture from pixmap message.

What's the difference between vlank_mode=0 vs 1? You're running XFCE4 with vblank_mode set to 1?

Verycuteabbey commented 9 months ago

@Verycuteabbey That's a great idea. So if I'm correct GL4ES will wrap around Zink's OpenGL ES implementation. So it's basically Turnip (DRI3) -> Zink -> OpenGL + ES -> GL4ES -> OpenGL (again).

Perhaps this will work around the MESA: error: kopper: could not create texture from pixmap message.

What's the difference between vlank_mode=0 vs 1? You're running XFCE4 with vblank_mode set to 1?

i think this option set to wrong value while i rebuilding the proot XD i also don't know what difference between vblank_mode 0 & 1, but i sure about that neither of these values will affect glxgears, still 560 - 580fps around

about MESA: error: kopper: could not create texture from pixmap this message, i can see it on terminal when Xfce4 startup even rendering by GL4ES, but nothings happened because desktop enviroment works fine with GL4ES when set MESA_LOADER_DRIVER_OVERRIDE=zink

now there is a solution GL4ES wrapper, which is better than nothing :P

MastaG commented 8 months ago

@Verycuteabbey That's a great idea. So if I'm correct GL4ES will wrap around Zink's OpenGL ES implementation. So it's basically Turnip (DRI3) -> Zink -> OpenGL + ES -> GL4ES -> OpenGL (again). Perhaps this will work around the MESA: error: kopper: could not create texture from pixmap message. What's the difference between vlank_mode=0 vs 1? You're running XFCE4 with vblank_mode set to 1?

i think this option set to wrong value while i rebuilding the proot XD i also don't know what difference between vblank_mode 0 & 1, but i sure about that neither of these values will affect glxgears, still 560 - 580fps around

about MESA: error: kopper: could not create texture from pixmap this message, i can see it on terminal when Xfce4 startup even rendering by GL4ES, but nothings happened because desktop enviroment works fine with GL4ES when set MESA_LOADER_DRIVER_OVERRIDE=zink

now there is a solution GL4ES wrapper, which is better than nothing :P

So I've installed Fedora 39 and compiled the custom mesa drivers as per instructions, having them installed in /usr/local/lib64. GL4ES actually seems to pick them up just fine. LIBGL_GLES=/usr/local/lib64/libGLESv2.so.2 LIBGL_EGL=/usr/local/lib64/libEGL.so.1 LD_LIBRARY_PATH=/usr/local/lib64/gl4es gnome-shell -r --x11 --sm-disable -d :0

However unfortunately for me Gnome requires OpenGL core 3 as of version 44.

No provider of glGenSamplers found.  Requires one of:
    Desktop OpenGL 3.3
    GL_ARB_sampler_objects
    OpenGL ES 3.0

Running it without GL4ES seems to render the desktop and wallpaper at least, but opening new windows still produces:

MESA: error: kopper: could not create texture from pixmap

This causes the windows to look transparent.

So I guess it's either XFCE4 or some other DE that is satisfied with OpenGL 2.0 so it can be used by GL4ES. Or pray for the Mesa devs to solve the kopper error.

MastaG commented 8 months ago

Then again Gnome's gles2 renderer hasn't been dropped! Just start termux-x11 without MIT-SHM: XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac -extension MIT-SHM & Then you can still proceed to run Gnome desktop with zink using OpenGLES 2.0:

export DISPLAY=:0
CLUTTER_DRIVER=gles2 dbus-launch gnome-shell -r --x11

Voila! Fully accelerated Gnome 45 within proot, without MESA: error: kopper: could not create texture from pixmap