5,604,122 Members 49,770 Now Online
XDA Developers Android and Mobile Development Forum

[Kernel] X11 support in Ubuntu Touch for Galaxy Nexus (maguro)

Tip us?
 
dim319
Old
#1  
Junior Member - OP
Thanks Meter 8
Posts: 10
Join Date: Jan 2012
Prompt [Kernel] X11 support in Ubuntu Touch for Galaxy Nexus (maguro)

As you know there is no support for X11 in Ubuntu Touch with default CM10 kernel. To be more correct: there is no VT (virtual terminal) devices in Ubuntu Touch at Android layer. So you can install X11 but you can't run it! I decided to fix it and made kernel with VT support. Now it's possible to run X11 server and your favorite desktop environment. However there are some bugs with it: qml-phone-shell (which is Touch Shell) renders at top level and X11 - at bottom. Still you can interact with both of them: Touch Shell on phone and X11 over VNC. Another bugs are green tint on phone display and slow x11 render.

X11 over VNC:
Click image for larger version

Name:	x11vnc.jpg
Views:	3715
Size:	145.5 KB
ID:	1802110

Installation:
1. Get Kernel:
boot.img

2. Flash it with fastboot:
Code:
fastboot flash boot boot.img
3. And now you can install X11, x11vnc and desktop environment (e.g.: xfce4):
Code:
sudo apt-get install xorg x11vnc xubuntu-desktop
4. Also you need valid config for X11:
99-omap.zip

5. Unrar it and put to device:
Code:
adb push 99-omap.conf /data/ubuntu/usr/share/X11/xorg.conf.d/99-omap.conf
6.Reboot phone

7. Set password for x11vnc server:
Code:
x11vnc -storepasswd <your_passwd>
8. Start x11vnc server:
Code:
sudo x11vnc -dontdisconnect -notruecolor -noxfixes -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/phablet/.vnc/passwd
Now you can connect to device with VNC Client.
The Following 4 Users Say Thank You to dim319 For This Useful Post: [ Click to Expand ]
 
BukaKing
Old
#2  
Member
Thanks Meter 17
Posts: 46
Join Date: Mar 2011
How does this compare in performance to using a remote X server, as in this thread
http://forum.xda-developers.com/show....php?t=2161884

With that method I found most applications to perform decent except QtCreator.

Having to render the x server on the phone itself I would think wouldn't perform that fast.
 
dim319
Old
(Last edited by dim319; 15th March 2013 at 07:31 PM.)
#3  
Junior Member - OP
Thanks Meter 8
Posts: 10
Join Date: Jan 2012
Quote:
Originally Posted by BukaKing View Post
Having to render the x server on the phone itself I would think wouldn't perform that fast.
That's true. X Server on phone slow enough and your way is better. Perhaps this one is alternative and require only VNC client or not require client at all. If you stop qml-phone-shell, X11 will be rendered to device. So this kernel is for testing purpose only.
 
eudoxos.eu
Old
#4  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Mar 2013
Thumbs up VNC?

Great achievement. Can you run Xserver on its own dedicated VT when VT switching is enabled? What is VNC needed for in this scenario?

I will report a bug at launchpad so that the upstream (ubuntu-touch) kernel enables VT switch.
 
dim319
Old
#5  
Junior Member - OP
Thanks Meter 8
Posts: 10
Join Date: Jan 2012
Quote:
Originally Posted by eudoxos.eu View Post
Can you run Xserver on its own dedicated VT when VT switching is enabled? What is VNC needed for in this scenario?
You mean to use another tty? That's possible, since there lot of them. VNC server and client will be same (e.g. x11vnc and UltraVNC).
 
eudoxos.eu
Old
#6  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Mar 2013
Quote:
Originally Posted by dim319 View Post
VNC server and client will be same (e.g. x11vnc and UltraVNC).
The X11 server can't talk to the GPU directly, even without acceleration? In that case you could drop VNC completely.
 
-schumi-
Old
(Last edited by -schumi-; 16th March 2013 at 01:25 PM.)
#7  
-schumi-'s Avatar
Junior Member
Thanks Meter 3
Posts: 14
Join Date: Feb 2012
Location: Muinch
Quote:
Originally Posted by dim319 View Post
qml-phone-shell (which is Touch Shell) renders at top level and X11 - at bottom.
You can stop phone-shell with
Code:
service ubuntu-session stop
I installed gnome on my SGS2 GT-I9100 (worked without modifying kernel from http://forum.xda-developers.com/show....php?t=2188621 ), now I can start gdm with:
Code:
service gdm start
I have some trouble with onscreen keyboard in gdm (onboard), but you can enable autologin in /etc/gdm/custom.conf
Code:
[daemon]
# Enabling automatic login
  AutomaticLoginEnable = true
  AutomaticLogin = phablet
With this /etc/X11/xorg.conf even the touchscreen works (in a laptop-touchpad way):
Code:
Section "ServerLayout"
    Identifier    "Layout0"
    Screen        "Screen0"
    InputDevice   "cyttsp-i2c" "CorePointer"
EndSection

Section "InputDevice"
        Identifier "cyttsp-i2c"
        Driver "multitouch"
#       MatchIsTouchpad "true"
#	Driver "evdev"
        Option "CorePointer" "true"
        Option "SendCoreEvents" "true"
        Option "Device" "/dev/input/event2"
        Option "Protocol" "Auto"
        Option "Rotate" "CW"
EndSection


Section "Device"
    Identifier    "Card0"
    Driver        "fbdev"
    Option        "fbdev" "/dev/graphics/fb0"
    # rotate screen to be in sync with touchpad orientation
    Option        "Rotate" "OFF" # OFF=0 CW=90 UD=180 CCW=270
EndSection


Section "Screen"
    Identifier    "Screen0"
    Device        "Card0"
EndSection
(don't forget to install xserver-xorg-input-multitouch for touchsceen!)


Unfortunately I messed up my packaging system (didn't work because no space left on device, now even apt-get install -f can't repair it ), so i will have to try again i guess...
The Following 2 Users Say Thank You to -schumi- For This Useful Post: [ Click to Expand ]
 
eudoxos.eu
Old
#8  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Mar 2013
Default no VT needed?

Quote:
Originally Posted by -schumi- View Post
You can stop phone-shell with
Code:
service ubuntu-session stop
I installed gnome on my SGS2 GT-I9100 (worked without modifying kernel from http://forum.xda-developers.com/show....php?t=2188621 ), now I can start gdm with:
Code:
service gdm start
Does that mean that I can run xorg on Nexus 10 with the official preview images - if I stop ubuntu-session, which occupies the only virtual terminal? (Sorry for perhaps a dumb question, I don't want to re-flash ubuntu-touch over CM again just to try that).
 
dim319
Old
#9  
Junior Member - OP
Thanks Meter 8
Posts: 10
Join Date: Jan 2012
Quote:
Originally Posted by eudoxos.eu View Post
The X11 server can't talk to the GPU directly, even without acceleration? In that case you could drop VNC completely.
The X11 works with framebuffer (which is fb0), not with GPU. You can use VNC to view X11 from phone to host. X11 can be viewed on phone without VNC.

Quote:
Originally Posted by -schumi- View Post
You can stop phone-shell with
Code:
service ubuntu-session stop
I installed gnome on my SGS2 GT-I9100 (worked without modifying kernel from http://forum.xda-developers.com/show....php?t=2188621 ), now I can start gdm with:
Code:
service gdm start
I see. This is better than making new kernel, and require only correct config for xorg. I saw few solutions: one from BukaKing,one with Xvfb, mine kernel, and yours is best one!
 
AdamOutler
Old
#10  
AdamOutler's Avatar
Recognized Developer
Thanks Meter 9431
Posts: 5,126
Join Date: Feb 2011
Location: Louisiana

 
DONATE TO ME
I've worked around the virtual terminal issue by linking PTMX in the past.


just make a new Virtual Terminal device
Code:
rm /dev/ptmx
mknod --mode 666 /dev/ptmx c 5 2
/bin/dbus-uuidgen --ensure
Flash with Odin on Windows, Linux and Mac. Use JOdin3, Available in a web browser or offline
Check out my developer pages. Add me to your circles on Google Plus.

The Following User Says Thank You to AdamOutler For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Wearables Walkthrough: Tasker on the Samsung Galaxy Gear – XDA Developer TV

The future certainly looks like it is full of wearables. … more

WinDroid HTC Toolkit Lets You Root, Unlock, and Flash ROMs on Various HTC Devices

Plenty of users nowadays have more than one mobile device. … more

When Using GitHub, Don’t Skimp on Commit History

GitHub has become the epicenter of most open source development work that is posted … more

Verizon Droid DNA to Receive 4.4.2 KitKat + Sense 5.5 OTA This Thursday

The HTC Droid DNAis Verizon’s close cousin to the JapaneseHTC … more