Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

2016-12-16

iMacwear W1 First impressions

Good news: I managed to build, deploy and run OctoMY™ Agent without any changes to the source code! It crashed a few times, and I have a bad feeling that these crashes are due to out-of-memory. I really have not been able to debug that fully yet. Will continue in this trail soon. But it got past the delivery and having the Agent eyes looking back at me from the small screen is a delight!

OctoMY™ Agent running on iMacwear W1 Android Smart Watch


After my last post about the iMacwear W1 unboxing, I have now had some time to form a first impression.

At first I was not sure the devivce was actually running Android as it claimed, but I soon figured out that this is because it runs a custom version of Android called "FunOS". I have not managed to find any information about this OS online. But in practice it means that many stock Android applications have been replaced with less resource intensive and more compact ones.

The main UI and navigation makes sense once you get used to it, and getting used to it takes about 15 minutes. I find it lacking a bit in the aesthetics department, the icons are not well executed. But the UX is ok, and as we all know, form follows function!

I had some problems with getting the device to register with Ubuntu. The device reports the USB vendor of HTC with a device ID of 2008,  (0bb4:2008), so if you need a line for your Android udev.rules, it will look like this:

# iMacwear W1
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="2008", MODE="0666", OWNER="<username>"

I found that enabling developer options in the settings on device and installing mtpfs package helped a little, but it was still unstable.

sudo apt-get install mtpfs

In the end, just retrying a lot makes it work. Once it works it will work for some time. I also found you have to keep the pogo connector completely still the whole time, because just unsetting it a little will break the USB handshakje and the connection/debug session/whatever.


2016-09-02

How to get going with Vulkan & NVIDIA on Ubuntu 14.04 and 16.04

First, I found that there really was no support for Vulkan in Ubuntu 14.04 LTS, or at least without a lot of custom configurations that I would like to avoid. So I decided to upgrade my system to Ubuntu 16.04.
Getting started with Vulkan in Ubuntu with nVidia.


Next I tried to find my way by following a lot of different tutorials and advice. Nothing seemed to work for me, and getting Vulkan on my laptop was looking impossible until I decided to follow this simple advice. I decided to shamelessly steal his advice and add my own extra observations. So here are the steps:
  1. Open this page on your tablet/phone
  2. Hit <CTRL> + <F1> to go to a text-only terminal
  3. Log inn using your normal username and password
  4. Get rid of the old nvida drivers, libraries, configurations and other gunk (this step is optional, but if you tried some stuff before getting here it can be well worth it starting fresh): # sudo apt-get remove --purge nvidia*
  5. Add official ppa repository for vulkan: # sudo apt-add-repository ppa:canonical-x/vulkan
  6. Install nvidia driver that supports vulkan (NOTE: version 367 was recommended at the time I wrote this): # sudo apt-get install nvidia-367
  7. Install Vulkan libs: # sudo apt-get install libvulkan1 mesa-vulkan-dev mesa-vulkan-drivers
At this point you may reboot and try the vulkaninfo command from terminal to see what vulkan stuff is found in your system.

TIP: If you have a dual gpu setup which is common nowadays, your secondary inferior (usually Intel) GPU might get in the way of your Vulkan setup and this page shows you how to disable it.

Now it's time to look at and run some code. The official "wrangler lib" and SDK for Vulkan is called "LunarG" and it is not in the Ubuntu repos. It contains libraries, tools and example code for you to play with. You have to download it and unpack/build/install it the old fashioned way:

  1. Download the sdk from here: https://lunarg.com/vulkan-sdk/
  2. Once downloaded #chmod +x the file to be able to run it.
  3. Run the file, copy the extracted folder to some location and add the following path variables:
#export LD_LIBRARY_PATH=$HOME/VulkanSDK/1.0.21.1/x86_64/lib
#export VK_LAYER_PATH=$HOME/VulkanSDK/1.0.21.1/x86_64/etc/explicit_layer.d

You can put these in some script that is run on login or boot like ~/.bash_profile

NOTE: You may need to adjust the paths to match the location where you put the SDK. ~/.local/, /opt/ and /usr/local/ are good candidates.