Thursday, December 1, 2016

Unity Indicators for a better Ubuntu 16.04 experience


1.Install Cpufreq-utils and Indicator-cpufreq:

For better power management we will be installing a cpu frequency scaling indicator by using

these commands in terminal :

sudo apt-get install cpufrequtils

sudo apt-get install indicator-cpufreq

A logout after the installation is required . 





2.Install Indicator-Multiload:

Indicator Multiload is an apple to monitor system resources such as the use of the processor, memory, internet, memory, swap, etc. By default only one graph of the processor is displayed. If you are using a multi-core CPU, note that it graphically depicts the use on a "general" instead of each core. Clicking on this chart displays a menu with more detailed data on other aspects of your system, such as memory swapping, network usage.


Indicator-Multiload can be installed via terminal (ctrl+alt+t) with the following command :


sudo apt install indicator-multiload


Once installed the system monitor can be launched from Unity Dash : 






To configure the indicator right click > Preferences 







3.Install Caffeine Indicator:

Caffeine indicator allows user to temporary disable screensaver/sleep mode. It is available in the Ubuntu repositories and can be easily installed via terminal : 


sudo apt install caffeine 


Similar to the Multiload indicator Caffeine can be launched from Dash : 









Thursday, November 3, 2016

Clipboard Manager - CopyQ on Ubuntu 16.04


CopyQ is advanced clipboard manager with searchable and editable history with support for image formats, command line control and more.


Features:
  • Supports Windows, OS X and Linux.
  • Store text, HTML, images and any other custom format.
  • Customize tray menu.
  • Save items in new tabs (and groups).
  • Quickly browse through items 
  • Sort items, create new, remove, copy/paste to different tab.
  • Variety of system-wide shortcuts 
  • Immediately paste to focused window from tray or main       window.
  • Fully customizable appearance (colors, fonts, transparency).
  • Add notes to items.
  • Advanced command-line interface and scripting.
  • Ignore clipboard copied from some windows or containing some text.


The lastest versions is  2.7.1 and it can be downloaded from here



  • Colorize items with command
  • Drag'n'drop items in selection order
  • Fixed item selection with "next" and "previous" commands
  • Fixed encrypting/decrypting items on Windows
  • Fixed occasional client crashes at exit
  • Fixed editor command on OS X


To install it simply download the .deb file , navigate to the folder where it is located right click > Open with > Gdebi Package Installer > Install (if you do not have gdebi installed you can install it with the following command - sudo apt install gdebi) . Once installed you can launch copy from Dash :





Tuesday, November 1, 2016

Redshift on Ubuntu 16.04

"Light at night is bad for your health, and exposure to blue light emitted by electronics and energy-efficient lightbulbs may be especially so."
Until the advent of artificial lighting, the sun was the major source of lighting, and people spent their evenings in (relative) darkness. Now, in much of the world, evenings are illuminated, and we take our easy access to all those lumens pretty much for granted.
But we may be paying a price for basking in all that light. At night, light throws the body’s biological clock—the circadian rhythm—out of whack. Sleep suffers. Worse, research shows that it may contribute to the causation of cancer, diabetes, heart disease, and obesity.


But not all colors of light have the same effect. Blue wavelengths—which are beneficial during daylight hours because they boost attention, reaction times, and mood—seem to be the most disruptive at night. And the proliferation of electronics with screens, as well as energy-efficient lighting, is increasing our exposure to blue wavelengths, especially after sundown." (http://www.health.harvard.edu/staying-healthy/blue-light-has-a-dark-side)

Redshift is an application that adjusts the computer display's color temperature based upon the time of day. The program is free software, inspired by the proprietary f.lux, and is intended to reduce eye strain as well as insomnia.

To install redshift on Ubuntu , open a terminal (ctlr+alt+t) and type in the following command : 

sudo apt install redshift redshift-gtk

             After the installation is complete close the terminal and lanch redshift from Dash . 


             Redshift can be enabled to start on boot by clicking on "Autostart" 


How to install Spotify on Ubuntu 16.04

Spotify is a commercial music streaming, podcast and video service that provides digital rights management-restricted content from record labels and media companies . Music can be browsed or searched by artist, album, genre, playlist, or record label. 

To install Spotify on Ubuntu type the following command into a terminal:

                           
sudo apt-add-repository -y "deb http://repository.spotify.com stable non-free" &&
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  D2C19886 &&
 sudo apt-get update -qq &&sudo apt-get install spotify-client






Close the terminal once the installation is complete and launch Spotify from Unity Dash .




Thursday, May 12, 2016

How to speed up and tweak Ubuntu 16.04

1.Unity Tweak Tool:

Unity Tweak Tool is a settings manager for the Unity desktop. It provides users with a fast, simple and easy-to-use interface with which to access many useful and little known features and settings of the desktop environment that one may want to configure.


To install unity tweak tool copy paste the the following commands into your terminal 

(ctrl+alt+t) :

sudo apt install unity-tweak-tool


then


unity-tweak-tool


(Unity Tweak Tool can be opened by doing a Dash search as well )






To speed up Unity go to General  set texture quality to fast under hardware acceleration and turn off animations .


2.Install Compiz Config :

Compiz is a compositing window manager for the X Window System, using 3D graphics hardware to create fast compositing desktop effects for window management. Effects, such as a minimization animation or a cube workspace, are implemented as loadable plugins.

To install CompizConfig , open a terminal (ctrl+alt+t) :


sudo apt install compiz compizconfig-settings-manager 


After the installation is done you can open the settings-manager 


from Dash .


Go to Composite and uncheck Detect Refresh Rate:



Hit back and return to the main configuration window . Next click on OpenGL and uncheck
Sync to VBlank. (caution using compizconfig-settings-manager as it can break your system)


3.Moving Temporary Files to Memory (RAM):

Before starting this process it’s a good idea to backup the fstab file:


sudo cp /etc/fstab /etc/fstab.bak


The next step is to edit fstab:

sudo gedit /etc/fstab 


Add the following lines at the end of the file :


tmpfs /tmp tmpfs defaults,noatime,size=1G,mode=1777 0 0

tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 
tmpfs /var/log/apt tmpfs defaults,noatime 0 0




The first line mounts /tmp in memory with a size limit of 1 gig. This may be larger than you need. If you exceed this limit the swap area will be used.
The second line mounts /var/tmp into memory. The third mounts the logfiles in /var/log–note this means that a reboot will clear your log files which may not be what you want. The fourth line mounts the temporary files associated with apt into memory.
The new mount points will become active on your next reboot.

4.Control Startup Applications:
Ubuntu hides most of the system’s default autostart entries from this dialog. To view them, run the following command in a terminal:

sudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*desktop

Don’t disable an autostart entry unless you understand what it does.
5. Tune Swappiness

If you have alot of RAM this tweak is for you . The swappiness value controls the Linux kernel's tendency to swap - that means moving information out of RAM and onto the swap file on the disk. It accepts a value between 0 and 100. In order to change swappiness value we need to edit /etc/sysctl.conf :

sudo gedit /etc/sysctl.conf
Look for vm.swappiness in the file and change its value. If it doesn’t exist, add it to the end of the file on a new line.

vm.swappiness = 1 (1” is the minimum possible “active swapping” setting while “0” means disable swapping completely and only revert to when RAM is completely filled. Using these settings in low-spec systems of 2GB RAM or less may cause freezes and make the OS completely unresponsive)




Save the file after making the change.


Optional

6. Install Preload: 
Preload is an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time.

sudo apt-get install preload

7. Disable Ping Response:

sudo gedit /etc/sysctl.conf

and add the following line at the bottom page . Make sure there is no "#" ahead of the line as it will uncomment it :

net.ipv4.icmp_echo_ignore_all = 1


Other network tweaks  

In the same file you can also add :

net.core.somaxconn = 1000
net.core.netdev_max_backlog = 5000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_wmem = 4096 12582912 16777216
net.ipv4.tcp_rmem = 4096 12582912 16777216
net.ipv4.tcp_max_syn_backlog = 8096
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 10240 65535



Once you have completed editing the file save the file and close it.


Before network tweaks:



After:



Friday, May 6, 2016

Keep your Browser profile in RAM for reduced disk write and increased performance

Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage your browser's profile in tmpfs and to periodically sync it back to your physical disc (HDD/SSD). This is accomplished via a symlinking step and an innovative use of rsync to maintain back-up and synchronization between the two. One of the major design goals of psd is a completely transparent user experience.

To install profile-sync-daemon open a terminal (ctrl+alt+t) and type in the following commands :

sudo add-apt-repository ppa:graysky/utils
sudo apt-get update
sudo apt-get install profile-sync-daemon

To edit the configuration open the this file via terminal :

sudo gedit /home/USERNAME/.config/psd/psd.conf


Uncomment (remove#)  #BROWSERS"" so it looks like this :

 BROWSERS "firefox chromium" 

This serves as an example , fill in the quotes with the browsers you are using. If you do not uncomment this line all the supported browser profiles will use tmpfs.
Beginning with version 5.54 of psd, native support for overlayfs is included. Uncomment the USE_OVERLAYFS="yes" line to enable it rather than the default full copy to reduce the memory costs and to improve sync/unsync operations.


Next we are going to use the parse command :

profile-sync-daemon parse 

The 'parse' option can be called to show users exactly what psd will do/is doing based on $/home/USERNAME/.config/psd/psd.conf as well printout useful information such as profile size and paths.


After installing and configuring profile-sync-daemon restart your PC .

Saturday, April 30, 2016

AMD open-source (Radeon) graphics driver on Ubuntu 16.04


First step will be identifying your graphics chip :
lspci -nn | grep VGA

In Ubuntu 16.04 LTS the open-source driver AMDGPU is enabled by default for the latest cards (https://help.ubuntu.com/community/RadeonDriver).

The next step will be adding the oibaf ppa and doing a system upgrade (ctrl+alt+t) :

sudo add-apt-repository ppa:oibaf/graphics-drivers (https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers)
sudo apt install mesa-vdpau-drivers
sudo apt update

sudo apt upgrade 
sudo apt dist-upgrade 

AMD Radeon 9500 and newer GPUs are supported by the mesa-vdpau package.

For better results we will use "dpm" method to improve GPU power management.


For the most recent ATI/AMD graphic cards supported by the Radeon driver, DPM (Dynamic Power Management) should work automatically without additional steps.
Instead if you notice overheating problems and/or you have an old Radeon HD graphic card, you can enable DPM by adding a boot parameter. This should greatly help power consumption, especially when idle. To do so, edit /etc/default/grub and add the 'radeon.dpm=1' to the GRUB_CMDLINE_LINUX_DEFAULT line, so it would look something like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"
After you save/quit the text editor, update grub:

sudo update-grub

You can use 3 profiles for DPM :
  • battery
  • balanced
  • performance
Balanced is the most useful one . To enable it type the following in a terminal :

sudo gedit /etc/rc.local

add the following lines in this file (above the line that says "exit 0")


echo balanced > /sys/class/drm/card0/device/power_dpm_state

Save the file and reboot your pc .

The GPU power management can also be configured using TLP which  brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, so you may just install and forget it. Nevertheless TLP is highly customizable to fulfill your specific requirements. These tweaks will also help with overheating issues!

To avoid any conflicts make sure laptop-mode-tools or cpufrequtils are not installed :


sudo apt remove laptop-mode-tools
sudo apt remove cpufrequtils
Reboot your PC.

To install it open a terminal and type in the following commands (ctrl+alt+t) :

sudo apt install tlp tlp-rdw

To edit tlp configuration type the following command into the terminal :

sudo gedit /etc/default/tlp

TLP comes preconfigured for battery saving , however I have added a more aggressive  power saving configuration, this will work very well on systems with multicore CPU's . Ubuntu is optimized to spread the load on all cores . Make sure to uncomment (remove "#" before editing a line to enable it)










Save and close the file and start tlp :

sudo tlp start

To set tlp in Battery Mode type in sudo tlp batt , for AC Mode we can use the command sudo tlp ac .