Hey all! Just wanted to share my latest findings with you guys about HDMI out on Linux. As you may know, HDMI out does not work on Linux yet. There are several changes to hwcomposer driver that need to be made for it to work (see
https://www.oesf.org/forum/index.php?showto...709&hl=hdmi ). This is my work around to have HDMI out on Gemian. The idea is based on chroot on top of Android, so it is not ideal, but works. This means that it will only work if you dual boot Android (rooted) and Gemian. For pure Gemian users or non-rooted Android, this won't work. In short words, the idea is to mount Gemian partition on Android, and then chroot into Gemian from Android. Since HDMI out works on Android, it will work on Gemian after you have chroot'ed from Android. Here is my step by step to have it working.
1. You must have rooted Android and Gemian installed, in dual boot mode. On my device I have Android 7 on boot1 and Gemian on boot2.
2. Identify your Gemian partition from Android. Termux will be useful to play around mounting partitions. On my setup Gemian partition is on /dev/block/mmcblk0p29. If your setup is similar to mine, it is very likely that your partition is also in the same place.
3. Install Linux Deploy on Android. This app is very handy for chroot setups as it will configure everything automatically for you. If you don't know what chroot means, don't worry, you don't need to know. If you're curious, check wikipedia.
4. Configure Linux Deploy:
Containerization Method: chroot
Distribution: debian stretch
Architecture: arm64
Installation type: partition
Installation path: [put your partition here] In my case -> /dev/block/mmcblk0p29
Enable Init, ssh, PulseAudio and GUI over VNC
5. On Linux Deploy, click on configure. It will run some configurations, and some of them will fail. That's ok for now.
6. On Linux Deploy, click on Start to chroot into Gemian. Your system won't be accessible from GUI yet, so you need to ssh into it to finish configuration. Use your favorite ssh app to ssh into Gemian.
7. Our chrooted Gemian cannot resolve DNS because /etc/resolv.conf links to a location maintained by Connman. Since we don't use Connman on our chroot environment, it won't work. To fix it, backup your resolv.conf and create a new one:
sudo mv /etc/resolv.conf /etc/resolv.bak
sudo nano /etc/resolv.conf
[INSIDE NANO]
nameserver 8.8.8.8
[Ctrl + X to exit and save the file]
8. At this point, network will be working and you can ping
www.google.com, but apt will still fail to install packages. This is due to a security measure on Android that prevent apps to create sockets if they are not part of a specific group. To fix that you need to add apt to a group with gid 3003. Usually, this group already exists in your system and it is called aid_inet. If you don't have this group in your system, you will have to create it first:
addgroup --gid 3003 aid_inet
If aid_inet already exists (you can check if it exists looking at /etc/passwd file) just add _apt to it:
usermod -g aid_inet _apt
9. Done! Now your system is fully functional. Exit ssh, go back to Linux Deploy, stop the container, and click on Configure again. Now it should configure everything with no errors. Then you just start the container again to have GUI working through VNC.
10. Install VNC Viewer to be able to connect to the VNC server running on Gemian. Once installed, add a new connection to localhost and connect.
Tips:
HDMI on Android always matches the resolution of the display panel. This can be problematic since there aren't many monitors with native 2160 x 1080. At the very least you will have a 1080p image with black bars on top and bottom of the screen. My solution to that was to use a little app called Screen Shift to force the display panel resolution to anything you want. Then I make it match the resolution of my monitor, and when I connect the HDMI cable, the image fills the entire screen.
Another useful tip is to change the VNC resolution on Linux Deploy to match the display as well. Then you will have Gemian desktop displayed in full screen on the monitor.