Dropbox doesn’t start (Linux)

So a quick note regarding Dropbox running on ArchLinux with Nvidia drivers. Since I use KDE Plasma 5 that doesn’t show system tray icons of some applications that have not migrated to the new system tray protocol, I didn’t notice that after upgrading Dropbox it stopped working.

A quick investigation, I’ve found out that starting Dropbox from the command line did nothing. It started and stopped. Something is going on…

So I’ve used the strace command to see if I could catch something meaningful:

[pcortex@pcortex:~]$ cd .dropbox-dist/dropbox-lnx.x86_64-3.10.8/
[pcortex@pcortex:dropbox-lnx.x86_64-3.10.8]$ strace ./dropbox 2> stracedump.txt

And sure enough in the stracedump.txt I had the following error:

open("/usr/lib/dri/tls/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/dri/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
rt_sigaction(SIGSEGV, {0x7f09e1dea010, [SEGV], SA_RESTORER|SA_RESTART, 0x7f09e1a88d60}, NULL, 8) = 0
write(4, "Fatal Python error: ", 20)    = 20
write(4, "Segmentation fault", 18)      = 18
write(4, "\n\n", 2)                     = 2
write(4, "Traceback (most recent call firs"..., 36) = 36
write(4, "  File ", 7)                  = 7
write(4, "\"", 1)                       = 1
write(4, "d", 1)                        = 1

So the error is related to the Software Raster library, that I don’t have because I’m running Nvidia proprietary drivers.

The confirmation came with the following command:

[pcortex@pcortex:dropbox-lnx.x86_64-3.10.8]$ LIBGL_DEBUG=verbose ./dropbox
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: reverting to indirect rendering

The solution?
Quite simple, just remove (backup) the libGL.so.1 library that exists on the Dropbox directory.
After the removal, Dropbox starts just fine.

Linux: Slow or unbearable performance with high memory usage applications

Well this post title is a bit vague because the issue that have affected me can have several sources, not just the one that I’ll describe. But I suppose the solution is the same independently for all sources.

Anyway, I was suffering from a strange problem on both my computers, the desktop has 6GB of RAM, and the laptop, 16GB.

On the desktop machine, where I use KDE 4 on Arch Linux, the desktop can froze when using some resource intensive applications like Google Maps on Firefox or Chromium and Android Studio. When the frozen desktop situation happens, I just have to wait a few minutes, during which time, the keyboard is irresponsible and the mouse is “jumpy”, or doesn’t work at all. And so after a while, one random application, that could be anything, including the desktop, is killed, with some cryptic message regarding sacrifice on the system logs…

Anyway, on the Desktop, due to the fact that I’ve upgraded the main disk to an SSD, I didn’t enabled the swap partition. And that was one of the main reasons of this behaviour that I was having. Despite having 6GB of RAM, a swap file is good to have, and so I’ve used a swap partition on one of the spinning disks.

That apparently stopped the issues on the desktop and it never froze like it used to when performing the same tasks.

On the laptop it was another matter, mainly because of the fact that it only has a 120GB SSD disk, and no spinning disks, I had no swap file/partition created or enabled. I though that with 16GB of RAM, why bother… but due to professional related activities, I had to start to work with the HortonWorks HDP 2.3 big data/hadoop platform, and that is a heavy resource hog…

So, despite of having 16GB of RAM available, the Hadoop virtual machines based on Vmware could make the computer just froze for lenghty periods of time, just like my desktop computer.

But, now I know that was related to fact that I didn’t have a swap partition/file, and so I’ve created one.

The swap file solution for this specific case didn’t solve completely my issue, but I did managed to see a process named khugepaged consuming huge amounts of CPU.

And that was the reason that I had for my frozen desktop and virtual machine for some lengths of time.

So I’ve disable the Huge Page support on my host operating system, AND on my guest CentOS virtual machine that is running HDP 2.3:

[root@dune:cortex]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
[root@dune:cortex]# echo never > /sys/kernel/mm/transparent_hugepage/enabled

[root@dune:cortex]# echo never > /sys/kernel/mm/transparent_hugepage/defrag
[root@dune:cortex]# cat /sys/kernel/mm/transparent_hugepage/enabled          
always madvise [never]

More info can be obtain here:

http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/

So this might not be the magic bullet if we are having desktop freezes, and not using huge amounts of RAM, but it might help.

Upgrading to an SSD, moving from Kubuntu to Arch Linux and setting up KDE

This is a single post just to make notice of some points:

My home desktop PC, was running since 2009 the Kubuntu distribution. I’ve never reinstalled it and did always the upgrades from 8.10 to 9.04, 9.10 and so on until 14.04. Almost six (!) years with no virus, trojan horses, and a single initial installation. I’ve upgraded through the years the KDE desktop since the ill famed initial 4.0 release, to the latest 4.6 release.

But things where starting to go awry… At the beginning I had a ATI 4870 graphic board, but ATI dropped support for it on Linux (and Windows) and since I had so many troubles with the proprietary driver, and to add it up I had no support for the board, I sold it and bought an Nvidia GTX660.

But with both graphic boards, I had suffered from a long time problem: I could only do a sleep/resume a number of times before the system hanged. The symptoms starting from loosing network connectivity and then restoring right back, and some cycling of these symptoms to a complete lockup. At first I thought that was due to the network driver used by my motherboard, a Asus P6T with  a Realtek RTL8111/8168/8411 board, but with the correct driver for it, the issue continued.  Booting up was a painful two/three minute wait from BIOS to desktop.

But after a while I could pin point my issues not to the network board but to the Xorg and video driver combination. Some EQ buffer overflow, hanged X, and finally the machine.

Ubuntu and Kubuntu based distributions have PPA’s repositories where some alternative software and versions of mainstream software are available. I had trouble with some of these alternative PPA’s when upgrading, and had to remove them (with ppa-purge) to be able to upgrade the Kubuntu distribution. Anyway, there is an PPA, xorg-edgers,  where alternative and more recent versions of Xorg Software and Nvidia drivers are provided and that almost solved my sleep/resume problem. The problem was that after adding this PPA the Ubuntu/Kubuntu nvidia driver and the Xorg-edgers driver, after updates the X server was unable to find the nvidia driver, despite being installed, and had to reinstall the driver again to get my desktop working.

That was it. I had enough with Ubuntu/Kubuntu distributions. My bad and my issues, sure…

I’ve being testing Arch Linux on my work laptop for almost an year with great success. I’ve chosen Arch Linux because I didn’t had to loose an unknown number of hours per year upgrading to the next distribution version, and an rolling release version makes more sense. And Arch has the greatest Linux Wiki out there even solving problems that happen on the Ubuntu/Kubuntu line, and also mainly there are only one (well two) repositories. No PPA’s mess.

So I completely moved all my systems to Arch Linux, and my sleep/resume issue is 100% solved.

SSD on a SATA II based motherboard

My desktop computer has an Asus P6T motherboard. This motherboard only has SATA II (SATA 2) ports. Is it worth to use an SSD on such a board without upgrading to a SATA III board?

The answer is YES. If you have a SATA II based motherboard AND not buying an SSD because of that, do not wait any more. Buy it now. It is totally worth it.

Arch Linux is of course way lighter than Kubuntu, and with an SSD ( by the way it’s a Crucial MX100 256GB) my two/three minute boot to desktop time came down to 15s…

hdparm -Tt /dev/sdc
/dev/sdc:
Timing cached reads:   16710 MB in  2.00 seconds = 8361.40 MB/sec
Timing buffered disk reads: 728 MB in  3.00 seconds = 242.59 MB/sec

Note the Samsung EVO 120GB that I have on my work computer, that has the flawed firmware that slows down with time, on a SATA III based motherboard:

/dev/sda:
Timing cached reads: 23864 MB in 2.00 seconds = 11943.41 MB/sec
Timing buffered disk reads: 164 MB in 3.01 seconds = 54.47 MB/sec

Compare this with my desktop old boot disk, an WD 640GB blue:
/dev/sdb:
Timing cached reads: 16580 MB in 2.00 seconds = 8296.87 MB/sec
Timing buffered disk reads: 356 MB in 3.00 seconds = 118.59 MB/sec

I hadn’t yet had the time to upgrade the firmware on the EVO…

Making KDE looking good on Arch Linux

To end this rather long and tedious post, and also to my future reference, to make KDE looking good:

    • Make sure that the infinality modifications are installed: https://wiki.archlinux.org/index.php/Infinality. Make sure that you update.
    • Make sure that the DPI detected by your X server are correct for your monitor. Install xdpyinfo with pacman -S xorg-xdpyinfo. Figure out what might be your monitor dpi using this site: http://dpi.lv/ . Execute xdpyinfo | grep -B2 resolution and see if are similar. If not you need to set the correct dpi either in xorg.conf or in the Kde settings.
      In my case I have a dual monitor setup, and hence the weird dpi 95×96.screen

      #0: dimensions: 3200×1080 pixels (856×286 millimeters)

      resolution: 95×96 dots per inch

      So my font settings are:

Selection_002

  • While the above settings make my fonts look good, the taskbar fonts where awful and took me a while to figure out that was not the dpi settings but the Desktop Theme.
  • To solve this first install Krita with pacman -S calligra-krita . This will install the Krita color themes that are, in my opinion very good. And on KDE System Settings -> Workspace Appearance -> Desktop Themes select Get New Themes and get the AndroidBit theme.
  • That’s it:Selection_004
  • I’ve selected the Produkte Desktop Theme
  • And the colors:Selection_005

Arch Linux and PyQwt installation

Some things that we take for granted on other distributions, seem to take a bit of work on Arch Linux. Basically is because that Arch Linux is more or less a bleeding edge distribution, and some packages lag behind in that continuous update cycle .

So I needed to use python to do some plotting with the QwtPlot widget available at the Qwt library. To use the Qwt widgets  from python, we need the Python bindings PyQwt.  The problem with this is that installing PyQwt from AUR uses the deprecated build system based on the configure.py script and the pqtconfig object that no longer exists on the most recent version of PyQT on Arch Linux.

So when we try to install PyQwt from Arch Linux AUR repository, the following error happens:

Requires at least PyQt-4.2 and its development tools.

An the installation fails. This is due to the missing pqtconfig python module. We can see that by running python and executing the following line:

import pyqtconfig as pyqtconfig

This error can be seen a fault of either: PyQwt hasn’t had no updates for the new PyQt releases, or PyQt, in it’s newest version, didn’t keep backward compatibility.

The fact is that it seems that is the PyQt package on Arch Linux that didn’t keep that backward compatibility, by dropping out the pqtconfig class/object on the package installation. Who knows…

This blog entry: http://vogelchr.blogspot.pt/2014/08/building-pyqwt-520-by-manually.html has the solution and it solves the issue with the PyQt package by installing the missing module.

Just build PyQT from sources, and at the end just copy the missing module.

  1. Download PyQt from http://www.riverbankcomputing.co.uk/software/pyqt/download
  2. Extract the package at a temporary directory
  3. Build it: python2 configure.py -v /usr/share/sip –qsci-api -q /usr/bin/qmake-qt4 
  4. Install the missing module: sudo install -m644 pyqtconfig.py /usr/lib/python2.7/site-packages/PyQt4/pyqtconfig.py

From that point, installing PyQwt from AUR works just fine.

Arch Linux test drive: Thoughts from a Kubuntu user

My old work laptop computer is about to be replaced by my employer by a new ASUS N73SV.

First of all this computer has what is called the Optimus Graphics Technology, that isn’t so Optimus regarding Linux… This technology is made of two video cards, one Intel embebed on the chipset and one discrete Nvidia chipset. As far as I know there is no Linux driver for this, and Nvidia won’t be releasing in a foreseeable future Linux support. So the Intel card will be used (I’m not using this for games) and the Nvidia card will be disabled. There are solutions for disabling completely the card and or use some applications on the Intel card and others on the Nvidia card, I’ll have to check. But disabling the Nvidia card improves the battery life, so…

So, off course, the first thing to do this computer is to nuke the Windows 7 install and install a Linux OS…

And there’s the catch: Kubuntu 11.04 or the Arch Linux Rolling distro?

Both have great documentation and great communities, but both could have some “clean up” on it. For example, on the Arch Beginner Install, some things aren’t completely obvious (Well at least for me). This is due to the fact that the documentation is in fact complete, it shows all the possibilities, but it should only show first the most obvious/common/standard way, and then link out the complete documentation regarding the subject. This way documentation could be more slim and straight forward.

Anyway, I was able to install and get an Arch system running without any issues with KDE Desktop but there where issues, and those are not Arch Linux fault. These issues are related to it’s mirrors and the software and sync status of them.

So being on PT, I’ve enabled all PT mirrors, and ended up with KDE 4.4.5 installing and running… Well the latest release of KDE is 4.6.3, so what happened here??? Browsing the mirrors I’ve found out that some where not up to date, so I’ve disabled them, and sure, pacman now shows that KDE 4.6.3 is available. So I’ve disabled the out of date mirrors, and while downloading I had failures regarding mplayer, and x264 packages that wouldn’t allow the upgrade to proceed.

Humm, ok, so I’ve enabled the core repository, and now everything is downloaded fine, but pacman refuses to upgrade due to some packages are corrupted.

So, not of the best starts…

But still I’ll give Arch Linux a try, because mainly on Kubuntu to have the latest software version, namely Libreoffice and even Calligra for test driving means to add backports and probably broking your next mandatory upgrade.

So, after reading the Arch Linux Wiki, I’ve found out that there is a mirror status page that shows what mirrors are available and up to date. I’ve deleted my obsolete mirrors, and enabled only the “live” ones (one in my case and did a full upgrade, and after an hour, more or less I had KDE 4.6 SC installed and running.

So far what I’ve done:

– Installed the base Arch system, making sure that the mirror list was up to date.

– Configured a new no priviledge user, and set up sudo

– Installed Xorg and KDE

– Configured the dbus and kdm daemons to start automatically

Then, I want to install the KDE Kpackagekit, but this was only available on AUR, not on the mainstream repositories. I’ve followed the instructions on http://archlinux.fr/yaourt-en#get_it and installed yaourt package manager. From here I’ve installed Kpackagekit, and with it I was able to install through KDE the rest of packages that I wanted, namely  the kdeplasma network widgets.