yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 General] AkiroX:
The problem isn't the GPU driver, though.

This is using the Android kernel. Which means we do have some sort of hardware acceleration on Linux...

Just not full hardware acceleration. I heard it had to do with something in the way this deploys or something like that. Idk~
[ZenFone 2 General] sorg:
For simplicity, i've called 3D accelerated (DirectX, OpenGL) driver as GPU driver.

Of course, there is basic video driver, but that's not enough to play the games.

May be it's possible to use somehow part of android binaries, like OpenGL driver, and then create some other OpenGL driver on top of it (Android API is well documented), to make it compatible with normal Linux. Some kind of wrapper.

At least in theory. This should require a lot of knowledge.
[ZenFone 2 General] dodongobongo:
About the "couldn't find these debs: 0", I think it's due to an invalid combination of settings. For instance I get it when selecting GNOME on Ubuntu Precise, but it installs just fine when using Lucid.

That said I can't get GNOME to work with any distro I've tried. Just crashes when starting gnome-session. Guess it needs graphics acceleration?

Also, I don't think busybox is strictly required. At least I've previously managed to install Debian with LXDE without installing busybox.
[ZenFone 2 General] aziz07:
Does that mean GPU acceleration is close to work or we need GLX (OpenGL for X) ?

The fps you got are in which game/application?

Is TurboVNC faster than VirtualGL?
[ZenFone 2 General] ycavan:
Before we can get GPU acceleration, I wanted to make sure LLVM responded w/ the correct cpu since a LOT of software now uses it.

fps was from es2gears_x11, the mesa gles2 demo program.

Connecting to TurboVNC using bVNC ( from the app store ) allowed es2gears_x11 to run around 112 fps

Connecting to TurboVNC from my laptop using Windows TurboVNC viewer allowed es2gears_x11 to run around 68 fps

Using VirtualGL running es2gears_x11 to XServer-XSDL was just shy of 60 fps ( ~58 fps or so ), so either I'm not running it correctly, but XServer-XSDL is limited

The benefit of using XServer-XSDL, though, is that it has built-in pulseaudio support; right now, I'm not setting something right in my /etc/pulse/default.pa configuration file to stream audio to Simple Player ( android app store ).

Edit:

Here's a video of TurboVNC running the lxde windows manager, es2gears_x11, Windows 8 under qemu-kvm and the ePSXe Playstation 1 emulator inside Windows 8.

[YOUTUBE]uAFmzrq53Oo[/YOUTUBE]
[ZenFone 2 General] aziz07:
:eek: Hows your ram usage in Android with all those running ??
[ZenFone 2 General] ycavan:
Pretty much normal. I think I dip down around 900 megs free or so. ( because I allot 1 gig to Windows 8 )
[ZenFone 2 General] pijiman:
Amazing accomplishments ycavan, but I'm wondering, can I compile on my desktop machine (Arch Linux x86_64), move the folders to the chrooted installation in my ZenFone, and make install then and there? Am I missing something here? I dabbled with clang, but mostly small stuff (and using Qt in the middle, so I wasn't really doing a whole lotta makefiles or stuff like that :P ). Also, is there any improvement for this in Mesa 10.6.3?

Thanks!

edit: on my Arch installation I'm getting the warning "configure: WARNING: unrecognized options: --enable-gold" and it can't do the make all-gold. Am I missing something?
[ZenFone 2 General] ycavan:
I'm not sure about compiling on your desktop machine, but I doubt it'd be too much of a problem.

re: the --enable-gold warning, did you follow the linked howto? it almost sounds like you didn't grab the correct binutils ( or running configure for some other program )
[ZenFone 2 General] pijiman:
I'd like to think so. I created a directory, did the clone of binutils into that directory. CDd there, created another directory called "mybuild" (so I could follow the steps perfectly), etc. I'll try again in a little bit and post some pictures with the warning, should they arise again. Thanks!

EDIT: created "mybuild" INSIDE binutils, instead of BESIDES binutls. making it right now. I'd like to, eventually, post a video guide of this build process, with your permission and due credits.
[ZenFone 2 General] ycavan:
I think that's a wonderful idea! :)
[ZenFone 2 General] pijiman:
Well, I got everything compiled just fine; I did change a few flags tho (namely --disable-assertions and -- enable-optimized). It took a few minutes to compile everything on my desktop (i5 2500k @ 4.2GHz on Arch Linux x86_64). I did, however, run into troubles trying to install Arch with Linux Deploy. It just kept failing at one point or another while downloading the necessary files. I'll post here again when I have more news on this.

Also, I can't find where does CPU-z identify the processor as family X model Y, but regardless of this, if /proc/cpuinfo says it's a family 6, model 90, I believe that by just adding the model to the Hosts.cpp file should do the trick, I'll confirm when I have everything up and running. If it actually works, I think you should submit a patch request to the LLVM team :)

EDIT: Arch is working fine. LXDE keeps crashing most applications with the error:

Other applications however, work just fine, like XTerm. Anyway, I'm compiling LLVM within the chroot environment. Hope everything works.

Any clue as to why almost everything is crashing on LXDE?
[ZenFone 2 General] ycavan:
Wanted to give a little shout-out to another Linux enthusiast: http://xdaforums.com/zenfone2/general/launch-pc-software-services-t3179852

With llvm-pipe & glshim from that post, glxgears seems to run fairly well. In the TurboVNC session, it hits around 90-120 fps when logged in from my laptop.

I ended up compiling both glshim & glues since it doesn't take long.

OTOH, Wine still can't create a proper OpenGL window to work with. Still, it looks like we're moving forward little by little :)
[ZenFone 2 General] rbrewer123:
Command-line ssh client in android?

ycavan, I followed your instructions and got 32-bit ubuntu 15.04 working with MATE desktop. With a fair bit more effort I got 64-bit ubuntu installed and made a pull request for xserver-xsdl which should get enabled in the next version of Linux Deploy.

So far running emacs under xserver-xsdl has been painful with a virtual keyboard, but it looks more promising to just run it under a plain terminal with ssh (I'm using VxConnectBot). I think the terminal emulation on Android Terminal Emulator is even better and may support mouse clicks in the terminal. Unfortunately I can't find a way to run a plain ssh command-line binary from the android side inside Terminal Emulator. Any ideas?
[ZenFone 2 General] ycavan:
I think there is a busybox-based shell for the terminal emulator called kbox. I don't use it, but it sounds like what you want.

http://www.kevinboone.net/kbox3.html
[ZenFone 2 General] rbrewer123:
Thanks for the tip, that's a neat package that I hadn't seen before. I couldn't seem to get its installer to work, perhaps because it's compiled for ARM. Its docs are very good, especially the "how it works" section, and it helped me learn enough to ask the question "if I'm rooted and have an Ubuntu distro installed, why can't I just run binaries in that environment directly?"

It turns out Linux Deploy has a handy command to do that. Here's what I did:

Start linux environment via Linux Deploy

Start Terminal Emulator

inside Terminal Emulator, become root and enter Linux Deploy chroot

$ su -
# cd /data/data/ru.meefik.linuxdeploy/linux
# ./bin/linuxdeploy shell

become normal user inside chroot

# su - android

From there, it's off to the races. I fiddled with the TERM environment variable (not sure if that was needed or not yet) and started emacs. Emacs does color syntax highlighting within the terminal. Within emacs I ran the command "M-x xterm-mouse-mode" to enable it to receive mouse clicks from the terminal. (In the default Terminal Emulator settings, VolumeUp-E gives you Escape, so to get an emacs "M-x" you do VolumeUp-E-x). In the Terminal Emulator app, in Preferences, I enabled "Send mouse events", set the Control Key preference to use the VolumeDown button, and enabled "Alt Key sends ESC".

It's actually not too bad using emacs in that configuration. I'm able to click anywhere on the screen to move the mouse to that position. By dragging my finger up and down, emacs scrolls the window up and down. With the control key as VolumeDown, it's pretty easy to enter a lot of commands. The "meta" key is a little more difficult since it must be simulated with VolumeDown-E. (Although Alt works fine with a bluetooth keyboard). Terminal Emulator has a preference to make the "back" button send Escape to the terminal but that closes the virtual keyboard instead on my setup. One gotcha is that sometimes the terminal layout gets confused when you switch to another android app and back. C-l (aka ctrl-l) in emacs will make it redraw.

---------- Post added at 19:46 ---------- Previous post was at 19:10 ----------

My Linux Deploy app just received an update from the play store and it appears to support 64-bit intel processors out of the box for at least Ubuntu (amd64), Arch (x86_64), and Fedora (x86_64) distributions (those were the only ones I checked in the GUI).
[ZenFone 2 General] ycavan:
I'm actually going to try running a 32-bit distro on my phone & use another pc to compile the kernel on.

I notice that the Android shared libraries are all 32-bit, so I may as well see if there isn't some way to connect to them. Right now, the closest thing we have access to is libhybris, which requires recompiling bionic. I wonder if we can get the CM guys to compile a modified system for us? ;) ( I've asked for help patching bionic on Android 5.0, but the libhybris guys don't seem to want to respond on github. ) Anyway, if we can get libhybris working, the shared libraries are all 32-bit & I don't think we can get our 64-bit distros to play well w/o running a 32 bit chroot. >.< ( inside a chroot? lol )
[ZenFone 2 General] DrGit:
I was messing around with libhybris recently, and the Jellybean bionic patch looked simple enough to adapt for Lollipop. This may not be 100% correct, but it's a start. Apply this over CM12.1 bionic: http://pastebin.com/aEyBGhBZ. I haven't had much luck or patience compiling all of CM12.1 just for libhybris - my laptop's 240GB SSD has far more important things than Android sources, and it's always filling up. I did at one point get the most important components to compile, and the resulting binaries segfaulted less than the prebuilt ones - Ubuntu's libhybris targets KitKat for Ubuntu Touch.

I really doubt we're going to get PowerVR drivers to work with libhybris in a chroot any time soon. EGL communicates with a window system, be it SurfaceFlinger in Android or anything running over HWComposer wrapped by libhybris, such as Wayland or Mir - there doesn't seem to be a simpler way than a significantly modified X server (whether X.org or something written from scratch) to get libhybris to speak directly to X11 and wrap GLX/desktop OpenGL calls to EGL/GLES. In order for Regal to work, the lower level parts of the stack need to be in place - without a working libhybris and the right Android binaries (copying Android system libraries into a chroot is a recipe for dependency hell!) we can't run a compositor/windowing system, and without that Regal won't do us much good.

I've attempted to work around this by booting Linux natively (just updating boot.img with a modified kernel and initramfs pointing to a microSD partition with 32-bit Ubuntu) in order to run KDE Plasma 5.4, which now supports running KWin as a Wayland compositor over HWComposer/libhybris and should allow XWayland and Regal to work. I couldn't get kwin_wayland to start in a chroot or natively though - I read somewhere it has a hard dependency on systemd, though I don't know how accurate that is - and I haven't had much time lately to debug. Running the libhybris tests under strace gave me a headache - it's mind-blowing how many Android-isms the drivers expect, although I shouldn't be so surprised. For example, if you don't bind mount /dev - specifically, /dev/socket - from Android to the chroot, all the tests either hang or crash because they can't write messages to Android's system log which show up in logcat. Naturally, when Linux boots natively, /dev/socket has to be created manually, and I haven't figured out how to do that.

I'm not sure how much more patience I have for this, especially considering that it appears ImgTec trying to be more open was a PR move not backed up by reality - that is, the other 99% of company management opposed to opening up drivers. It doesn't look like the driver developer job listing is a reason for hope either - substituting random numbers in the URL pulls job listings that were probably posted 5-10 years ago and are no longer open for hire.

TL;DR try the patch, run the libhybris tests under strace, and keep posting your progress. I'm moving on to other things for the moment.
[ZenFone 2 General] ycavan:
Something else I've recently noticed, X will kind of start up using Arch Linux after recompiling Gold, LLVM & Mesa on a 32-bit distro. Nothing shows up on the phone but, it does start. ( I attached the X.org.log )

I was able to install VirtualGL and do a $ vglrun es2gears_x11 under TurboVNC with that X running. Without X running, vglrun returns that it can't connect to display :0.

That's not the surprising thing, though... I tried the same thing with XServer-XSDL running & vglrun works there as well. Seeing that XServer-XSDL is an Android app, I wonder how hard it would be to modify that source to open up the wonderful world of OpenGL & OpenCL to our chroot?

The highest fps I was able to reach w/ vglrun tying into XServer-XSDL was around 150 fps when I was tapping the screen while the gears were turning. Weird, huh?
[ZenFone 2 General] TenchiMasaki:
I am getting an error compiling mesa:

llvm/invocation.cpp:25:45: fatal error: clang/Frontend/CompilerInstance.h: No such file or directory #include <clang/Frontend/CompilerInstance.h>

I did put clang in llvm/tools directory, but it doesn't seem to be picking it up...

UPDATE: put link to clang in mesa/include that helped, but now I get:

CXX llvm/libclllvm_la-invocation.lo

In file included from ../../../../include/clang/Frontend/FrontendAction.h:24:0,

from ../../../../include/clang/CodeGen/CodeGenAction.h:13,

from llvm/invocation.cpp:28:

../../../../include/clang/Frontend/ASTUnit.h:17:27: fatal error: clang-c/Index.h: No such file or directory

#include "clang-c/Index.h"

I even tried installing libclang-dev and libclang1-3.6. I am compiling under ubuntu 15.04 amd64 on my Zenfone. Same thing happened when compiling on i386.

UPDATE2: Missed clang-c in llvm directory and linked in mesa include and it finally compiled completely and installed.

Now I am getting this error running es2gears_x11:

LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb

I assume I didn't change the files correctly?
[ZenFone 2 General] ycavan:
Yeah, it looks like LLVM is still not returning that you have a silvermont ( slm ) processor.

Did you install both LLVM & Mesa?
[ZenFone 2 General] TenchiMasaki:
Yes I installed both LLVM & Mesa, wonder if force returning slm always would work?
[ZenFone 2 General] ycavan:
can't really hurt; we're running linux on our phones, no real need to be overly concerned w/ all of the other processors.
[ZenFone 2 General] TenchiMasaki:
Nope didn't work forcing it either, does 2GB Zenfone 2 use slightly different processor maybe?
[ZenFone 2 General] ycavan:
which version do you have & what does /proc/cpuinfo say?
[ZenFone 2 General] TenchiMasaki:
I have 2GB RAM 16GB internal memory ZE551ML version:

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 90

model name : Intel(R) Atom(TM) CPU Z3560 @ 1.00GHz

stepping : 0

microcode : 0x34

cpu MHz : 500.000

cache size : 1024 KB

physical id : 0

siblings : 4

core id : 0

cpu cores : 4

apicid : 0

initial apicid : 0

fpu : yes

fpu_exception : yes

cpuid level : 11

wp : yes

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 syscall nx rdtscp lm c

onstant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf

pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse

4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat ep

b dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms

bogomips : 1996.80

clflush size : 64

cache_alignment : 64

address sizes : 36 bits physical, 48 bits virtual

power management:
[ZenFone 2 General] DrGit:
CPU detection for Silvermont was fixed in LLVM 3.7, which is available in the Arch testing repository, so no need to patch LLVM anymore. I'm getting 200FPS in glxgears with Xorg/fbdev/x11vnc in a chroot, with two processor cores manually disabled even - not too terrible, but probably still unusable for any demanding games. I haven't measured CPU usage with glxgears running - or anything else using OpenGL, for that matter - but it could be low enough for emulating some older game consoles. Or not. I need to go to bed :p
[ZenFone 2 General] rbrewer123:
Clean Master killing apps, and fix

It seems that a recent update to Clean Master was resulting in most of my Android apps, including Terminal Emulator for Android and Linux Deploy, to be killed whenever my phone went to sleep. This was annoying because I had to restart my terminal programs which required some typing and fiddling.

The fixes, as suggested by joel.maxuel on another thread where I asked about this, were to add all apps to the Clean Master whitelist. After verifying this fixed the issue, I used Disable Application from the play store to freeze Clean Master and Clean Master S-KEY so I wouldn't have to add any new apps to the whitelist. My linux terminal apps (mainly emacs) once again stay running forever on my phone.
[ZenFone 2 General] ycavan:
I've compiled a 64-bit libandroid-shmem.so for those of you who use Arch x86_64 with XServer-XSDL. This shared object creates a shared memory space between your linux application and XServer-XSDL.

usage:

LD_PRELOAD=/location/of/file/libandroid-shmem.so the_app_to_run

ie, if you saved the file to ~/bin and you want to run mplayer to play a movie

LD_PRELOAD=/home/android/bin/libandroid-shmem.so mplayer my_movie

The link is in the OP.
[ZenFone 2 General] 1boy1dr:
Is it possible to get openGL on ubuntu or debian?

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] ruleh:
Installing " libgl1-mesa-swx11" (and/or libgl1-mesa-glx) should give you some opengl capabilities (software rendering only).
[ZenFone 2 General] 1boy1dr:
I tried installing libgl-mesa-swx11 and it didn't have an installation candidate. It said another package replaces it, so I installed that. Now what? GL still doesn't seem to work and I tried with VNC and I tried installing VirtualGL and using xsdl xserver.

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] ruleh:
Can you say which package replaces it?
[ZenFone 2 General] 1boy1dr:
erm, no, I forgot [emoji15]

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] 1boy1dr:
Ok, I was trying to apt-get install it again to see what replaces it, it said the package wasn't found. Turns out I was just misspelling it, it's replaced by libosmesa6

sent from my Asus Zenfone 2 running CyanogenMod 13

---------- Post added at 10:25 AM ---------- Previous post was at 10:24 AM ----------

On ubuntu 15.10

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] 1boy1dr:
Didn't mean to reply
[ZenFone 2 General] Longcheng:
Wget issue, cyanogenmod 13

On Cyanogenmod 13 I ran into an issue with the default wget not working properly. This can be fixed by installing meefiks Busybox and choosing "replace applets" in the settings, and reinstalling the applets.
[ZenFone 2 General] StridAst:
Anyone manage to get wine working? It crashes every time I try to install something. Tried under arch Linux and Ubuntu both. Same result. Tried a couple different versions of wine. What am I missing?
[ZenFone 2 General] opas350:
Hi, I'm trying to install ubuntu in CM13, but I'm having some problems. After the setup when I press install it mount the partition then then this messages appears:

Intalling Debian-based distribution:

I: Retrieving Release

<<< install

Then nothing occurs, I've waited to see if something else happens but nothing.

Any Ideas? Do I need a kernel different to the stock CM13 kernel?

Thanks.
[ZenFone 2 General] ruleh:
Try installing meefik's busybox.

If it still doesn't work, enable debug mode in linuc deploy and post that output when it fails.
[ZenFone 2 General] 1boy1dr:
I'm assuming you're using Linux deploy. I had the same issue after the app updated. Goto https://github.com/meefik/linuxdeploy/releases and grab 1.5.3 or earlier.

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] opas350:
Thanks but installing a different version of Linux Deploy worked, But thanks for your help.

Thanks, This worked and now have installed Ubuntu. :)
[ZenFone 2 General] 1boy1dr:
No problem

sent from my Asus Zenfone 2 running CyanogenMod 13
[ZenFone 2 General] poVoq:
Very interesting stuff so far! Any further developments on this?

I would guess the 58-60 fps in xsdl are in fact vsynced to the screen refresh?

Is there an easy way to use Miracast or dlna to transmit the screen? Is it possible to transmit an off screen linux desktop while keeping android on the mobile screen or using it as a keyboard or touchpad?

Cool would be if this could be developed into something like what Intel showcased earlier this year: Big Screen Experience. Or alternatively MaruOS which is probably using the same apps we have here.
[ZenFone 2 General] ruleh:
libhybris

I compiled cm12.1 with libhybris and compiled the libhybris libraries.

By using the libhybris libGLESv2 I can get up to 1100fps in es2gears in an arch linux chroot using a vnc session.

When enabling display composition, the frame rate drops to roughly 100, which is even lower than with the llvm gles library.

However when using the libhybris library, es2gears is completely black without any actual gears.

I would say it is related to the EGL library which I can not get working yet. (It gives an "illegal instruction" error.)

There is a somewhat convoluted solution to this:

start a vnc server in the linux chroot

use a vnc viewer on a pc to connect to the vnc server

connect the pc to a big screen

move the vnc viewer window to the big screen

use any wireless keyboard/mouse app to control the pc and the vnc session that runs on it

(I personally prefer a usb connection and the USB Keyboard app)
[ZenFone 2 General] Runnerman2:
How do you compiled libhybris?
[ZenFone 2 General] doublesupersteve:
Thanks for the guide, if I replace the ZF2 I think I will use it as a small server instead of fixing the screen and selling it.... amazing what we can do with phones these days
[ZenFone 2 General] FabbiX:
Hello guys!

I'm new to xda so please forgive me if I make some mistakes.

I've got a Zenfone 2 with linux inside (I have used debian-noroot for the installation) and I managed to run minecraft using opengl!

Even if is very slow and is a quite glitched (only grayscale and a little stretched) it runs fine.

What I have done is using an old mesa driver and reconfiguring display settings with xrendr tool.

As I can, I will post a complete guide.

Edit: another thing... and if we uses a lwjgl compiled with regal instead of opengl? In my opinion it could be an easy way to have native opengl es render with minecraft. I've made an issue on both lwjgl and regal repositories, waiting for answer