Ubuntu 16.04 - Installation on HP Stream 13


dropcap hpstream13

HP Stream 13 is very light, compact and affordable laptop. Its overall design is also quite good.

Technically speaking, it holds an Intel Celeron N2840 Dual-core CPU, 2 Gb of RAM, a 32 Gb eMMC and a 13' display with Intel HD Graphics.

So, it is a perfect laptop to run Ubuntu instead of the preinstalled Windows.

This short article explains how to install Ubuntu 16.04 LTS 64bits on a HP Stream 13 and how to tweak it to have a very smooth Ubuntu experience on this laptop.

1.  BIOS setup

As usual, first thing to do is to set the Bios boot order to boot from USB media first.

Ubuntu 16.04 LTS installation can be done with HP Stream default BIOS setup where UEFI and Secure boot are enabled.

You can access BIOS by pressing ESC in fast series on boot-up. You will get a list of options where F10 is BIOS access.

In the Bios menu, check that boot mode is set to UEFI (this should be the default configuration). 

Here is my BIOS configuration before Ubuntu's installation :

hpstream13 bios setup


2. Installation

As this laptop is not having any CD/DVD player, installation should be done thru a bootable USB Key.

You just need to prepare a bootable USB key from a Ubuntu 16.04 LTS Desktop 64bits ISO (with Unetbootin for example).

Installation process should run very smoothly, without any special trick to be applied.

3. Wifi

It seems that HP Stream laptop are shipping with many different type of Wifi adapters.

On my HP Stream, wifi adapter is a Realtek rtl8723be :

# lspci
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
# lsmod | grep wifi
rtlwifi 77824 2 rtl_pci,rtl8723be
mac80211 737280 3 rtl_pci,rtlwifi,rtl8723be
cfg80211 565248 2 mac80211,rtlwifi
# modinfo rtl8723be
parm:   swenc:Set to 1 for software crypto (default 0)
parm:   ips:Set to 0 to not use link power save (default 1)
parm:   swlps:Set to 1 to use SW control power save (default 0)
parm:   fwlps:Set to 1 to use FW control power save (default 1)
parm:   msi:Set to 1 to use MSI interrupts mode (default 0)
parm:   debug:Set debug level (0-5) (default 0) (int)
parm:   disable_watchdog:Set to 1 to disable the watchdog (default 0)

This Wifi adapter works Out Of the Box, but it shows some stability issues.

As an example, the laptop froze while doing a complete dist-upgrade.

To increase wifi stability, it is necessary to change some default behaviour of the driver.

You need to deactivate all power saving options and hardware encryption. In details you should :

  • set software crypto
  • disable firmware control power save
  • disable software control power save
  • not use link power save

All these options can be set thru this configuration file :


options rtl8723be fwlps=0 swlps=0 ips=0 swenc=1

Easiest way to create this file is thru command line :

# echo "options rtl8723be fwlps=0 swlps=0 ips=0 swenc=1" | sudo tee /etc/modprobe.d/rtl8723be.conf

After next reboot, your wifi adapter should be pretty stable.

4. eMMC Tweaks

Ubuntu updates file metadata when files are accessed.

As these updates involve some write accesses and have almost no interest on a desktop.

We can avoid it with noatime parameter. With this parameter, access time to files won't be tracked at all.

To apply this tweak, the only thing to do it to edit /etc/fstab and to add noatime to / mount options.


# / was on /dev/mmcblk0p2 during installation
UUID=2c7d95eb-6dcc-4db8-9d2b-9aca7c3b05f1        /     ext4     noatime,errors=remount-ro     0       1

Linux supports TRIM, which is important for maintaining the performance of an SSD over time as files are added, deleted and changed and lets the SSD know which blocks can be safely cleared. In Ubuntu 16.04, trim is enabled automatically, thru a cron job.

Even if this approach is quite acceptable, it isn't the most efficient to my point of view. In fact, it is advisable to run the trim command as soon as you boot your laptop. It hardly slows the boot process and recoverable disk space becomes fully usable again rather quickly.

Trim command will be added at the end of /etc/rc.local, which is run at every boot. It should be added for every ext4 partition, other than swap, as it's already being trimmed automatically by the system.


# trim of / filesystem
fstrim /

exit 0

5. Minimize Swap Usage

By default Ubuntu creates a swap partition according to your memory size. With 2 Gb of memory, you should rarely use swap. The notable exception is systems which make use of the hibernate feature.

For SSD or eMMC using a swap partition, it is advisable to reduce the swappiness of the system thus avoiding writes to swap.

The value we will setup is the percentage of free memory before the system will start to use swap. We will set it to 1 so that system almost fills up full memory before swapping.

# sudo sh -c "echo 1 > /proc/sys/vm/swappiness"

To make it persistent across reboot, we need to modify /etc/sysctl.conf to add that key :


# minimize swap use to a minimum

6. Enable zRam Compression

On a computer with an average amount of RAM,  you might achieve better results by enabling zRam kernel module. This optimization is not necessary, but recommended.

zRam creates a compressed swap file in your RAM, so that you increase your RAM. This compression will give you some extra RAM without need to start to swap on the eMMC disk. When the system has filled the RAM swap, it'll start swapping on the eMMC as before. It comes to the cost of some CPU load to handle compression/decompression, but overall it should be much more responsive than normal swap.

On Ubuntu, zRam comes with the kernel, but package zram-config needs to be installed to enable it. Package installation takes care of all the configuration process and provides an optimized configuration according to your laptop specs.

# sudo apt-get install zram-config

After next reboot, zRam should be operationnal.

You can check it with following command :

# cat /proc/swaps
Filename    Type    Size    Used     Priority
/dev/zram0    partition    755740    8104    5
/dev/zram1    partition    755740    8004    5

7. What is working ?

By default, Ubuntu activates Processor microcode firmware for Intel CPUs provided by iucode-tool package.

Performance wise, it plays 720p HD YouTube video without any glitch. But 1080p video are too heavy for the processor, they skip too much to be really playable.

Here is a list of what has been tested :

  • Trackpad : works
  • Sound : works
  • Webcam : works
  • Wifi : works
  • Bluetooth : works

Most function keys are working Out Of the Box :

  • F2 : decrease screen luminosity
  • F3 : increase screen luminosity
  • F6 : sound mute on/off
  • F7 : decrease sound volume
  • F8 : decrease sound volume
  • F12 : enable/disable bluetooth and wifi adapter

You can now fully enjoy the Open Source spirit from your HP Stream  !

Hope it helps.

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus