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

Search This thread

dim319

Member
Jan 19, 2012
10
8
33
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:
x11vnc.jpg

Installation:
1. Get Kernel:
View attachment 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:
View attachment 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.
 

dim319

Member
Jan 19, 2012
10
8
33
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.
 
Last edited:

eudoxos.eu

Member
Mar 15, 2013
7
1
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.
 

-schumi-

Senior Member
Feb 22, 2012
50
53
Munich
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://xdaforums.com/showthread.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 :rolleyes: ), so i will have to try again i guess...
 
Last edited:
  • Like
Reactions: dim319 and BukaKing

eudoxos.eu

Member
Mar 15, 2013
7
1
no VT needed?

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://xdaforums.com/showthread.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

Member
Jan 19, 2012
10
8
33
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.

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://xdaforums.com/showthread.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!
 

bthom73

New member
Mar 24, 2008
1
0
Thanks for the info, great thread! I'm hoping to run a single dedicated X11 app, no real need for the original interface. That said, this seemed like a good starting point.

In case it helps anyone, attached is a kernel boot image I just built for a Nexus 7 wifi (Grouper) that has CONFIG_VT enabled. Ubuntu 13.04, kernel 3.1.10.

Thanks,
Brian
 

Attachments

  • boot.img
    4.9 MB · Views: 61

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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:
    x11vnc.jpg

    Installation:
    1. Get Kernel:
    View attachment 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:
    View attachment 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.
    2
    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://xdaforums.com/showthread.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 :rolleyes: ), so i will have to try again i guess...
    1
    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