Hardware: HP EliteBook Revolve 810 G1 with Ubuntu Linux

From Luky-Wiki
Revision as of 20:42, 1 May 2016 by Lukas Dzunko (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Warning: I no longer use this laptop as my primary device (April 2016). Therefore this page is no longer maintained and may become outdated.

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 15.10

Device Compatibility Comments
Processor Working fine CPU scaling, fan/thermal control working fine
Internal Monitor Working fine -
Touch Screen Working fine -
Disk Working fine Trim is supported, see bellow
Graphics Working fine -
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 Note 1
Bluetooth Working fine -
WWAN Working fine -
USB Working see note on port supporting offline charging -> Note 2
Card Reader Working fine -
Webcam Working fine -
GPS n/a -
Docking Station Working fine If you have docking station with two display ports then see Note 3
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 -
Compass n/a -
Ambient Light Sensor n/a -
Near Field Communication (NFC) n/a -

Note: I will not test devices marked as "n/a" in near future. If you use this device and/or know how well it work then let me know. Thanks.

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 network card 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

Note: Brightness control is working "out of box" on Ubuntu 15.04. I am leaving this only as reference for older versions.

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:

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

SSD configuration (enable use of TRIM functionality)

Note: Ubuntu 15.04 have all configuration and functionality enabled by default. I am leaving this as reference. I recommend to double check if everything is working vell.

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. Additionally if there is no "free space" know for SSD then it don't have other possibility than go through full read-delete-write cycle which is slow.

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 /
/: 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.

"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. Example:

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

5. Automatic trimming of free space

Note: Ubuntu 15.04 install and schedule "fstrim" script automatically. You get log output if you use my one.

There are two options.

  • First is to instruct file system to trim data immediately after file 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: Older installer use ext2 on /boot. This may prevent fstrim to work on it. My recommendation: convert this file system to ext4.

SSD Checklist

Ubuntu is already well configured but for reference I'll put here some things which should be checked while SSD is 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.

This is how it looks like on my laptop:

root@lukas:~# cat /proc/mounts | grep ext
/dev/dm-1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /boot ext4 rw,relatime,errors=remount-ro 0 0
root@lukas:~# 

I/O scheduler

Ubuntu use deadline as default scheduler (on SSD ?). This is good for SSD and most devices normaly connected to PC. If you have specific load or usage pattern then you may try to switch to "noop" which may be better. I don't recommend using CFQ. Cofiguration using CFQ is better for regular HDD.

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

Ubuntu changed way how CPU is scaled recently. Therefore tweaking is no longer necessary.

Anyway I like to see status of CPU and have possibility to select governor also after this change. Small applet will provide all details:

sudo apt-get install indicator-cpufreq

More details: Frequency Scaling Monitor

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: Frequency Scaling Monitor

Auto-mounting in X11 session

Automatic mounting is interesting feature but may not be convenient if you work with broken device and/or file system. I Prefer manual mounting so I disabled automatic one using:

  • this will disable automount:
$ gsettings set org.gnome.desktop.media-handling automount false
  • this will disable popup with action depending on inserted media:
$ gsettings set org.gnome.desktop.media-handling automount-open false

Note: Mounting via GUI using file manager is working also if you disable "automount".