Hardware: HP EliteBook Revolve 810 G1 with Ubuntu Linux

From Luky-Wiki
Revision as of 19:38, 25 January 2014 by Lukas Dzunko (talk | contribs) (Linux Compatibility)

Jump to: navigation, search

Hardware

Name HP EliteBook Revolve 810 Tablet
Processor 3rd Generation Intel® Core™ i7-3687U (2.1 GHz, 4 MB L3 cache, 2 cores)
Up to 3.30 GHz with Intel Turbo Boost Technology
3rd Generation Intel® Core™ i5-3437U (1.9 GHz, 3 MB L3 cache, 2 cores)
Up to 2.90 GHz with Intel Turbo Boost Technology
3rd Generation Intel® Core™ i3-3227U (1.9 GHz, 3 MB L3 cache, 2 cores)
Chipset Mobile Intel® QM77 Express (vPro support on i7 and i5 processors)
Display 11.6-inch diagonal LED-backlit HD UWVA display (1366 x 768)
Ultra- Wide-viewing angle
Capacitive multitouch screen with digitizer
Tough, durable Corning Gorilla Glass 2
Memory Up to 12GB but only 8GB recommended (4G module soldered on board)
Disk Up to 256GB mSATA (SSD)
Optical Drive none
Graphics Intel HD Graphics 4000
Network (LAN) Integrated Intel 82579LM Gigabit Network Connection (vPro configurations)
Network (WLAN) Intel Centrino Advanced N 6205, (2x2) a/b/g/n
Intel 802.11 a/b/g/n (2x2) +Bluetooth Combo
Network (WWAN) HP un2430 EV-DO/HSPA Mobile Broadband Module with GPS support
HP hs2350 HSPA+ Mobile Broadband Module with GPS support
Sensors Accelerometer
Compass
Ambient Light Sensor
Near Field Communication (NFC)
Ports DisplayPort – One (v1.1a)
Stereo headphone/microphone combo jack – One
Power Connector – One
Side Docking Connector – One
RJ-45 (Ethernet) – One
USB 3.0 – One
USB 3.0 Charging – One

More details:

Linux Compatibility

Note: Tested using Ubuntu 13.04

Device Compatibility Comments
Processor Working fine CPU scaling, fan/thermal control working fine
Internal Monitor Working fine monitor can be competently disabled by lowering brightness to level 'zero', see bellow
Touch Screen Working / problems Note 1 Problem resolved after upgrade to 13.10. (multi-touch is still not supported)
Disk Working fine Trim is supported, see bellow
Graphics Working Note 2
DisplayPort Working fine -
Sound Working fine -
Bulti-in Microphone Working fine -
Headphone Jack Working fine -
Microphone Jack Working fine -
Ethernet Working fine see problem with sleeping NW card bellow
Wireless Working / problems Note 3
Bluetooth Working fine -
WWAN Working / problems Note 4
USB Working fine -
Card Reader Working fine -
Webcam Working fine indication LED is also working fine
GPS . Note 5
Docking Station Working fine -
Touch Pad Working There is no middle mouse button and it is not possible to press both mouse buttons at once (HW limitation)
Suspend/Resume Working fine I tested only suspend to RAM. Hibernation is not supported with disk encryption.
Accelerometer n/a I will not test this device. Please let me know if you are using this component and it is working.
Compass n/a I will not test this device. Please let me know if you are using this component and it is working.
Ambient Light Sensor n/a I will not test this device. Please let me know if you are using this component and it is working.
Near Field Communication (NFC) n/a I will not test this device. Please let me know if you are using this component and it is working.

Linux Configuration

Problem with network

If you experiment with pre-installed Windows 8 and put system to sleep or plug cable later while notebook is running you may notice following problem. Linux detect network card properly. "Lights" on connector are shining but network is not working. Mostly likely Ubuntu report disconnected cable and in console you may see "NO-CARRIER".

While I was searching what is wrong with my new notebook and network card i found following problem. Once system is put into sleep and there is no need to have network card enabled then it is put to so called "deep sleep" mode. Unfortunately it is not woken up by driver properly in default configuration (according to bug report it should be fixed in future or it is already fixed). Workaround for this problem is really simple.

First of all you need to know device address of Ethernet controller:

root@lukas:~# lspci | grep Ethernet
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
root@lukas:~# 

In my case address of network card is "00:19.0". Power control device is located on /sys filesystem under /sys/devices/pciXXXX:XX/XXXX:XX:XX.X/power/control where X mean variable location depending on installation itself. Technically it should be same for all revolve notebooks but I'll put here complete information how to find it. Just in case someone face same problem also on different platform.

With find | grep combination it is easy to find correct "file":

root@lukas:~# find /sys | grep '00:19.0.*power/control'
/sys/devices/pci0000:00/0000:00:19.0/net/eth0/power/control
/sys/devices/pci0000:00/0000:00:19.0/power/control
root@lukas:~# 

File /sys/devices/pci0000:00/0000:00:19.0/power/control can contain following:

  • off - device is disabled
  • auto - device should work in automatic mode (this one is problematic)
  • on - device is fully enabled (e.g. it is not in sleep state even with no network cable)

If reading of power/control show "auto" then resolution of problem with network is simple:

root@lukas:~# echo on > /sys/devices/pci0000:00/0000:00:19.0/power/control
root@lukas:~# 

If cable was already plugged while you issue "echo on >" command then re-plug cable to trigger cable detection (nw manager, dhcp, etc.).

Brightness control

Brightness or backlight of integrated monitor can be modified in two ways. Via ACPI interface or via platform specific driver. Even there is way how this should work there is no standard defined and notebooks can differ. Revolve 810 notebook present to system both ways but the ACPI method is not working well. Actually changing "brightness" level via ACPI will put display to it's maximum. To fix this problem I switched my notebook to "platform" configuration which is working well.

First of all i checked if there is another method to change backlight level:

root@lukas:~# ls -1 /sys/class/backlight/
acpi_video0
intel_backlight
root@lukas:~# 

As expected it is :) So now notify kernel which one is correct. Kernel command line is configured in /etc/default/grub and i changed original:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

It is neccesary to issue update-grub to propagate changes:

root@lukas:~# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.8.0-27-generic
Found initrd image: /boot/initrd.img-3.8.0-27-generic
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found initrd image: /boot/initrd.img-3.8.0-19-generic
Found memtest86+ image: /memtest86+.bin
done
root@lukas:~# 

After next reboot brightness control should work well.

Add Brightness Control to Ubuntu Desktop

While working with this notebook in tablet configuration it is handy to have brightness control as applet near to clock, network, sound, etc. There is allready such a applet and details are here

Installation of it is simple:

add-apt-repository ppa:indicator-brightness/ppa
apt-get update && sudo apt-get install indicator-brightness

Note: Level 0 mean really zero light on Revolve notebooks. Please be aware that selecting Level 0 will disable backlight of display (can be used to temporary disable internal monitor and save power)

SSD configuration (enable use of TRIM functionality)

There is already bunch of articles describing TRIM functionality so i try to summarize only important stuff. If you are interested in good reading then try this article. SSD Disk should know which block are free to properly distribute write operation and don't bother with with deleting during write. Especially delete operation is time consuming so and if there is no "free space" know for SSD then it should go through full read-delete-write cycle.

To successfully use TRIM command it is necessary to have support for it on all I/O layers:

1. SSD Disk

root@lukas:~# hdparm -I /dev/sda
...
	   *	Data Set Management TRIM supported (limit 8 blocks)
	   *	Deterministic read ZEROs after TRIM
...

So disk is supporting TRIM command

2. dm-crypt layer (only if encryption is enabled)

Configuration of dm-crypt/luks is in /etc/crypttab. For security reason discard(trim) is disabled on this layer. You can check more in this article. To enable forwarding of trim command simply add discard to end of crypt configuration in /etc/crypttab:

sda5_crypt UUID=<some UID generated during installation> none luks,discard

To enable modification it is neccesary to rebuild initrd (update-initramfs -u) and reboot system:

root@lukas:~# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
root@lukas:~# 

After reboot there should be allow_discards keyword in output of following command:

root@lukas:~# dmsetup table /dev/mapper/sda5_crypt --showkeys
0 499611648 crypt aes-xts-plain64 <encryption key> 0 8:5 4096 1 allow_discards
root@lukas:~# 

3. LVM Layer

To enable forwarding of trim command on LVM layer it is necessary to enable issue_discards in /etc/lvm/lvm.conf

# [...]
devices {
   # [...]
   issue_discards = 1
   # [...]
}
# [...]

If it was not enabled then perform same step for recreation of initrd as for dm-crypt.

4. File system layer

Now it is time to check if everything is working well. Issue fstrim -v / and see output of it:

root@lukas:~# fstrim -v /
fstrim: /: FITRIM ioctl failed: Operation not supported

"Operation not supported" or similar error mean that there is something wrong and mostly likely some of I/O layer is not accepting TRIM command.

root@lukas:~# fstrim -v /
/: 239296339968 bytes were trimmed
root@lukas:~#

If there were some bytes trimmed then all I/O layers are forwarding trim correctly and now it is time to finalize setup.

5. Automatic trimming of free space

There are two options.

  • First is to instruct file system to trim data immediately after file they is deleted. I don't recommend this option as it cause several problems. Trimming is time consuming operation and if disk receive trim after each delete operation then this can cause performance degradation as disk will be busy trimming and other I/O operation will wait in queue. Additionally deleted file is immediately lost. With delayed trimming there is chance to recover deleted files.
  • Second option is to trim free space periodically from script. If there is reasonable free space kept on system this option is better as unused space will be trimmed at once and mostly likely it will be not noticed by user. To trim disk periodically i use following script for cron.weekly schedule:
root@lukas:~# cat /etc/cron.weekly/dofstrim
#! /bin/sh

(
  echo
  date -R
  for mount in / /boot
  do
    fstrim -v $mount
  done
) >> /var/log/fstrim.log 2>&1

# EOF
root@lukas:~# 

If you have more file systems (for example /home) then add them to "for mount in" line.

Log file should contain something like:

root@lukas:~# cat /var/log/fstrim.log

Thu, 15 Aug 2013 21:31:49 +0200
/: 441421824 bytes were trimmed
/boot: 150890496 bytes were trimmed
root@lukas:~# 

Note: i changed /boot from ext2 to ext4 in order to support fstrim.

SSD Checklist

Ubuntu 13.04 is already well configured but for reference I'll put here some things which should be checked while SSD i used.

FS mount options

Update of access time on files can create unnecessary writes and access time is mostly likely not used by users. Ubuntu use "relatime" which is good compromise between atime/diratime and noatime/nodiratime.

root@lukas:~# cat /proc/mounts | grep -e vg-root -e /boot
/dev/mapper/ubuntu--vg-root / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /boot ext4 rw,relatime 0 0
root@lukas:~# 

I/O scheduler

If your system contain only one SSD disk and you don't use external storage often, then it is good option to disable I/O scheduler. There is no need to reorder I/O commands to SSD disk as performance is not degrading with "seek" operation. To disable scheduler just add elevator=noop to your kernel boot parameters in /etc/default/grub (append to GRUB_CMDLINE_LINUX_DEFAULT). This is also OK if you occasionally use USB sticks.

Swap and swappiness

I have 8 GB of memory so during normal usage there will be no need to have swap space. As i will work also with memory consuming software (vmware, virtualbox, ...) i keep swap in case there will be huge demand on memory. Swap can reduce SSD's life so i modify vm.swappiness in way that kernel will swap only if really necessary.

root@lukas:~# grep vm.swappiness /etc/sysctl.conf 
vm.swappiness=0

Command to see if value is set correctly:

root@lukas:~# sysctl vm.swappiness
vm.swappiness = 0

Even more

There are many more ways to tune Ubuntu for SSDs. A few things which i omit:

  • partition alignment (Ubuntu’s partitioner is now working well)
  • move /tmp, /var/tmp and browser cache to memory (for me it is better to save memory)
  • disable journalling (I prefer data integrity and reliability over little bit extended SSD life)

For more configuration options you can check: 1 2 3 4 5 6 7

CPU frequency

By default Ubuntu use "ondemand" scaling governor when running on AC and "powersave" when running on battery. It is good configuration "as default" but can cause lot of unwanted noise and performance problems while running on battery. For the first try i am using this configuration:

Tools:

apt-get install cpufrequtils

Configuration in /etc/default/cpufrequtils:

ENABLE="true"
GOVERNOR="powersave"
MAX_SPEED="0"
MIN_SPEED="0"

This will ensure that system boot-up as quiet as possible and don't produce too much heat. So now it is quiet but what when i run CPU intensive application ? Solution is here: Application called "indicator-cpufreq". This application put small icon near to clock. Via this icon it is possible to adjust CPU frequency and scaling governor via few clicks (details can be found here Frequency Scaling Monitor).

Note: probably best way how to adjust CPU frequency and scaling is to use cpufreqd but let see if this will be acceptable solution :o)

System usage indicator

By default Ubuntu don't provide much details about resource usage. Simple cpy/mem/disk/swap/network indicator can be installed by:

sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload

More details: Things I did After Installing Ubuntu 13.04