Showing posts with label laptop. Show all posts
Showing posts with label laptop. Show all posts

Saturday, October 24, 2015

How To Enable AMD Radeon Dynamic Power Management (DPM) In Ubuntu 13.10


The open source AMD Radeon driver got dynamic power management support with Linux Kernel 3.11. With this, the GPU and memory clocks adjust dynamically based on load, useful for saving power.

This feature is not enabled by default, at least in Ubuntu 13.10 (it will probably be enabled by default in Ubuntu 14.04) so here's how to enable it.

I don't have an AMD graphics card so I couldn't test this, but failsdownloads reader towpik, who sent us this tip, says that using this feature, "the laptop is very cool and quiet. Finally!". Also, according to Phoronix, Radeon DPM is "fantastic for power use [and] thermal performance".

Please note that this will only work for Radeon HD 2000 graphics cards and newer.


Enable AMD Radeon DPM (Dynamic Power Management)


1. To enable DPM in Ubuntu 13.10, you need to open /etc/default/grub with a text editor (as root) - I'll use Gedit below:
gksu gedit /etc/default/grub
And in this file, search for the following line (it's on line 11 on my system):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
After "splash" add a space and then add this:
radeon.dpm=1
After making the changes, this is how this line should look:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"

2. Then save the file and run the following command to update the Grub:
sudo update-grub

3. And finally, reboot.

For Ubuntu 13.04 and older, you need a newer Kernel (since Linux Kernel 3.11 or newer is required) as well as an updated firmware. Since there are many things that can go wrong and I am not able to test this because I don't have an AMD graphics card, I won't post installation instructions for these here, but if you really want this, try these instructions.


Thanks to towpik for the tip, some info via Askubuntu
Read more »

Fix Brightness Getting Reset (To A Very Low Value Or Maximum) On Reboot In Ubuntu

If your laptop's brightness is not saved and is set to a very low value or to maximum, each time you reboot and / or when you log out, read on for a fix / workaround.

Ubuntu brightness

In both Ubuntu 14.04 and 14.10, my laptop's brightness is not saved between sessions and is reset to a very low value after every reboot or logout. I found a workaround (that works for both this issue as well as another issue which is basically the opposite: the brightness is set to maximum after restarting Ubuntu), but it was a bit confusing so I thought I'd improve the steps and share it with you.

Basically, the fix / workaround is to automatically set a custom brightness value each time you boot into Ubuntu. Let's proceed.

1. The first thing you need to do is to find out which ACPI interface (acpi_video) controls the brightness. This can be done by looking into your Xorg log file to see which acpi_video was loaded. To do this via command line, simply use the following command:
grep acpi_video /var/log/Xorg.0.log
The command above should display an output similar to this:
[     7.385] (--) intel(0): Found backlight control interface acpi_videoX (type 'firmware') for output LVDS1
where "acpi_videoX" is "acpi_video0" or "acpi_video1". This is the acpi_video that controls the brightness, so remember it for the next steps.

If the command above doesn't display any output and you have a folder called "intel_backlight" under "/sys/class/backlight/", then use "intel_backlight" as the ACPI interface for the next steps.

2. Next, set (via keyboard Fn + brightness keys) your laptop's brightness to the level you want Ubuntu to use after when it starts.

3. Now we'll have to get the actual brightness value you set under step 2. To do this, run the following command:
cat /sys/class/backlight/acpi_videoX/brightness
where "acpi_videoX" is the ACPI interface which controls your laptop's brightness, which you find out under step 1.

Remember this value for the next step.

4. The next step is to create a file (as root) called fixbrightness.conf in your /etc/init/ directory - I'll use Gedit below:
gksu gedit /etc/init/fixbrightness.conf

And in this file, paste this:
description "Sets brightness after graphics device is loaded"

start on graphics-device-added
task
exec /bin/echo BRIGHTNESS_VALUE > /sys/class/backlight/acpi_videoX/brightness
here, you need to:
  • replace BRIGHTNESS_VALUE with the brightness value you got under step 3;
  • replace acpi_videoX with the ACPI Interface that controls your laptop's brightness, which you found out under step 1.

Then save the file.

5. Reboot and the low or maximum brightness issue after reboot / logout should be fixed.


via AskUbuntu but I tried to improve the instructions
Read more »

Monday, October 19, 2015

Laptop Mode Tools 1.65 Released With Intel PState Support, Other Changes [PPA]

Laptop Mode Tools is a package that should extend your laptop's battery life by enabling the Laptop Mode Linux kernel feature along with other power-related tweaks.

The latest Laptop Mode Tools 1.65, released yesterday, includes important changes and bug fixes such as support for Intel PState driver and a more robust Runtime Power Management Framework that deprecates the usb-autosuspend module. That means that there should be less issues with USB devices such as mice / keyboards not working properly with LMT (if such issues still occur, you'll need to blacklist the device id or disable the runtime-pm and usb-autosuspend modules using the Laptop Mode Tools GUI).

Changes in Laptop Mode Tools 1.65:
  • fixed grep error on missing $device/uevent;
  • ethernet: replaced sysfs/enabled by 'ip link down';
  • wireless-iwl-power: sysfs attr enbable -> enabled;
  • wireless-iwl-power: added iwlwifi support;
  • Runtime Power Management Framework is more robust now. Deprecates module usb-autosuspend;
  • fixed multiple hibernate issue;
  • when resuming, LMT now runs in force initialization mode;
  • added module for Intel PState driver;
  • GUI: implemented suspend/hibernate interface.

Laptop Mode Tools GUI

I'm sure you'll say that the Laptop Mode Tools GUI is pretty ugly. And it is (let's hope it'll get better in a future release), but LMT didn't have a GUI until version 1.64 and users had to edit configuration files which made it a lot more complicated to use, so now it's at least easier to use. The GUI uses tooltips which explain what each option does.

Also, you're probably aware of TLP and you're wondering which one's better. Well, they both try to achieve the same thing and the results depend on many factors so I suggest you give both Laptop Mode Tools and TLP a try (not in the same time though, they conflict!) and see which one works better for you.


Install Laptop Mode Tools 1.65 in Ubuntu / Linux Mint


Laptop Mode Tools 1.65 is available in the failsdownloads Unstable / Backports PPA (because I can only test it in Ubuntu 14.04) for Ubuntu 14.10, 14.04, 13.10 and 12.04 / Linux Mint 17, 16 and 13 and derivatives, backported from Debian. Add the PPA and install the latest Laptop Mode Tools using the following commands:
sudo add-apt-repository ppa:failsdownloadsteam/unstable
sudo apt-get update
sudo apt-get install laptop-mode-tools
If you don't want to add the PPA, you can download Laptop Mode Tools deb files from HERE.

Once installed, it's probably best to restart your laptop.

The Laptop Mode Tools GUI needs to run as root so under Unity/GNOME, launch it using gksu (use kdesudo under KDE, etc.):
gksu /usr/sbin/lmt-config-gui
Note that after enabling/disabling some modules via the Laptop Mode Tools GUI, you'll have to restart your system.

The Laptop Mode Tools Ubuntu / Debian package comes with a menu entry (desktop file) but it doesn't work unless you edit it and add gksu, kdesudo, or equivalent tool you use.

For other Linux distributions, see the Laptop Mode Tools downloads page.

Report any bugs you may find @ GitHub.
Read more »

Tuesday, October 13, 2015

Power Management Tool `TLP` 0.8 Released

Ubuntu Laptop

TLP 0.8 was released recently, bringing various ThinkPad improvements, systemd "predictable network interface names" support along with other changes and bug fixes.

For those not familiar with TLP, this is an advanced power management tool that applies various settings and tweaks to help your laptop save battery power. The app tries to do everything automatically, depending on your Linux distribution and hardware (it runs in the background and doesn't come with a GUI) however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp

A complete list of TLP features can be found HERE.

Changes in TLP 0.8:
  • General:
    • TLP_DEFAULT_MODE: change default operation mode to AC when no power supply can be detected (concerns some desktop and embedded hardware only)
  • Radio Devices:
    • Resume: restore bluetooth state
  • Radio Device Wizard (tlp-rdw):
    • Support ThinkPad OneLink Dock Basic/Pro for dock/undock events
    • Detect systemd "predictable network interface names" for WWAN
  • ThinkPad Battery:
    • tpacpi-bat: new upstream version 2.2: get ASL path from /sys/class/power_supply/*/device/path; avoids unnecessary "AE_NOT_FOUND" kernel messages
    • tlp-stat:
      • Show "No batteries detected."
      • Explain battery status "Unknown" as "threshold effective"
      • Show battery cell group voltages (verbose mode, tp-smapi only)
      • Show acpi-call suggestion for ThinkPad *40, *50, X1 models
  • USB:
    • Remove USB_DRIVER_BLACKLIST
  • tlp-stat:
    • Show warnings for ata errors by default
  • Bugfixes
    • tlp-stat: detect kernel config with PM_RUNTIME=N
    • tlp recalibrate: fix exitcode check
    • USB autosuspend: write power/control if actually changing only
    • Ignore missing files in /proc/sys/fs/xfs

According to the changelog, the "USB_DRIVER_BLACKLIST" feature was removed because it caused issues with AC/BAT switching (the CPU governor didn't change when going from AC to battery or the other way around) and USB hotplugging (required for udevd v221 and higher) - issue HERE.


Install TLP in Ubuntu or Linux Mint


To add the official TLP PPA and install the tool in Ubuntu or Linux Mint, use the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

TLP will automatically start upon system startup, but to avoid having to restart the system to get it running for the first time, you can start it (required only the first time) using the following command:
sudo tlp start

For more information about TLP, optional ThinkPad only packages you may whish yo install, etc., see our initial article about TLP and the TLP website.

For Debian, Fedora, Arch Linux, Gentoo or openSUSE installation instructions, see THIS page.

Report any bugs you may find @ GitHub.
Read more »

Tuesday, October 6, 2015

Prevent Your Laptop From Overheating With Thermald And Intel P-State [Updated]

intel logo

Linux Thermal Daemon (thermald) is a tool developed by Intel's Open Source Technology Center which monitors and controls the CPU temperature, preventing it from overheating.

Thermald tries to prevent the CPU from overheating without a significant impact on performance by using some specific Intel functions available in the Linux Kernel. According to the Ubuntu wiki, thermald can control cooling using:
  • active or passive cooling devices as presented in sysfs
  • the Running Average Power Limit (RAPL) driver (Sandybridge upwards)
  • the Intel P-state CPU frequency driver (Sandybridge upwards)
  • the CPU freq driver
  • the Intel PowerClamp driver

It's worth mentioning that thermald applies various cooling methods only when the temperature reaches a certain threshold, so you may not notice a difference while using it if your laptop doesn't usually get very hot.

I couldn't find any information on what processors are supported by thermald on its official page, but according to a Debian wiki entry, it's supported to support Intel Sandy Bridge and newer CPUs only. Also, according to a bug report, thermald is buggy / doesn't properly support Haswell.

By default, thermald runs in zero configuration mode so after installing it, you don't need to configura anything however, if your ACPI configuration is buggy or you just want to fine tune it by adding more sensors and cooling devices, you can edit the thermald XML configuration file, located under /etc/thermald/thermal-conf.xml For more information about this, see the thermal-conf.xml man page ("man thermal-conf.xml")


How to enable intel_pstate in Ubuntu 14.04 and newer


This is for Ubuntu 14.04 and newer only! Don't use it in older Ubuntu versions or you may encounter various issues (see below).

While it's not mandatory, thermald should work better if Intel P-state is enabled. Intel P-state is not enabled by default in Ubuntu 14.04, but you can enable it easily (from what I've read, it's enabled by default in Fedora, Arch Linux and OpenSUSE for instance).

intel_pstate is a new power scaling driver for modern Intel CPUs (it supports Intel SandyBridge+ processors). According to Arjan van de Ven from Intel (for more info, see the comments he posted HERE), ondemand shouldn't be used any more and instead, modern Intel processors should use Intel P-state.

In Ubuntu, pstate is disabled by default because it didn't work properly a while back. It looks like the issues that resulted in intel_pstate being disabled by default in Ubuntu were fixed, but pstate is still not enabled by default in Ubuntu 14.04.

Note that while I didn't encounter any issues on my laptop running Ubuntu 14.04 with intel_pstate enabled and from what I've read, it works for others as well, it might not work properly for you so use it at your own risk and only enable it if you know how to disable it in case something goes wrong!

1. To enable intel_pstate in Ubuntu 14.04 (only enable it if your laptop is using Sandy Bridge or Ivy Bridge CPUs), edit the /etc/default/grub configuration file with a text editor as root - I'll use Gedit below:
gksu gedit /etc/default/grub

And for "GRUB_CMDLINE_LINUX_DEFAULT=" (it's on line 11 on my system), add "intel_pstate=enable", like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"

Make sure you've changed the /etc/default/grub file properly or else your system may fail to boot! Once you're done, save the file and update Grub:
sudo update-grub

2. Restart your system and to check if intel_pstate is enabled, run the following command:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

The command above should return "intel_pstate".

To be able to use the "cpupower" commands below, you'll need to install "linux-tools-common" and "linux-tools-generic":
sudo apt-get install linux-tools-common linux-tools-generic

Another way of checking if Intel P-State is enabled is by using the following command:
cpupower frequency-info

And the output should be something like this:
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 0.97 ms.
hardware limits: 800 MHz - 3.10 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 3.10 GHz.
The governor "performance" may decide which speed to use
within this range.
boost state support:
Supported: yes
Active: yes
25500 MHz max turbo 4 active cores
25500 MHz max turbo 3 active cores
25500 MHz max turbo 2 active cores
25500 MHz max turbo 1 active cores

If Intel Pstate is not enabled after following the steps above, it most probably means that your CPU doesn't support intel_pstate so you should disable it (simply remove "intel_pstate=enable" from /etc/default/grub and run "sudo update-grub").

3. With intel_pstate, there are only two cpufreq governors: performance and powersave (there's no "ondemand"). In my test, the "powersave" governor offered significantly better results so that's what I recommend. So try the powersave mode firstly and only if you're not satisfied with the results, switch to performance.

You can switch between the "performance" and "powersave" intel_pstate governors manually by using the following commands:

- use the "powersave" intel_pstate cpufreq governor:
sudo cpupower frequency-set -g powersave
- use the "performance" cpufreq intel_pstate governor:
sudo cpupower frequency-set -g performance

You can see the currently active cpufreq governor by using the following command:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

4. If you want to make the "powersave" governor default in Ubuntu (using the commands above commands, the settings are lost after a reboot), firstly install cpufrequtils:
sudo apt-get install cpufrequtils

And then edit the /etc/init.d/cpufrequtils file and change GOVERNOR to "powersave" (GOVERNOR="powersave"). You can do this automatically by using the following command:
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="powersave"/' /etc/init.d/cpufrequtils


To revert this change and set the governor back to default (which is "ondemand" and that's not available for Intel P-State, but I'm adding this info in case you don't want to use Intel P-State any more), use the command below:
sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="ondemand"/' /etc/init.d/cpufrequtils


It's also worth mentioning that TLP supports Intel P-State.


Install thermald


Thermald is available in the official Ubuntu 14.04 and 14.10 repositories. To install it, use the following command:
sudo apt-get install thermald
Thermald should then start automatically.

Update: for Ubuntu 14.04, you can install the latest Thermald backported from Ubuntu 14.10 by using the failsdownloads Backports PPA. Or you can manually download the deb from HERE.

Thermald is not available for older Ubuntu versions but you can compile it from source.

Arch Linux users can install thermald via AUR.

For other Linux distributions, search for Thermald in your distro's repositories or compile it from source.

More info / references:

thanks to apater for the tip!
Read more »

Advanced Power Management Tool `TLP` Sees New Release


TLP 0.7 was released recently, bringing an option which allows setting the minimum and maximum Intel P-state performance, better ThinkPad support and various other changes and bug fixes.

For those not familiar with TLP, this is an advanced power management tool that applies various settings and tweaks to help your laptop save battery power. The app tries to do everything automatically, depending on your Linux distribution and hardware (it runs in the background and doesn't come with a GUI) however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp

The most important new feature in this TLP release is the addition of an option which allows defining the minimum and maximum P-state performance for Intel Core processors (values are stated as a percentage of the total available processor performance), intended to limit the power dissipation of the CPU (feature implemented by Pali Rohár). According to Thomas Koch, the TLP developer, this should be more effective than limiting frequencies.

This feature requires an Intel SandyBridge or newer CPU with "intel_pstate" scaling driver enabled.

To use this, in the TLP configuration file (/etc/default/tlp), uncomment the following lines (remove the "#"):
#CPU_MIN_PERF_ON_AC=0
#CPU_MAX_PERF_ON_AC=100
#CPU_MIN_PERF_ON_BAT=0
#CPU_MAX_PERF_ON_BAT=30
... and experiment with different values to see which suits your needs best. After making changes to the TLP configuration file, restart TLP by running "sudo tlp start".


Other changes in the latest TLP 0.7 include:
  • USB:
    • USB_DRIVER_BLACKLIST: exclude devices assigned to the listed drivers from USB autosuspend; default: usbhid;
    • USB_BLACKLIST_WWAN: match internal driver list instead of USB vendor ids;
    • USB_WHITELIST: include devices into USB autosuspend even if already excluded by the driver or WWAN blacklists;
  • radio devices: DEVICES_TO_ENABLE_ON_AC/DISABLE_ON_BAT/DISABLE_ON_BAT_NOT_IN_USE: enable/disable radio devices upon change of power source (excluding connected devices) (feature implemented by Pali Rohár);
  • ThinkPad Battery:
    • provide proper return codes for all battery functions;
    • setcharge allowed on battery power;
    • do not activate new thresholds with force_discharge anymore (tp-smapi);
    • tpacpi-bat: support for ThinkPad E325 charge thresholds;
  • tlp-stat:
    • new options: -d|--disk, -e|--pcie, -p|--processor, -s|--system, -u|--usb;
    • show driver and connection state for all enabled radio devices;
    • show driver name in Runtime PM PCI(e) device list;
    • show type and state of docks and device bays;
    • show type of init system;
    • check if TLP's systemd services are enabled;
  • RUNTIME_PM_DRIVER_BLACKLIST: exclude PCI(e) devices assigned to drivers;
  • support Dell Latitude docks (feature implemented by Pali Rohár);
  • added support for NM 0.9.10;
  • set performance versus energy savings policy (performance, normal, powersave - requires kernel modules msr and x86_energy_perf_policy from linux-tools);
  • fixed dock/undock event processing for ThinkPad Adv Mini Dock and Ultrabase;
  • use a more robust USB device event processing.


Install TLP in Ubuntu / Linux Mint


To avoid any conflicts with laptop-mode-tools, a tool similar to TLP, it's recommended to remove it before installing TLP. In Ubuntu / Debian / Linux Mint, remove laptop-mode-tools using the following command:
sudo apt-get purge laptop-mode-tools

Ubuntu (14.10, 14.04 and 12.04) / Linux Mint (17.1, 17 and 13) users can install TLP by using its official PPA. Add the PPA and install the latest TLP by using the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp
TLP will start automatically but to avoid having to restart the system, the first time you can start it manually, by using the following command:
sudo tlp start
There are also some optional packages you can install - for more on that as well as more information about TLP, see: Improve Power Usage / Battery Life In Linux With TLP. Also see the TLP FAQ.

For how to install TLP in Fedora, Debian, Arch Linux or Gentoo, see the TLP installation page.

To download the source code, report bugs, etc., see the TLP GitHub page.


Thanks to Thomas for the tip! image via Canonical blog
Read more »

Install Ubuntu On Your Chromebook Using Crouton

HP Chromebook 11

I recently got a Chromebook and decided to install Ubuntu on it. There are two ways (that I know of) of doing this: using Crouton, which uses a chroot environment and lets you run both Chrome OS and Ubuntu in the same time and you can switch between the two using a keyboard shortcut, and ChrUbuntu, which works you can dual boot with Chrome OS but it only supports x86-based Chromebooks.

Since I have an ARM-based Chromebook (HP Chromebook 11 - it's not on sale currently due to some issues with the charger), I've used Crouton. I actually prefer Crouton for the way it allows switching between Chrome OS and Ubuntu without having to restart.

If you own a Chromebook and want to install Ubuntu using Crouton, here's how to do it. I've tested this on HP Chromebook 11, but it should work on any Chromebook.


Demo video


Below you can watch a quick demo of Ubuntu (Xfce) running on my ARM Chromebook in chroot using Crouton:


(direct video link)

Note: The video is laggy because my ARM Chromebook can't do a proper screencast using ffmpeg do the the CPU. Chrome OS / Ubuntu don't lag when using the Chromebook.


How to install Ubuntu on your Chromebook using Crouton


Warning: following the instructions below may void warranty!

1. The first thing you need to do is enable Developer Mode on your Chromebook:

a) Firstly, you need to reboot the Chromebook in Recovery Mode. To do this, press and hold the Esc and Refresh keys and then press the Power button while holding the other two keys (on older Chromebooks there's a physical switch for this).

After it reboots, you should see a yellow exclamation point on the screen - press Ctrl + D (there's no prompt - you have to know to do it).

b) You'll be asked if you want to enable Developer Mode - confirm and after doing so, wait. It will take a while and a new screen will pop up and then the Chromebook will reboot, starting the process that enables the Developer Mode. This should take about 15 minutes.

c) After it's done, you'll see a screen with a red exclamation point. You don't need to do anything, just wait until your Chromebook reboots into Chrome OS.

Now each time your Chromebook starts, you'll see a warning screen telling you that OS verification is OFF. This adds extra time to the boot process but you can skip it by pressing Ctrl + D.

You can also find instructions on enabling Developer Mode for each Chromebook model, HERE.


2. Install Ubuntu with Crouton

a) Download Crouton

You can download Crouton from HERE. Make sure the downloaded file is saved in the Downloads folder.

b) Install Ubuntu

Start the terminal on your Chromebook by pressing Ctrl + Alt + T. Then type "shell" in the terminal.

You can now begin installing Ubuntu. Before proceeding, I'll briefly explain the commands below:
  • by default, Crouton will install Ubuntu 12.04 LTS (Precise) but I added "precise" to the first command below so you can see how you can change the Ubuntu version. You can see a list of supported Ubuntu versions by running "sh -e ~/Downloads/crouton -r list"
  • in Developer Mode, the default configuration is completely insecure and you won't be prompted for a password when using "sudo" in the Chrome OS terminal. For this reason, I recommend encrypting the chroot by using "-e"
  • "-t" means "targets" which is what Crouton uses to decide what to install. The target can be the desktop environment (in the two commands below) such as "unity", "xfce" and so on or other "packs" like "touch" for instance. Use "sh -e ~/Downloads/crouton -t help" to see all the available targets and find out more about this.
  • If you're using a Chromebook with a touch screen, also add the "touch" target, like this (example for Xfce): "-t xfce,touch". More tips for Chromebook Pixel HERE.


For ARM Chromebooks: it's important to note that Unity only works in Ubuntu 12.04 (because only Unity 2D works due Xephyr lacking EGL support).


Ubuntu Crouton Chromebook
Ubuntu 12.04 with Unity running on HP Chromebook 11

To install Ubuntu 12.04 with Unity (2D) and enable encryption, use the following command:
sudo sh -e ~/Downloads/crouton -r precise -t unity -e


Ubuntu Crouton Chromebook
Ubuntu 13.10 with Xfce running on HP Chromebook 11

To install Ubuntu 14.04 with Xfce and enable encryption, use the command below:
sudo sh -e ~/Downloads/crouton -r trusty -t xfce -e

In the same way, you can also install gnome (GNOME Shell), cinnamon, kde or lxde.

The installation should now start and it will take a while. When it finishes, you'll be prompted to enter an username and password for your new Ubuntu installation.

c) Start Ubuntu

To start Unity, in the Chrome OS terminal (Ctrl + Alt + T), type "shell" and then:
sudo startunity

Or, to start Xfce, open the Chrome OS terminal (Ctrl + Alt + T), type "shell" (if you didn't already) and then:
sudo startxfce4

You can switch between Chrome OS and Ubuntu on ARM by using: Ctrl + Alt + Shift + Back and Ctrl + Alt + Shift + Forward (on x86-based Chromebooks, the keyboard shortcuts are: Ctrl + Alt + Back or Ctrl + Alt + Forward and then also press Ctrl + Alt + Refresh).

To exit the Ubuntu desktop, simply select "Logout".

For more information, see Crouton @ GitHub.

Removing Ubuntu / Crouton


There are two ways of removing Ubuntu / Crouton. You can either reboot your Chromebook, press SPACE when the boot screen prompts you to disable the Developer Mode and follow the instructions - this will clean up everything, including any changes you've made to your Chrome OS. 

Or you can remove all the chroots - to do this, exit Ubuntu (exit Unity/Xfce or whatever you're using) and use the following command in the Chrome OS terminal (Ctrl + Alt + T, then type "shell"):
cd /usr/local/chroots 
sudo delete-chroot *
sudo rm -rf /usr/local/bin

Tomorrow I'll publish a new article with some things to do after installing Ubuntu on your Chromebook, like installing some "base" applications, getting Ubuntu Software Center to work and some other fixes. Stay tuned!

Update - also see: Things To Do After Installing Ubuntu On A Chromebook Using Crouton
Read more »

Things To Do After Installing Ubuntu On A Chromebook Using Crouton

Yesterday I wrote about installing Ubuntu on your Chromebook using Crouton. However, Crouton only installs a few apps so here's what you should install on your new Ubuntu installation running on top of Chrome OS and a few thing that you may want to fix, like the brightness and volume keys or how to get Ubuntu Software Center to work.

Note: Below I'll only cover Unity and Xfce but there are some generic tips as well.


1. Install extra applications


Ubuntu installed using Crouton ships with just a few apps (file manager, Xterm and a couple more) so let's install some extra applications.

For Unity, I recommend installing gnome-terminal, file-roller and Gedit. Open Xterm and install them using the following commands:
sudo apt-get install gnome-terminal file-roller gedit

For Xfce, you'll want a text editor (leafpad) and a music player (I recommend Audacious):
sudo apt-get install leafpad audacious

And for both Xfce and Unity, you'll probably want to install bash completion, a video player (VLC), ubuntu-restricted-extras as well as the Ubuntu Font, Ubuntu Software Center which you can later use to install many other applications and Synaptic (in case USC doesn't work for you):
sudo apt-get install bash-completion vlc ubuntu-restricted-extras ttf-ubuntu-font-family software-center synaptic


Important note: don't launch Ubuntu Software Center from the menu / Dash. You must run it with "gksu" - either edit its desktop file or simply open a terminal and type:
gksu software-center
If you don't do this, Ubuntu Software Center will start, but you won't be able to install any applications using it. The application screenshots in USC don't seem to work though.

If you're using an ARM Chromebook, note that not all applications support ARM. You can install GIMP, LibreOffice and so on but you won't be able to install Skype or Steam for example.


2. Updating the chroot


Ubuntu may stop working after a Chrome OS update. If that's the case, update all the installed targets using the following command (in Chrome OS, open a terminal using Ctrl + Alt + T, then type "shell"):
sudo sh -e ~/Downloads/crouton -u -n chrootname
Where "chrootname" is the name of the chroot you want to update. The default chrootname is the codename for the Ubuntu version you've installed (regardless of the desktop environment you've installed). For example, if you've installed Ubuntu 12.04 Precise, the default chrootname is "precise".


3. Xfce tweaks


On Xfce, I suggest changing the GTK/icon theme and enabling font anti-aliasing because the defaults are kind of ugly. You should also remove Xscreensaver as it causes issues.

Before:


After:



To fix the font, open Settings Manager > Appearance, on the "Fonts" tab check the "Enable anti-aliasing" box and under "hinting", select "slight":


You may also want to change to the Ubuntu Font which you've installed if you've followed all the steps in our previous article. If you didn't install it already, use:
sudo apt-get install ttf-ubuntu-font-family

To change the GTK theme (tested on Ubuntu 13.10 and 14.04, Numix may not be available for older releases):
  • Settings Manager > Appearance > Style: select Numix or Greybird;
  • Settings Manager > Window Manager > Style: select Numix or Greybird.

Install the Xubuntu icon theme (in the Xfce4 terminal):
sudo apt-get install xubuntu-icon-theme

To change the icon theme (default is Tango): Setting Manager > Appearance > Icons: select Elementary Xfce dark.

To remove XScreensaver which causes some issues, use the following command (in the Xfce4 terminal):
sudo apt-get purge xscreensaver

Update for Xfce under Ubuntu 14.04: Whisker Menu, a cool menu for Xfce which is now used by default in Xubuntu, is available in the official repositories (and thus, is available for ARM too) so I recommend you install it. Also, the Xfce4 Panel has support for Unity AppIndicators so I recommend you install this plugin as well and the Sound Menu indicator. Here's a screenshot with Whisker Menu and the Sound Indicator:


To install both, use the commands below:
sudo apt-get install xfce4-whiskermenu-plugin xfce4-indicator-plugin
sudo apt-get install --no-install-recommends indicator-sound
Once installed, right click the Xfce Panel (or simply select Panel from the Xfce Settings), select Panel > Add New Items, then select "Whisker Menu" and click "Add", then do the same for the "Indicator Plugin". You can re-arrange the items from the panel preferences, on the Items tab:


Also, I also recommend removing the Action Buttons plugin since the logout / shutdown, etc. options are now available in the Whisker Menu.



4. Fix brightness and volume keys


By default, the brightness and volume keys don't work. To fix them, you can install the "keyboard" target. Exit Ubuntu, open the Chrome OS terminal by pressing Ctrl + Alt + T, then type "shell" and then use the command below:
sudo sh -e ~/Downloads/crouton -r ubuntuversion -t keyboard -u
Where "ubuntuversion" is the Ubuntu version you've installed ("precise", "trusty", etc.)

This will add the "keyboard" target to the existing chroot.

Then, start Ubuntu and use:
  • Search key + volume keys to change the volume;
  • Search key + brightness keys to change the brightness.

For me (on HP Chromebook 11), the volume keys worked but the brightness keys didn't work properly under Unity (both volume and brightness keys worked under Xfce).

If this occurs for you too, there's another tweak you can use. Crouton installs a brightness script you can use to change the brightness. You can do this either via a terminal:

-increase the brightness:
brightness up
-decrease the brightness:
brightness down


Or you can assign keyboard shortcuts for the two commands mentioned above: System Settings > Keyboard > Shortcuts tab > Custom Shortcuts: click "+" and:
  • for increasing the brightness: under "Name" enter "Brightness Up" and under command: "brightness up";
  • for decreasing the brightness (click "+" again): under "Name" enter "Brightness Down" and under command, use: "brightness down".
Then, assign these custom shortcuts the brightness keys (you can directly assign the brightness keys or use Search key + brightness keys, so it's consistent with the volume keys).

Important: if you're using an ARM Chromebook, please note that most Launchpad PPAs won't work. That's because by default, Launchpad PPAs don't support ARM and only a few currently built ARM packages (a special permission is required to build ARM packages on Launchpad).

For more tips, see Crouton's GitHub readme | wiki.
Read more »

Install Laptop Mode Tools 1.64 With Configuration GUI In Ubuntu

Laptop Mode Tools is a package that allows you to extend the battery life of your laptop by enabling the Laptop Mode Linux kernel feature along with other power-related tweaks.

This was a command line only tool until version 1.64, which introduces a GUI that lets you toggle individual power saving modules. The new GUI configuration tool isn't exactly pretty as you can see in the screenshot below, but it's definitely an useful addition because it no longer requires users to work with various configuration files.

laptop mode tools gui

The GUI is written in PyQT and the options are generated at runtime, based on the list of available power saving modules.

Because Laptop Mode Tools 1.64 is only available in the Ubuntu 14.04 repositories, I've backported it for older Ubuntu versions so you can easily install it via a PPA.


Install Laptop Mode Tools in Ubuntu


Before proceeding with the installation, please note that you must remove TLP if installed before installing Laptop Mode Tools. If you install both, there will be conflicts.

I guess you're wondering which one's better, TLP of Laptop Mode Tools - well, they both try to achieve the same thing and the results are pretty close, but you can give both a try (not in the same time though!) and see which one works better for you.

The latest Laptop Mode Tools is available in the failsdownloads Backports PPA. You can add the PPA and install it in Ubuntu or Linux Mint by using the following commands:
sudo add-apt-repository ppa:failsdownloadsteam/unstable
sudo apt-get update
sudo apt-get install laptop-mode-tools
If you don't want to add the PPA, you can manually download the deb from HERE.

To launch the Laptop Mode Tools GUI (the menu entry doesn't work properly), use the following command:
gksu lmt-config-gui

For more information, see the Laptop Mode Tools FAQ page.
Read more »

Advanced Power Management Tool `TLP` 0.6 Released, Install It In Ubuntu

Ubuntu laptop

TLP was updated to version 0.6 recently, receiving some fixes for Linux Kernel 3.15 and 3.16 along with systemd improvements and other changes.

Also, with this release, TLP is no longer disabled when laptop-mode-tools is detected and instead, a warning is displayed about possible conflicts.

For those not familiar with TLP, this is an advanced power management tool that applies various settings and tweaks to help your laptop save battery power. The app tries to do everything automatically, depending on your Linux distribution and hardware however, you can manually change its settings by editing the TLP configuration file: /etc/default/tlp

Changes in TLP 0.6:
  • set systemd service type to simple, allows tlp service to start asynchronously in the background;
  • remove DISABLE_TPACPIBAT from configuration;
  • remove DEVICES_TO_ENABLE_ON_RADIOSW from configuration because it's deprecated: works with Ubuntu 12.04/Kernel 3.2 only;
  • enable RUNTIME_PM_ALL by default (controls runtime power management for PCI(e) bus devices);
  • do not touch kernel settings if param is empty or commented: DISK_IDLE_SECS_ON, MAX_LOST_WORK_SECS_ON, SCHED_POWERSAVE_ON, NMI_WATCHDOG, SATA_LINKPWR_ON, PCIE_ASPM_ON, RADEON_DPM_STATE_ON, RADEON_POWER_PROFILE_ON, WIFI_PWR_ON, SOUND_POWER_SAVE_ON, RUNTIME_PM_ON;
  • tlp-stat:
    • consider changed sysfs paths for i915 enable_rc6/fbc as of kernel 3.15;
    • consider changed sysfs paths for hwmon coretemp/sensors as of kernel 3.15/3.16;
    • report speed of all fans, not just the first one;
    • show warning for kernel sata errors (possibly) caused by SATA_LINKPWR_ON_BAT/AC=min/medium power;
    • retrieve trace output from systemd journal if present;
  • do not disable TLP when laptop-mode-tools is detected, just output a warning about possible conflicts;
  • fix: Makefile - remove tlp-nop in uninstall-tlp target;
  • fix: tlp-stat - don't suggest tp-smapi on non-ThinkPad hardware with thinkpad_acpi loaded;
  • fix: tlp-stat - don't show /proc/acpi/ibm/fan on Lenovo non-ThinkPad models.


Install TLP in Ubuntu / Linux Mint


The latest TLP 0.6 is no longer disabled when laptop-mode-tools is detected and a warning is displayed instead however, it's best to remove laptop-mode-tools if installed, to avoid any possible conflicts. In Ubuntu / Debian / Linux Mint, remove laptop-mode-tools using the following command:
sudo apt-get purge laptop-mode-tools

Ubuntu / Linux Mint users can install TLP by using its official PPA. Add the PPA and install the latest TLP by using the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp

TLP will start automatically on startup but to avoid having to restart the system, the first time you can start it manually, by using the following command:
sudo tlp start

There are also some optional packages you can install - for more on that as well as more information about TLP, see: Improve Power Usage / Battery Life In Linux With TLP.

For how to install TLP in Fedora, Debian, Arch Linux or Gentoo, see the TLP installation page.

To check out the source code, report bugs, etc., see the TLP GitHub page.

image via
Read more »