Saturday, December 2, 2017

Ubuntu 17.10 running on Lenovo Yoga 920 with HiDPI and touch screen support


I resized the windows partiton to the minimun necessary (100G), disabled secure boot and I also remove bitlocker key encryption on windows drive, this allows Ubuntu to see that partition and allow windows to boot with secure boot disabled, without complaning.

This makes everything go easier if you want to keep windows arround on the same disk and dual boot with Ubuntu, you should do this it helps a lot. Even after you disable this, you can re-enable it back, both secure boot and bitlocker key encryption.

Before installing on windows updates resize your windows partition, installing all windows updates will not alow you to gain as much space as possible. After resizing the windows partition to the minimium size you want, install all windows updates, bios and driver updates.

I upgraded all windows updates to the latest version and all drivers to the latest version and upgraded the bios on windows to the latest version before installing Ubuntu, I don't think this makes much difference but at least I did it to make sure I have the latest firmware on all components and latest bios before installing Ubuntu.

To get to the bios press and hold Fn+F2 (bios) or Fn+F12 (USB boot devices), or insert a clip on the small orifice next to the power button while the laptop is powered off.

On reboot, it seems I had no wireless. A simple blacklisting of the ideapad_laptop module, for now, gets things working.

Everything else seems to be working fine.

Works:
  • all special keys
  • keyboard lights
  • bluetooth, WiFi
  • trackpad
  • touch screen
  • keyboard and mouse pad are disable in tablet mode
  • camera
  • hibernate
  • hidpi
  • pen works like a mouse, but there no apps on Ubuntu that I know that use the pen, using gnomes-boxes I tried windows 10 using sketchbook and it is slow, but it works fine.


Not Working:fingerprint reader
  • fingerprint reader
  • screen rotation not working, while in tablet mode.


Dual Boot Setup
  • Before installing any windows updates, bios or driver updates, resize your windows partition in windows to the minimun size you want, otherwise windows updates might constrain the amount of free disk space you can reclaim. I reduced the windows partition size (to 100Gb) using Disk Management utility to the desired capacity to make space for Linux.
  • http://www.everydaylinuxuser.com/2015/11/how-to-shrink-windows-10-to-make-space.html
  • Disable secure boot in bios, use your windows bitlocker key from windows website to be able to boot windows and after that remove secure block key encryption from you windows partition. This will make it much easier, see online instructions is easy. (optional step)
  • Download and install all windows updates. The pre-installed Lenovo service utility prompts to update the firmware.  I went ahead with it.
  • To get to the bios press Fn+F2 (bios) or Fn+F12 (USB boot devices), or insert a clip on the small orifice next to the power button while the laptop is powered off.
  • Boot with Ubuntu Live-USB from USB 3.1 port. I installed Ubuntu in the UEFI mode.
  • Using the installer, I created 2 partitions. (root installation, /home) and perform Ubuntu installation.
  • On reboot, it seems I had no wireless. A simple blacklisting of the ideapad_laptop module, for now, gets things working. "/etc/modprobe.d/blacklist.conf"
  • The dual boot setup is now ready! Upon rebooting, the UEFI boot menu shows options to boot into Linux or windows. With Kernel 4.13 in Ubuntu 17.10, most of the things work out of the box as a laptop. (only fingerprint reader and tilt sensor for tablet mode are not setup out of the box)
  • I haven't yet fiddled around to see if it correctly works in the tablet mode.

Touchpad


I increased the speed, enabled "tap to click", "two finger scrooling". and on gnome-tweak enabled click method to "fingers".

References:

https://www.scrye.com/wordpress/nirik/2017/11/02/lenovo-yoga-920-the-overdetailed-fedora-linux-review/

Friday, December 1, 2017

How to resize a Windows VM image with virt-resize qcow2

Notes

apt install libguestfs-tools virt-manager gnome-boxes

Check for snapshots and delete them:

qemu-img info win10.qcow2
qemu-img snapshot -l win10.qcow2
qemu-img snapshot -d 4  win10.qcow2

 Resize:

qemu-img info win10.qcow2
qemu-img resize win10.qcow2 +23G

List partitions, select partition to get the new size, resize that partition

sudo virt-filesystems -hl -a win10.qcow2
Name       Type        VFS   Label            Size  Parent
/dev/sda1  filesystem  ntfs  System Reserved  500M  -
/dev/sda2  filesystem  ntfs  -                39G   -
/dev/sda3  filesystem  ntfs  -                843M  -

qemu-img create -f qcow2 win10_63G.qcow2 63G
sudo virt-resize --expand /dev/sda2 win10.qcow2  win10_63G.qcow2


References:

https://mike42.me/blog/how-to-resize-a-windows-vm-image-with-virt-resize

Sunday, October 8, 2017

Ubuntu 17.10 review. Running with hidpi, touch screen and wayland support

Ubuntu GNOME 17.10



I think Ubuntu GNOME is the best flavor of Ubuntu if you are running in HiDPI mode 3200x1800 with a touchscreen. All screen captured images are at HiDPI resolution.

Since I prefer the standard gnome-session experience, I installed the "gnome-session" package and rebooted the system. And on the cog icon next to the sign in button, select the "GNOME" instead of ''Ubuntu" option before clicking the sign in button.

sudo apt install gnome-session

Touchpad


I increased the speed, enabled "tap to click", "two finger scrooling". and on gnome-tweak enabled click method to "fingers".

Touch support

Ubuntu gnome support for touchscreen is pretty good on the desktop.
Chromium browser supports touch screen very well and much better than Firefox without any plug-ins.
In my Yoga pro 2, the windows key on the screen panel works as the windows key on the keyboard.
Screen rotation is supported on the new gnome and disables the keyboard when the yoga is used as a tablet, but not the touchpad, side lock rotation button works to lock the screen in a certain rotation.

Screen HiDPI support

Ubuntu will boot with full resolution HiDPI and touch screen support enabled, brightness keys, resolution keys and, option keys to turn off the screen, all work.

You can change the resolution in the settings to another resolution in case you don't want to use HiDPI, selecting 1920x1080 that should give you a good scale ratio on the Yoga Pro 2.




Software

Ubuntu uses Firefox as the default browser, I installed chromium since I like it better, I also changed the default to be the native gnome experience which I think is better than the Ubuntu changes made to gnome-shell.

I also installed most of Gnome apps, Gnome games, gnome-boxes and Virtual Machine manager, described in the last section to have some relaxing and productivity apps. I have done a blog post earlier on how to install windows on gnome-boxes and make run as fast as possible with virtio drivers.


I also installed Skype, Spotify and Google Chrome browser and all applications work well in the new Ubuntu 17.10.

I setup Cisco VPN using open connect with support for "Cisco Secure Desktop trojan" to access my company VPN, all is working great.

Ubuntu is using Wayland graphical server by default and I don't notice much difference between Wayland and Xorg, seems a bit slow with 2 monitors, but It might be because of hi-dpi on both screens since before I was using 1080p resolutions.

I also installed gnome-tweak and added the minimise button to all windows, as you can see from the screenshot.

Camera, Sound, Keyboard, Sleep, WifiBluetooth, USB3

Camera, sleep, wifi, Bluetooth, USB3, side sound button up/down, keyboard background light works, Special Fn key mute, volume up, volume down, turn off screen, refresh, brightness up and down, menu key, keyboard light, airplane mode, all work as expected.

Fn key to show all screens works but it is a shortcut to Activities menu so you don't have to use the touchpad.

Tweaks to make some Apps work better with HiDPI 

Firefox, Chromium, Google Chrome, Skype, Thunderbird, Cheese, totem work great in HiDPI.

Blender, Gimp, Spotify, VLC, Pinta do not support hi-dpi properly.

Download links for Chrome, Spotify, Skype:

https://www.google.com/chrome/browser/desktop/index.html
https://www.spotify.com/us/download/linux/
https://www.skype.com/en/get-skype/

Work arround for Spotify:

Add --force-device-scale-factor=1.5 (or whatever fits your UI scale) as a command line option.

You could edit /usr/share/applications/spotify.desktop or wherever the .desktop file is located and change the line with Exec= to:

Exec=spotify --force-device-scale-factor=1.5 %U

Signal Messenger:
curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install signal-desktop





Get Chrome, Skype, Spotify from their websites, the download is well supported on Ubuntu.


Chromium supports the touchscreen better than Firefox if you wish to use it with the touchscreen, Chromium is the better choice,

If you use a HiDPI monitor such as Retina display together with another monitor, you can use AutoHiDPI add-on in order to automatically adjust  layout.css.devPixelsPerPx setting for the active screen.

If you use the touchscreen you should install Grab and Drag add-on to make Firefox more tablet friendly.

Reference for other applications on HiDPI

archlinux HiDPI documentation

Console

Configure larger font on tty console, leave all settings as they are, but for font select Terminus, and on the last one, where you can choose the size 16x32, and then reboot.

sudo dpkg-reconfigure console-setup

Reference: https://wiki.archlinux.org/index.php/HiDPI

Does not work out of the box

The Fn key to disable track-pad function on my Yoga Pro 2 does not work on Ubuntu.

Ubuntu extras and tools

sudo apt install ubuntu-restricted-extras

### DVD support
sudo /usr/share/doc/libdvdread4/install-css.sh

### Gnome utilities
sudo apt install pithos adwaita-icon-theme-full vlc bijiben polari gnome-weather epiphany-browser p7zip-rar p7zip-full unace unrar zip unzip sharutils rar uudeview mpack arj cabextract file-roller htop dconf-editor gnome-backgrounds gnome-bluetooth gnome-boxes gnome-calculator gnome-calendar gnome-clocks gnome-color-manager gnome-contacts gnome-control-center gnome-dictionary gnome-disk-utility gnome-documents gnome-logs gnome-maps gnome-music gnome-online-accounts gnome-photos gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-sound-recorder gnome-sushi gnome-system-monitor gnome-terminal gnome-themes-standard gnome-tweak-tool gnome-weather frogr vinagre ghex chromium-browser gnome-todo solaar




### Simple Games
sudo apt install gnome-chess five-or-more four-in-a-row gnome-klotski gnome-nibbles gnome-robots gnome-sudoku gnome-mahjongg gnome-tetravex iagno lightsoff quadrapassel swell-foop






### Video Editing, Flowblade video editor,Blender
sudo apt install openshot openshot-doc flowblade blender
sudo apt install kdenlive

### Video Editing Openshot
sudo add-apt-repository ppa:openshot.developers/ppa
sudo apt update
sudo apt install openshot-qt

### pitivi
### As user run 
flatpak install --user http://flatpak.pitivi.org/pitivi-master.flatpakref

### Install cinelerra
sudo add-apt-repository ppa:cinelerra-ppa/ppa
sudo apt update
sudo apt install cinelerra-cv

### Lightworks
### https://www.lwks.com/
### download and get the deb from the website
sudo dpkg -i lwks-14.0.0-amd64.deb
sudo apt --fix-broken install

### Other tools
sudo apt install clementine  picard

### Image editing
sudo apt install darktable gimp krita pinta blender

### Run windows or other linux versions inside Ubuntu
### See my other blog post on how to run Windows 10 inside gnomes-boxes
sudo apt install gnome-boxes
sudo apt install virtualbox

### Gnome development tools
sudo apt-get install gnome-builder glade gitg ghex

# flash
sudo apt install flashplugin-installer


Tuesday, August 22, 2017

Asus Chromebook C302 with Android Apps


I got an Asus Chromebook 302 that comes with an Intel core m3, 64Gb, 4Gb of memory.

Some problems I got on my device:

After I enabled the android app store the laptop started to reboot randomly. I tried removing the apps and switching chrome os channels, but it did not fix the problem.

So I decided to create a recovery SDCard using chrome recovery utility. I re-imaged the laptop with the SD card, using the instructions from the chrome recovery utility.

After that the laptop booted in stable channel, I update the laptop to the latest stable image.


List of Applications I am running:

Pandora, Yahoo Mail, Yahoo Messenger, Hangouts, Play Newsstand, Hangouts Dialer, Calendar, Photos, Npr One, Voxer, Twilight, Firefox, Youtube, Google wifi, Hipchat, 3Dmark.

Here is a screenshot running 23 Android applications at same time.


This is screen shot running twilight, for those of us missing a blue light filter.


3DMark and Octane

The score below is running in the ChromeOS dev channel. I only able to get octane scores between 15000-17000, but the machine still feels really fast.



UnKilled




Alto


The Asus Chromebook C302


This post was written on the Asus C302. I am very impressed with it and would highly recommend it.

Pros:
  • Amazing performance,
  • Very good build quality, a great keyboard, very nice screen, and just a premium solid feel to it
  • Android apps on
  • Great backlit keyboard (Mac-book Pro feel)
  • Convertible
  • Some Android apps like calendar, Pandora, photos, YouTube, Firefox support bigger screen, but most apps still don't, and these apps render in landscape or portrait more like they look on a phone, but without using the extra space of the big screen.
  • I like the USB C cable and being able to charge the laptop from both sides, avoids awkward cables when the charger is on the wrong side, like my other laptops.
  • Fanless, silent, love that.
  • Charging is fast.

Cons:
  • Android apps only support 2 sizes, full screen or phone size. In full-screen mode the majority of the apps are just a large super sized version of the phone version, offering very little extra functionality.

Saturday, April 29, 2017

Chrome OS advanced commands, settings, expert features

Chrome OS advanced commands, settings, expert features

All features described here where tested on a Asus C302 Chromebook, but should work on all Chromebooks, screenshots are from the Asus C302.

Recovery

Install new factory image for your chrome book
https://support.google.com/chromebook/answer/1080595?hl=en

Perform a Hard Reset

Go to settings select the reset section, you can do a reset or a powerwash.

Force-Boot Into Recovery Mode

If you’d like to reinstall Chrome OS and you don’t see the “Chrome OS is missing or damaged” message on your screen, you can force your Chromebook to boot into recovery mode.

First, turn off your Chromebook. Next, press Esc + Refresh on the keyboard and hold down the Power button. Your Chromebook will boot straight to recovery mode.

Enable Canary

First, turn off your Chromebook. Press Esc+Refresh+Power and, when the recovery prompt appears, press Ctrl+D and accept the prompt that appears to disable boot verification. When the Chromebook reboots, press Ctrl+D again. Please note that this will powerwash your Chromebook, so be sure all your local media files and screenshots are copied to Google Drive before you attempt this.

Once your Chromebook has ended up in developer mode and you log in, press Ctrl+Alt+T. This will get you to a "crosh" prompt. Type "shell" as mentioned above, then run "sudo su" to get to a root shell. Once running as root, run this command:

update_engine_client --channel=canary-channel --update

The first parameter ― "-channel=canary-channel" ― sets the channel to canary via the command line. The second ― "-update" ― will run a "ForcedUpdate" app version command, which will, as you'd expect, force an update without checking. It of course will take a while, so be patient. It's also not for the faint of heart, because the progress is shown as a long decimal between 0 and 1 instead of a percentage.


Revert back to verified mode

When you do end up logging in (you need to press Ctrl+D every time you reboot, of course, until the end of this step) you'll want to go back to verified mode for security reasons. So, when you are prompted to reboot when the update is completed, you'll see a prompt to hit the spacebar to disable developer mode. Press it, and you'll be back in verified mode.

Change Chrome OS flags


Features I enable:
  • Material design settings can be enable here (Enable all)
  • Experimental Chromecast support for Video Player
  • Simulated hardware 'Ok Google' features
  • Tab audio muting UI control
  • Print Pdf as Image
  • Android Wallpapers App 
  • Show Android Files app 
  • Media Remoting during Cast Tab Mirroring

Manage google cast devices

chrome://cast/#devices




Tools

System Info Viewer

SSH terminal


Do a barrel roll

When you hit the Reload button, the Chrome OS browser refreshes the active web page. Hold down Alt+Ctrl+Shift while pressing it, and you’ll see a much more entertaining effect.

Key commands

Press Ctrl+Alt+/ within Chrome OS to view a handy visual guide.

The Chrome OS keyboard is designed to be simple, but if you’re used to a desktop keyboard, you may feel like you’re missing several useful keys. The good news is that almost all of them can be simulated in Chrome OS by pressing the right key combinations:

Applications

Task Manager           Search+Esc
File Manager            Shift+Alt+m
Message Center        Shift+Alt+n
Status Menu              Shift+Alt+s
Stylus tools               Shit+Alt+p

Screen shot

Screenshot                Ctrl+Switch window
Screenshot region     Ctrl+Shift+Switch window
Screenshot window  Ctrl+Alt+Switch window
Print Screen              Ctrl+Switch Window

Monitor

Swap primary Monitor      Alt+Full screen
Mirror Monitor                  Ctrl+Full screen
Rotate Screen 90 degrees  Shift+Altf+Refresh

Useful Keyboard shortcuts

Caps Lock                Alt+Search (press again to cancel, or hit Shift)
Page Up/Down         Alt+Up/Down or Search+Up/Down
Home/End                Ctrl+Alt+Up/Down or Search+Left/Right
Del                           Alt+Backspace or Search+Backspace
Insert                        Search+>
F1-F12                      Search+1/2/3/4/5/6/7/8/9/0/-/=

You can reconfigure the behaviour of certain keys from the Keyboard Settings dialog, accessible from the main Settings page. There’s also a huge number of additional shortcuts available.

Terminal (crosh)

Open a terminal by pressing Ctrl+Alt+T

Find debugging commands: help
help_advanced

top
tracepath
dmesg
route
uname
ping

Trace a network path (like traceroute or tracert):

tracepath www.google.com

To run standard network diagnostics:

network_diag 





References:
http://strawn-04.blogspot.in/2013/12/chromebook-howto-update-to-hidden.html

https://chrome.google.com/webstore/detail/pnhechapfaindjhompbnflcldabbghjo
https://chrome.google.com/webstore/detail/pnhechapfaindjhompbnflcldabbghjo

Sunday, April 23, 2017

Ubuntu GNOME 17.04 running with HiDPI and touch screen support

Ubuntu GNOME 17.04 running with HiDPI and touch screen support










See my previous post on how to install Ubuntu on Yoga Pro 2 for Ubuntu GNOME 16.10.

I think Ubuntu GNOME is the best flavor of Ubuntu if you are running in HiDPI mode 3200x1800. All screen captured images are at HiDPI resolution.

Touch support

Ubuntu gnome support for touch screen is pretty good on the desktop shell.
Chrome browser supports touch screen very well and much better than Firefox without any plug-ins.
The windows key on the screen panel works as the windows key on the keyboard.
Screen rotation is supported on the new gnome and disables the keyboard when the yoga is used as a tablet, side lock rotation button works to lock the screen in a certain rotation.



 What works

Almost everything works great out of the box, there isn't many changes you need to do.
UbuntuGnome ships with gnome 3.24 and will boot with full resolution HiDPI and touch screen support enabled

Screen HiDPI support

Brightness, resolution keys, option keys to turn off the screen  all work.

You can change the resolution in the settings to another resolution in case you don't want to use HiDPI, selecting 1920x1080 that should give you a good scale ratio on the Yoga Pro 2.

Camera, Sound, Keyboard, Sleep, Wifibluetooth, USB3

Camera, sleep, wifi, Bluetooth, USB3, side sound button up/down, keyboard background light works, Special Fn key mute, volume up, volume down, turn off screen, refresh, brightness up and down, menu key, keyboard light, air-plane mode, all work as expected.
The windows touch logo on the touchscreen workssmall side lock rotation button works.

Fn key to show all screens works but it is a shortcut to Activities menu so you don't have to use the touch pad.

Does not work out of the box

The Fn key to disable track-pad function.

Tweaks to make some Apps work better with HiDPI 

Firefox, Google ChromeChromium, Cheese, totem work great in HiDPI.

Get chrome from google web site, or use chromium

sudo apt-get install google-chrome-stable

Chromium/Chrome  supports the touchscreen better than Firefox if you wish to use it with the touchscreen Chromium is the better choice.

Skype for Linux Beta works great in Hidpi.

For Thunderbird  works great in Hidpi.
Firefox

Open Firefox advanced preferences page (about:config) and set parameter layout.css.devPixelsPerPx to 2 (or find the one that suits you better; 2 is a good choice for Retina screens).
If you use a HiDPI monitor such as Retina display together with another monitor, you can use AutoHiDPI add-on in order to automatically adjust  layout.css.devPixelsPerPx setting for the active screen.

If you use the touch screen you should install Grab and Drag add-on to make Firefox more tablet friendly.

Reference for other applications on HiDPI

archlinux HiDPI documentation



Console

Configure larger font on tty console, leave all settings as they are, but for font select Terminus, and on the last one, where you can chose the size 16x32, and then reboot.

sudo dpkg-reconfigure console-setup

Reference: https://wiki.archlinux.org/index.php/HiDPI

Ubuntu extras and tools


sudo apt-get install ubuntu-restricted-extras

### DVD support
sudo /usr/share/doc/libdvdread4/install-css.sh

### Gnome utilities
sudo apt-get install adwaita-icon-theme-full vlc bijiben polari gnome-weather epiphany-browser p7zip-rar p7zip-full unace unrar zip unzip sharutils rar uudeview mpack arj cabextract file-roller htop dconf-editor gnome-backgrounds gnome-bluetooth gnome-boxes gnome-calculator gnome-calendar gnome-clocks gnome-color-manager gnome-contacts gnome-control-center gnome-dictionary gnome-disk-utility gnome-documents gnome-logs gnome-maps gnome-music gnome-online-accounts gnome-photos gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-sound-recorder gnome-sushi gnome-system-monitor gnome-terminal gnome-themes-standard gnome-tweak-tool gnome-weather frogr vinagre ghex chromium-browser gnome-todo




### Simple Games
sudo apt-get install gnome-chess five-or-more four-in-a-row gnome-klotski gnome-nibbles gnome-robots gnome-sudoku gnome-mahjongg gnome-tetravex iagno lightsoff quadrapassel swell-foop





### Video Editing
sudo apt-get install openshot openshot-doc
sudo apt-get install kdenlive

### pitivi
### As user run 
flatpak install --user http://flatpak.pitivi.org/pitivi-master.flatpakref

### Flowblade video editor
### https://code.google.com/archive/p/flowblade/downloads
### sudo dpkg -i flowblade_0.12.0-1_all.deb
### sudo apt --fix-broken install

### Install cinelerra
sudo add-apt-repository ppa:cinelerra-ppa/ppa
sudo apt-get update
sudo apt-get install cinelerra-cv

### Lightworks
### https://www.lwks.com/
### download and get the deb from the website
sudo dpkg -i lwks-14.0.0-amd64.deb
sudo apt --fix-broken install

### Other tools
sudo apt-get install clementine minitube picard



sudo apt-get install blender

### Image editing
sudo apt-get install darktable gimp krita pinta

### Run windows or other linux versions inside Ubuntu
### See my other blog post on how to run Windows 10 inside gnomes-boxes

sudo apt-get install gnome-boxes
sudo apt-get install virtualbox

### Gnome development tools
sudo apt-get install gnome-builder glade gitg ghex

# flash
sudo apt-get install flashplugin-installer


References

How to install Cura 2.X on Ubuntu 17.04


How to install Cura 2.X on Ubuntu



Cura is not available on ubuntu Repositories on version 17.10.

The resolution: To fix this issue you will need to install a PPA repository.

How to get this archive working properly is found here https://launchpad.net/~thopiekar/+archive/ubuntu/cura

rm -f ~/.config/cura/*
rm -f ~/.local/cura/*
sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt install cura cura-plugins-all cura-extra-plugins-all


Sunday, March 19, 2017

A Look inside the Asus C302 chromebook

Here are some internal pictures of the Asus C302 chromebook.
You will need to remove the back feet to be able to open it. The feets are glued and there is a screw under each foot.
Asus C302 is a 64 Gb disk, 4Gb of ram, Intel core m3 model.

















Ubuntu 25.04 desktop review and apps to install

Ubuntu 25.04 This new version of Ubuntu installs without a glitch in my ThinkPad X1 and Yoga 920, I setup this device with dual boot with wi...