Thursday, December 1, 2016

Well that didn't last long

Unfortunately, using Ubuntu Desktop as my primary OS has come to an end just after six months of "giving it the ol' college try". Why, you might ask? Two words: graphics drivers.

For over sixteen years, I have contributed spare computing power to SETI@Home, and the fastest way to earn credits is to set up GPU computing on BOINC. But in order for GPU computing to work properly on BOINC, it needs to work with an OpenCL library.

  • Open Source Drivers (radeon, nouveau, intel): While the open source drivers for AMD, Nvidia, and Intel all have varying degrees of support for hardware acceleration OOTB, one thing they do not support is OpenCL. While Mesa or Beignet has open source OpenCL support, these libraries do not work with BOINC.
  • AMD Proprietary Drivers: Before Ubuntu 16.04, AMD actually provided the proprietary FGLRX drivers for Linux which actually worked with BOINC after doing some shoehorning to get the drivers and BOINC to play nice together. Since 16.04, however, they have dropped Linux support of all but their most recent graphics chipsets so trying to run GPU computing on BOINC with AMD is nearly impossible unless you have one of their latest cards.
  • Nvidia Proprietary Drivers: After upgrading to Ubuntu 16.04, I went ahead and switched out my AMD R7 250x for an Nvidia GTX 750 Ti since on the surface it appears Nvidia supports Linux better than AMD does. However, trying to find the right driver for the GTX 750 Ti was a nightmare as I posted in Enabling Nvidia Hardware Acceleration in Google Chrome on Ubuntu 16.04. And then once I finally did find the right driver version for my Nvidia card, the very next graphics driver update broke the entire setup completely and my Ubuntu Desktop reverted back to the open source nouveau drivers.
  • Intel Graphics Drivers for Linux: While I had varying degrees of success with getting AMD and Nvidia to churn out GPU credits for BOINC under Ubuntu, for the life of me I could not get my integrated Intel graphics GPU to work with BOINC at all. I tried the open source Linux drivers, I tried Beignet, I tried whatever closed-source libarary they provide for OpenCL. While I could get BOINC to recognize the fact that I at least had an Intel GPU, every time it tried to download work units for the Intel GPU it failed with a computation error.
Unless you have eccentric requirements for GPU usage under Ubuntu like myself, Ubuntu is still a great OS for doing everything else you could possibly want. While Ubuntu Desktop is no longer my primary OS (yes, unfortunately Windows 10 is back), one of the first things I did was to set up a VMWare virtual machine running Ubuntu Desktop 16.04 for my development activities. Even though Microsoft is actively working on the Ubuntu Bash Shell on Windows, it still doesn't compare to running Ubuntu in a VM and doing all of my development efforts therein.

Therefore I am still a committed user of Ubuntu, even though it is now running as a Guest OS in a VM instead of the primary OS on my PC. And I am still a huge fan of Ubuntu Server for running all of my workloads in the cloud. So stay tuned, the Ubuntu Blog lives on.

Tuesday, October 25, 2016

Enabling Nvidia Hardware Acceleration in Google Chrome on Ubuntu 16.04

I bought an ASUS GeForce GTX 750 Ti for my Ubuntu 16.04 machine to replace an AMD video card and I noticed right away that Chrome was not operating at peak efficiency. So I checked chrome://gpu and sure enough the hardware acceleration was disabled. What to do?

First, I looked at chrome://settings to make sure hardware acceleration was enabled there. Going to Show advanced settings... --> System showed that the "Use hardware acceleration when available" option was checked. So far so good.

Next, I looked at chrome://flags and enabled the "Override software rendering list" option. I restarted Chrome but when I went back to chrome://gpu hardware acceleration was still disabled.

Doing some research pointed to the fact that the Chrome GPU sandbox was not playing nice with the Nvidia driver, or vice versa. The way to get around this issue was to edit my Unity launcher shortcut found at ~/.local/share/applications/google-chrome.desktop and add the --disable-gpu-sandbox command-line option to the following line:

Exec=/opt/google/chrome/chrome --disable-gpu-sandbox %U

After closing and reopening Chrome, chrome://gpu finally showed that hardware acceleration was enabled on most of the items listed under Graphics Feature Status. The two items that were still disabled were:
  • Rasterization
  • Native GpuMemoryBuffers
Going back to chrome://flags, I enabled the "GPU rasterization" option and restarted Chrome which enabled the Rasterization item. To get the Native GPU Memory Buffers to work, I had to add the --enable-native-gpu-memory-buffers command-line option to the Unity launcher shortcut. Closing and reopening Chrome enabled the Native GpuMemoryBuffers item.

Doing all of this work greatly improved everything Chrome handles including video playback. A neat place to test out the new and improved performance is the WebGL Aquarium page. Select 1000 fish and check the FPS (mine is pegged at 60 fps which is equal to the refresh rate of my monitor).


Getting the right Nvidia proprietary driver to install properly on Ubuntu 16.04 for the GeForce GTX 750 Ti was nothing short of a nightmare. The first thing that I had to do was add the Proprietary GPU Drivers PPA which gives you a lot more options of various Nvidia driver versions than the standard Ubuntu repos do.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
I tried several different versions of the Nvidia driver and had serious issues with each one I tried. So I went to the Nvidia Download Drivers page and looked up what the appropriate Linux 64-bit driver should be for my card. At the time of this writing, version 367.57 was the one that came up and can be installed with the following command:
sudo apt-get install nvidia-367

Thursday, August 25, 2016

How to install 10 Band Equalizer for Rhythmbox

I like Rhythmbox on Ubuntu Desktop but it does not come with an equalizer out of the box. Fortunately, there is a 10 band equalizer that you can install as a plugin and it works really well.

Here are the steps to install the 10 band equalizer with Rhythmbox version 3 and later:
  • Create a directory under your home directory for storing the 10 band equalizer plugin
    • mkdir -p ~/.local/share/rhythmbox/plugins/
  • Go to the newly created directory and get the source for the plugin from GitHub
    • cd ~/.local/share/rhythmbox/plugins/
    • git clone git://
  • Now go to the equalizer plugin directory and install the plugin
    • cd rhythmbox-plugins/equalizer
    • sudo apt-get install gir1.2-gconf-2.0 python-lxml
    • ./ --rb3
  • Open Rhythmbox and go to the Tools → Plugins... menu and enable the equalizer

  • Finally, you can go to Tools → Equalizer and change the settings to suit your music taste

That's it! Happy equalizing!

Sunday, August 21, 2016

How to fix a broken fstab in Ubuntu

I was messing around with my /etc/fstab settings which connect my Ubuntu desktop to my NAS server via Samba and I screwed it up. When I restarted my desktop, Ubuntu would just hang asking for a password and yet I could not provide the password and get to the login screen. Boot failure!

So I found this little nugget of wisdom on "How to fix a broken fstab in Ubuntu" which got my desktop going again:

Fix Broken /etc/fstab

    • Boot into the Ubuntu Live CD
    • Open terminal
    • Run the following commands to mount the partition with the root / directory and edit /etc/fstab:

sudo mkdir /media/mount
sudo mount /dev/sd[a..z][1..n] /media/mount
sudo vi /media/mount/etc/fstab

    • Make your changes, save, and then reboot without the Live CD

In my case, I just placed a comment hash # on the fstab line that defined the Samba share so I could get into my desktop again and fix the problem.

Sunday, April 10, 2016


In my earlier post about Google Drive for Linux I enumerated several options available for getting Google Drive to work under Linux.

The first option I tried was actually not on the original list. After I installed a Windows 10 Home virtual machine on my Ubuntu 15.10 Desktop, I downloaded and installed the Google Drive client for Windows. I set up a Shared Folder between my Ubuntu host OS and the Windows 10 guest OS so that Google Drive would actually sync everything to my /home/<user>/Google Drive directory under Ubuntu. I thought this was going to be an easy solution to the problem of not having an official Google Drive client for Linux.

Turns out I was wrong. The Google Drive Windows client completed the initial sync process which was good, but then it would immediately bomb out and quit with an error which was bad. Not much of a point having the Google Drive client on Windows if it's not going to stay opened and monitor the Google Drive shared folder. Therefore I uninstalled the Google Drive Windows client from my VM and went with my second option.

So I decided to give overGrive a try. Sure I had to pay $4.99 for a license to run it but I thought that was a reasonable price for a dedicated Google Drive for Linux client. Purchasing the license with PayPal was simple and downloading the latest DEB package for Ubuntu was trivial.

I started going through the installation instructions for Ubuntu and was doing fine until I hit the section about pressing the "Connect account..." button and linking overGrive with my Google Drive account. For whatever reason, Chrome kept opening up a new window with no tabs instead of bringing me to the Account Management screen in Google.

After contacting overGrive support, I did some searching and came across this thread Ubuntu 15.10 Chrome: external links are opened as blank tabs in new browser window. I just had to edit ~/.local/share/applications/google-chrome.desktop and add the %U parameter to the end of the Exec= line. Now external links like the one from "Connect account..." work properly and I was able to link up overGrive with my Google Drive account.

Currently overGrive is still doing its initial sync with Google Drive. It has taken quite a bit more time for overGrive to complete this task on Ubuntu than for the Google Drive Windows client. It seems the difference between the two is that the Google Drive Windows client appears to be multi-threaded and asks to sync several files at once while overGrive appears to be single-threaded and asks to sync one file at a time.

Friday, April 8, 2016

Why does Google Chrome use so much RAM?

I know this issue is not Linux-specific since Chrome did the same thing on Windows, but I want to bring it up anyway. Currently I have thirteen tabs open in Chrome and this is what System Monitor looks like:

Thirteen tabs, and nineteen out of the top twenty memory hogging processes are chrome. Seriously, how can Google Chrome take up a half-gig of memory for just one process? I have done a lot of Web application programming with JavaScript frameworks such as jQuery and Dojo so I understand web pages are more complicated now than they used to be. However, it seems to me these memory numbers are an order of magnitude off as I would expect even the most dazzling Ajax-ified web application to take no more than 50 MiB of memory. Even then, at 50 MiB that is some serious HTML/CSS/JavaScript/images/videos/etc.

And I thought Microsoft was terrible at memory management, especially with their Office apps.

Edit: I received a tweet from @perlmeister1l pointing me to a Chrome Help page called Reduce Chrome memory. Basically, Chrome has its own built-in Task Manager that allows you to see exactly which tabs are consuming your CPU and RAM resources.

While this is definitely more helpful than the System Monitor, the only suggestion provided in the help was to kill tabs you no longer need to free up memory. This is not entirely helpful since I would have done this anyway. Rather, I would prefer to know in greater detail about exactly why my Yahoo! Mail tab is taking up 536MB of RAM. How much of that is the DOM? JavaScript? Images? Ads? You get the picture.

Monday, April 4, 2016

Google Drive for Linux

I am an admitted Google fanboy, especially of their Google Drive product. Unfortunately, after nearly four years since Google announced a Linux client was coming it is still MIA. Going to the Google Drive download page gives you this message:

A bit ironic that the page says, "Get Drive Everywhere", and then in the fine print states, "Running Linux? Stay tuned - Drive for Linux isn't ready just yet." At this rate who knows if Google will ever release a Linux client for Google Drive.

Since Google doesn't support Linux with their Google Drive app, what options are available?

  • drive: This little command-line utility was originally developed by Burcu Dogan while she was on the Google Drive team. It has since been taken over by Emmanuel Odeke and appears to be well-maintained.
  • google-drive-ocamlfuse: This is an interesting project in that it allows a user to mount Google Drive on Linux as just another filesystem. The author Alessandro Strada maintains a PPA so that it can be installed and maintained with Apt.
  • GoSync: This is an open source Google Drive client for Linux written in Python. It looks like from the v0.4 release that a lot of improvements were made including:
    • Ability to select folders to sync
    • File rename, move, and deletion now supported
  • rclone: Rclone is the Swiss Army knife of cloud storage command-line utilities. It can sync files and directories to and from a number of cloud storage services including:
    • Google Drive
    • Amazon S3
    • Rackspace cloud files
    • Dropbox
    • Google Cloud Storage
    • Amazon Cloud Drive
    • Microsoft OneDrive
    • The local filesystem
    • etc...
  • insync: Touted to be "The most powerful Google Drive client ever built", insync integrates Google Drive with Windows, Mac, and Linux. It has an impressive list of features on its website. Yes, it is closed-source and requires you to purchase a license in order to use it. An entry-level consumer license for one Google account runs $25.
  • overGrive: A GUI-based tool that supports a wide array of Linux distributions and desktops including Ubuntu Unity. Like insync, it too is closed-source and requires purchasing a license for $4.99 which is a latte at Starbucks. It does have some minor limitations (no symlink support) but appears to do most everything else you would need. Comes with detailed instructions on how to install on Ubuntu.
There are quite a few intriguing options for getting Google Drive to work on Ubuntu. What are your thoughts on which of these solutions should be the one to go with?

Nautilus Still Shows Hidden Files By Default

I needed to make a change to a hidden file so I pressed Ctrl+H while Nautilus was open in order to see it. For some reason Nautilus took this as "You want to change your preferences to show hidden files also" since Nautilus would show those hidden files by default every time I opened it afterwards.

And it's not enough to press Ctrl+H to re-hide them again, or even to open the View menu and unselect the "Show Hidden Files" option. Nautilus will just open the next time showing all those hidden files again.

The only way to get this resolved for now is to go to Edit -> Preferences and uncheck the "Show hidden and backup files" option.

Of course I am expecting this to be a temporary fix until the next time I need to see hidden files in Nautilus and I press Ctrl+H again. According to this post on the Ubuntu Forums Nautilus has been acting like this for at least three years now.

Any idea when this bug can get fixed?

Congruity no longer useful for configuring Logitech Harmony remotes on Linux?

I installed Congruity, which is a GUI that handles writing configurations to Logitech Harmony remotes from Linux, and then visited the Logitech Harmony website expecting to be able to configure my Logitech Harmony One with their website configuration tool.

Going to the Set Up page, I was able to find a section for my remote. However, Logitech now wants you to download desktop software called MyHarmony that is only available for Windows or Mac machines. Clicking on a box that says "Looking for the old sign in page?" brings up the following message:
Harmony has moved away from a website application and now leverages either the MyHarmony desktop software and/or Harmony smartphone app, depending on your remote. The website login has been phased out.

This was done to eliminate issues related to browser plug-in issues and increasing browser security policies. All existing account information still exists and is accessible by downloading and signing in to the new software.
So it looks like Congruity may no longer be of use since it is not possible to generate the Harmony remote configuration files from the website.

Therefore I am putting this configuration step off until I install my Windows 10 VM.  Didn't I say "goodbye to Windows 10" earlier? I meant I'm putting Windows 10 where it belongs. In a virtual machine.

...And it's goodbye to Windows 10

I have been running Windows since I built a $4,000 machine my freshman year of college.  I purchased Windows NT 3.5 Workstation because it was the latest and greatest technology at the time, and from an OS standpoint it was going to be the future of computing.

I also did a dual-boot setup with Slackware soon after just to play around with Linux, the new kid on the block. The primary lesson I learned from doing this was hardware support in Linux was nowhere close to Windows.  I remember trying to get an Iomega Zip Drive to work with Linux and it turned into a beat-down of searching the brand-new Internet only to find esoteric instructions of modifying primitive config files that in the end still did not get it to work properly.

Fast-forward many years later, and I decide to give Linux another try.  I don't remember how I found out about Ubuntu but I ended up using it as the distro of choice for my experiments. Based upon my prior experience the number one thing I was concerned about was device support.  My strategy was to do just a basic install of Ubuntu 9.x on what was new AMD hardware at the time and see if it worked OOTB. If not, then I would put Windows on it and move on.

Delightfully, Ubuntu worked right out of the gate with a basic install! From then on I was hooked on Ubuntu.  The only stumbling block I ran into was getting the drivers for a HighPoint RocketRAID 2640x4 card installed properly but I didn't expect it to work from a basic install anyway. Eventually the RocketRAID card worked just fine in a RAID 1 configuration so I was pleased as a peach.

However, there were some other issues with the Linux sphere that still lingered on. These were mainly software compatibility issues with the dominant Microsoft apps such as Office. For example, trying to open an existing Word document in OpenOffice would not render properly. Or opening an Excel spreadsheet in OpenOffice would fail because not all of the built-in Excel functions were supported. So with Ubuntu 9.x, the hardware support was there but software compatibility was spotty at best. Linux still wasn't ready for prime-time as a complete desktop replacement for Windows.

Several things have changed though since those days that brings me to where I'm at today (blogging from an installation of Ubuntu 15.10 Desktop with Google Chrome). The first major issue is that Microsoft fell down hard with what was their two biggest advantages over Linux a) hardware support with solid OEM device drivers, and b) laser-like focus on usability. I built a new machine in 2014 with an AMD APU running Windows 8.1 and had nothing but trouble with it from Day 1:

  • No Start Menu: This was by far the dumbest thing Microsoft has ever done. Assuming that every Windows 8.1 install would be on a PC with a touch-screen is just stupid. It wouldn't have been so bad if I could have found the apps I wanted to open some other way, but the built-in search functionality was absolutely horrendous.
  • Could Not Lock Screen: Literally I could not lock my brand-new Windows 8.1 PC. Why? Because Windows 8.1 would turn off the USB ports where the keyboard and mouse were plugged in making it impossible to log back in. *gasp* hardware issues with Windows?!
I hated every minute of running Windows 8.1, but I knew at the time I still couldn't migrate to Ubuntu yet. I was still dependent on some Windows-only apps such as Microsoft Office, iTunes, etc. But then came along Google Drive with tight integration to Google Docs/Sheets/Slides. Put all of my Microsoft Office docs into the cloud?  Hmm, intriguing. A lot of people have issues with this idea due to "privacy" but I don't see any problems with it. Especially since I am in full control of which documents I want to share with others, and by default all Google Docs are private to you the author. So I went ahead and migrated all the documents I had into Google Drive and never looked back.

Microsoft then comes along and releases Windows 10 and it is free for me to upgrade from Windows 8.1 (free, really?). I jumped all over this as I could not wait to get off Windows 8.1 and onto something, anything that was "better". I say "better" because that is naturally a relative term to the state of the baseline. I thought for sure Windows 10 would be "better".

Experience turns out to show that Windows 10 is much worse. How worse?
  • Start Menu Refuses to Open: The Start Menu is back (yay!). But after a day, maybe a couple days, it refuses to open when clicked on (boo!). Time to reboot...
  • Keyboard Shortcuts Refuse to Work: Have a special key to open the Calc app? It fails to work right around the time the Start Menu refuses to open. Try Super+S and search for Calc to open that way? Don't even bother, it doesn't work either. Time to reboot...
  • Apps Refuse to Open When Clicked on in Start Menu: Start Menu working? Check. Try to open Word under the Apps list? Nope. Click on it all you want, it's not going to open. Time to reboot...
  • The Freaking Calc App Has a Freaking Survey When Opened: All I want to do is do some maths and Windows asks me if I am enjoying the calculator app. The answer is NO! because you are asking me if I enjoy using the app when all I am trying to do is use the app. Unfortunately a reboot cannot fix this stupid issue, but migrating to Ubuntu can!
  • Opening an App for a File Times Out: Got a screenshot on your desktop you want to look at? Click on it, wait a while, and get a message that the attempt to open the file timed out. Splendid!
  • Attempt to Delete File Ignored: Don't need that screenshot on your desktop anymore? Just try to delete it, I dare you. It won't go anywhere when you try it.
  • Severely Unstable Graphics Drivers: I put this on AMD as much as Microsoft.
    • Desktop randomly crashes and takes some open apps with it
    • Menus from background apps bleed onto the foreground app
    • Random restarts without any user prompts whatsoever
  • Horrendous Memory Management: I was running Ubuntu 14.04 Desktop in a VMWare virtual machine with 2.5GB RAM allocated. I had 16GB available so I should have never run into any memory issues whatsoever. Windows 10 would tell me that I was running low on memory when Task Manager showed I still had 3GB free. Oh, and then Windows would just go ahead and kill my Ubuntu VM without asking. Jealous much?
I was not going back to Windows 8.1, and since Windows 10 is supposedly the "last" Windows version I had to get out of this quagmire. I was going to wait until Ubuntu 16.04 LTS was release on April 21st to "upgrade" from Windows 10 but I had to move to Ubuntu 15.10 because I bought components to upgrade my desktop to the Intel Core i5 Skylake platform and didn't want to wait several weeks to play with my new hardware.

So how did the transition to Ubuntu 15.10 Desktop go?  Stay tuned to find out...