Review: Running Linux on the HP Envy 14
Because I travel a lot for my job, I looked for a portable alternative to my DELL XPS M2010. As nice as the huge display was – the 20″ machine was just unsuited as cabin bagge or for mobile usage. Not even to talk of some very special examinations during the security checks on airports.
After very thorough research, my choice fell upon the HP Envy 14, which offers in my opinion the best compromise between portability, power and design. I bought it right away on the release day.
- Intel Core i5-520 2.4 GHz CPU
- 4 GB RAM
- 500 GB 7.200 rpm HDD
- Hybrid graphics(ATI MobilityRadeon HD 5650 1GB / Intel Arrandale)
- 14.5″ LED screen with 1600x900px resolution
Especially the screen is worth mentioning: The so-called “ultra radiance display” is a very bright screen with brilliant contrast and color gammut that is bright enough to work outdoor even though it has a mirroring surface. The additional “extras” of the Envy are the chassis, which is completely made of magnesium and alloy, the backlit island-style keyboard and the large button-less touchpad with multi-touch support (titled ClickPad by HP)
The price tag of 1299 EUR for a customer notebook places the machine in the premium sector. The price as well as the craftmanship make the Envy HP’s top of the customer line. The metal chassis is crafted precisely and looks so stylish that it is easily comparable with Apple devices or the some of the better Sony VAIO machines. On top comes a display, which is without doubt the best display I have ever seen on a notebook.
Compatibility with Linux 2.6.34
Linux runs on the machine without bigger hassle, what is astounding when you consider how new this hardware is. While the Windows drivers are always available when a device hits the market, can Linux developers often start testing and coding not until then.
I tested the Envy with the brand new openSUSE 11.3 and the latest release candidate of the upcoming KDE SC 4.5. You find a comprehensive compatibility check and some advice to get problematic components working below.
What runs out of the box:
- integrated graphics
- sound card
- LAN port
- integrated DVD/CD-ROM/RAM/RW slot-in drive
- SD/MMC card reader
What required some additional work:
- switching between integrated and discrete graphics
- wireless adapter
- multi touch support and button zones of the ClickPad
- making the mic work properly with Skype
What required fiddeling around:
- brightness control of the display
What causes trouble up until now:
- the proprietary ATI fglrx driver refuses to work
- distorted output for devices plugged to the DisplayPort
The wireless adapter
The used wireless adapter is unfortunately no intel card but a Broadcom BCM43224. Of all chipsets, this one is not supported by the free b43 kernel driver and requires a manual installation of the proprietary Broadcom wl driver. Some distributions already provide prebuilt packages but also compiling the driver yourself is not a big deal and doesn’t put even intermediate beginners into trouble. Do not forget to copy the firmware file into /lib/firmware after installation, then load the wl kernel module and enjoy your working wireless connection.
I still have the issue that the driver randomly refuses to report the signal strength even though the connection is still established and working. But this is a minor issue which should not be too much of a headache.
The missing signal is caused by the wireless adapter roaming between the different frequencies or the router (802.11b/g/n), not disconnecting but misleadingly reporting no signal. You can minimize this behaviour by limiting your router to the 802.11b/g bands, causing the wireless adapter to roam only every now and then for a few seconds.
The ClickPad works right after installation. Well – at least sort of because multi-touch and button zones are not working thus making clicking only possible with “tap to click”. Fortunately, Takashi Iwai is already working on kernel and XOrg patches although they did not make it into the kernel and XOrg yet. You can still make use of the current state of development (at least with openSUSE): Iwai provides a special repository with a patched kernel and XOrg driver.
The graphics adapters
While swtiching between the energy-saving integrated adapter and the powerful discrete adapter works on the fly in Windows, you need to restart the X server under Linux. Anyway: Thanks to the vga_switcheroo module coming with kernel 2.6.34, the switchable graphics is actually quite usable with Linux.
To try it for yourselves, you may use a script with GUI or access /sys/kernel/debug/vgaswitcheroo/switch directly with a shell:
- echo DDIS > /sys/kernel/debug/vgaswitcheroo/switch switches to the discrete adapter
- echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch switces to the integrated adapter
- echo OFF > /sys/kernel/debug/vgaswitcheroo/switchunpowers the unsused apdater (saves energy)
- echo ON > /sys/kernel/debug/vgaswitcheroo/switchpowers the unused adapter
Right after the installation, I notcied that the console remained black after the boot menu (the display turns off) before the KDE login screen appears. After some testing, I found out that is is due to the switchable graphics. It seems as running the i915 and radeon kernel modules causes some conflicts.
Fixing this is quite simply: Simply put the unneeded module (e.g. radeon) on the blacklist in /etc/modprobe.d and recreate the ramdisk with mkinitrd. Reboot to check whether it woked out.
Brightness control of the display
This problem was fixed in openSUSE ClickPad Kernel 2.6.35.
The most complicated part was getting the brightness control of the display to work. It insistently refused to work and none of the fixes found in the web showed any response. Looking into dmesg showed me, that the BIOS does not support the _BQC method that is needed for the brightness control to work.
This is where an Ubuntu developer saved me. The Envy 14 is not the only notebook with this flaw (actually some Dell machines have this, too), so a bu bug report already existed in Launchpad. Kamel Mostafa has written a patch, that enables brightness control for the i915 kernel module and provided a pre-compiled kernel. The kernel was useless with openSUSE but the patches were not.
With some work I managed to merge the patches into the ClickPad-enabled kernel-desktop package by Takashi Iwai, who luckily provided a kernel-desktop-devel containing the kernel sources. After some typing and a lot of waiting, the new kernel and its modules were compiled:
- copy patch to /usr/src
- cd /usr/src
- patch -p0 < kernel_i915_backlight_controls.diff
- follow this tutorial to compile kernel and kernel modules, then install and reboot
After having done this, there should exist a file named /sys/class/backlight/i915/brightness. If you write values between 0 and 9 into it, the brightness of the screen changes immediately:
echo -n5 > /sys/class/backlight/i915/brightness
But you also need to modify the XOrg counter part f the intel driver in order to having XOrg find the correct file to control brightness. Download the xf86-video-intel sources and apply this patch, which adds the correct path to the list of searched pathes. Now compile & install the sources and restart the X server.
You can measure success with:
- xbacklight -get should output the current brightness
- xbacklight -set [0 - 100] should modifiy the brightness
If xbacklight now works as expected, you can control brightness with the slider control of KDE’s battery plasmoid. And the power plans now are capable of controlling screen brightness, too.
Add the final polishment by assigning user-defined hotkeys to the FN-keys for brightness control. Assign custom commands: xbacklight -dec 20 (darker) repectively xbacklight -inc 20 (darker).
The microphone under Skype
With Skype all voices (no matter whether they are recorded with a plugged-in mic or the integrated array mic next to the webcam) are recorded 2 otaves too low. The reason is a resource conflict in ALSA. You can fix this by putting this .asoundrc file into your home directory and start Skype as follows:
ALSA_OSS_PCM_DEVICE=”skype” aoss skype
Of course you may put this call into a convenient shell script.
openSUSE does not seem to be the most energy-saving distribution around. You can optimize the power consumption from > 50W to a little more than 25W (with wireless) by following some of the hints by Intels powertop tool. But this is still far from the 13W that Windows 7 consumes while running on battery thus causing a disappointing runtime of 2.5h on battery while Windows runs >4h. Especially the wireless driver seems to be a battery eater. Let us hope that the Broadcom BCM433324 chipset gets supported soon by the free b43 driver.
The optional slice battery may help as it doubles the capacity of the internal battery. Still: 5h is not a great value in terms of mobility.
I found out that the ATI adapter eats battery even when the radeon module is not loaded. If you load the module and power the ATI adapter off as described above, the power consumption decreases dramatically. Now my notebook consumes about 9W idle and 13-15W while surfing with wireless, minimum display brightness and deactivated desktop effects. This power consumption matches the values measured with Windows 7. Now the Envy 14 runs more than 4h before switching off, yay! :)
You can wrench out the endmost drop out of the wireless drivers by reducing the reciever sensitivity:
iwconfig wlan0 txpower 25 (20 also works)
Thx to Alejandro for this advice!
Now I need to automate all power saving measures with a power plan. I will blog about this later.
The ATI drivers
The proprietary ATI fglrx driver refuses to work because it cannot deal with switchable graphics. It also does not yet support kernel 2.6.34, but this can be fixed by patching the install scripts. The big problem remains the changed memory address where the firmware resides. You cannot do much about it because this is closed source. Yet some kernel developers meanwhile try to modify vga_switcheroo that it also copies the firmware when switching graphic adapters. We just need to sit back and wait whether the kernel developers are successful or will fail due to the closed source.
Whether and when ATI addresses this problem with an updated driver remains unknown.
The free radeon driver works but does not yet support 3D acceleration, resulting in crappy desktop effects that are rendered with software method. This may be an option if you require the DisplayPort or HDMI output. But for everyday use, the Intel adapter is the better choice at the moment.
The DisplayPort and HDMI are only usable while running on the discrete graphics adapter but this limitation exists under Windows, too.
The free radeon driver finds both ports but the output is distorted. I have not examined this problem any further. But the output works with Windows and Linux can access the hardware which makes me optimistic that this issue can be solved sooner or later.
After two weeks I am still very happy with my purchase. All in all is the HP Envy 14 a good choice for Linux users. Compared to my DELL XPS M2010, the important components all work out of the box or with moderate work. I really can recommend the machine to everyone, even non-Linux users. HP managed to give PC enthusiasts a real Mac alternative.