The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Sailfish/ButterflyTouch

From Mer Wiki
< Sailfish
Revision as of 15:38, 10 March 2013 by Zeta (Talk | contribs)

Jump to: navigation, search

Work in progress. This is mostly inspired from the ExoPC tutorial, with adaptation for this hardware.

Contents

Install Sailfish SDK Emulator on ButterflyTouch

This page has instructions on how to install Sailfish SDK emulator on your Packard Bell Butterfly Touch.

It is a x86 (Intel SU4100 dual core x86_64) based laptop/tablet PC. It has a 11.6" resistive touch screen (1366x768). It uses a Intel GM45 Express Chipset.

Install Steps

USB key setup

  • Extract root filesystem from emulator virtualbox image
VBoxManage internalcommands converttoraw sailfishos.vdi sailfish.raw
  • Copy to flash key
sudo dd if=sailfish.raw of=/dev/sd* bs=4M
sync
  • Mount flash key
  • Edit /boot/extlinux/extlinux.conf to boot from sdb1 and add rootwait

Running on the ButterflyTouch

  • The following has been done with Ethernet cable plugged. Wifi activation could be added later on.
  • Place the USB key in ButteflyTouch
  • Boot, press F12 button to access boot device selection menu and select USB
  • Ctrl/Alt F2 - Login root/nemo here are our steps for your reference.
  • edit sshd to allow remote login
  • run /usr/sbin/sshd --daemon to launch the SSH server.

From now on, you can connect remotely to do the following (it allows copy/pasting the command from a browser and now typing by hand).

  • Install missing packets to run X server with the correct drivers.
    • Add the mer repository:
zypper ar http://repo.merproject.org/obs/home:/vgrade:/branches:/nemo:/devel:/hw:/x86-common/latest_i586/home:vgrade:branches:nemo:devel:hw:x86-common.repo
    • I had some trouble with the default path this gave me. I had to edit the repository and change it:
vim /etc/zypp/repos.d/home_vgrade_branches_nemo_devel_hw_x86-common.repo
# Comment the existing baseurl line :
#baseurl=http://repo.merproject.org/repositories/home:/vgrade:/branches:/nemo:/devel:/hw:/x86-common/latest_i586/
# and replace it by :
baseurl=http://repo.merproject.org/obs/home:/vgrade:/branches:/nemo:/devel:/hw:/x86-common/latest_i586/
    • Then install the missing packets
zypper in mesa-x86-generic-9.0.2-50.2
zypper in xorg-x11-drv-intel-2.21.3

Rebooting at this point gave me errors that I can see in Xorg log :

cat /var/log/Xorg.0.log | grep EE

If found out, it was looking for a i965 driver (strange, Fedora on this computer uses i915 module ?). A quick search provides the correct packet :

zypper search i965
    • Install the i965 drivers:
zypper install mesa-x86-generic-dri-i965-driver 
  • remove egl_gallium.so (ExoPC tutorial ask to remove also st.so, but this was not present on my system)
cd /usr/lib/egl/
mv egl_gallium.so egl_gallium.so.old
  • Edit to /usr/lib/systemd/user/lipstick.service to add Environment=QT_DEFAULT_RUNTIME_SYSTEM=
echo "Environment=QT_DEFAULT_RUNTIME_SYSTEM=" >> /usr/lib/systemd/user/lipstick.service
  • Add some variable to /var/lib/environment/nemo/50-jolla-ui
echo "EGL_PLATFORM=x11" >> /var/lib/environment/nemo/50-jolla-ui
echo "EGL_DRIVER=egl_dri2" >> /var/lib/environment/nemo/50-jolla-ui
echo "MCOMPOSITOR_USE_TFP=1" >> /var/lib/environment/nemo/50-jolla-ui
  • Set content of /etc/X11/xorg.conf.d/x86-vm.conf to :
Section "Monitor"
Identifier "Default Monitor"
HorizSync 30-100
VertRefresh 20-160
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Default Monitor"
DefaultDepth 24 
SubSection "Display"
# Viewport 0 0
Depth 24
EndSubsection
EndSection
Section "Device"
Identifier "Videocard0"
Driver "intel"
Option "AccelMethod" "sna"
EndSection
Section "Module"
Load "glx"
Load "dri"
EndSection
Section "DRI"
Mode 0666
EndSection
  • Edit /usr/lib/qt4/imports/Sailfish/Silica/ApplicationWindow.qml to set width/height 1366/768
//width: _transpose ? screen.height : screen.width
//height: _transpose ? screen.width : screen.height
width: 1366
height: 768
  • Put the display in portrait mode. Execute following command while logged in as user "nemo"
su nemo # to switch to nemo user
gconftool-2 --set /desktop/jolla/components/screen_rotation_angle --type int 90
  • reboot the system, press F12 to select boot from USB, and then it should boot to sailfish, with the graphical interface showing.

Running the silica demo

If the image has been prepared after a test with silica components demo has been run in the emulator, its files are already on the USB key.

They can be runned from ssh. Connect as nemo however ! (if runned as root, the theme is not the good one, it falls back to a simpler one).

su nemo # if connected as root
cd /opt/sdk/bin/
DISPLAY=:0 ./silicacomponentgallery 

Working parts

  • Touchscreen (for a short moment)
  • Touchpad (always)
  • General sailfish interface (for a moment)
  • The silica component demo (some elements not shown, do not use the touchscreen)

Here is a screen photo of the silica component demo, on the buttons page, running on the Butterfly Touch. (sorry for the bad quality, it is almost impossible to take a correct photo of this brilliant screen...):

SailFishOnButterflyTouch.jpg

Known issues

  • Touchpad works at the beginning, but quickly only change the cursor position, and don't interact with the interface
  • Interface seems to restart every 2 minutes, with segfaults in libQtGui.so for lipstick and mcompositer programs (messages can be seen from tty2), like below
lipstick[2160]: segfault at 8 ip 6e3d7fec sp 77d49580 error 4 in libQtGui.so.4.8.3[6e1de000+af5000]
mcompositor[...]: segfault at 8 ip ... sp ... error 4 in libQtGui.so.4.8.3[...+af5000]
  • Some elements are not shown. All the "glowing" things for example don't appear (dots at the top left that are used as bread-crumbs, lines under text buttons). This is probably due to the interface not being hardware accelerated, as it really looks like it is all shader related functions that are not here ?
  • Swipe from left to right or right to left doesn't give the app transparency to see the opened app and time or doesn"t put the application in background
  • When using the silica component demo, hitting the touchscreen gives a segfault. Using the touchpad works.
  • sensord log give a bunch of the following:
2013-03-10 15:04:59 [sensord] *WARNING* [nodebase.cpp:699:void NodeBase::setValid(bool)]: Node 'orientationsensor' state changed to invalid
2013-03-10 15:04:59 [sensord] *CRITICAL* [sensormanager.cpp:266:AbstractSensorChannel* SensorManager::addSensor(const QString&)]: orientationsensor instantiation failed
2013-03-10 15:04:59 [sensord] *WARNING* [sensormanager.cpp:202:void SensorManager::setError(SensorManagerError, const QString&)]: SensorManagerError: sensor has not been instantiated

This is also seen in the output of the silica component demo:

loaded the Generic plugin 
Loaded the MeeGo sensor plugin 
Requested sensor id ' "orientationsensor" ' interface not granted 
Requested sensor id ' "orientationsensor" ' interface not granted
Personal tools