Qt Creator error: Cannot retrieve debugging output

Qt Creator allows you to open and run multiple instances of Qt Creator at the same time. But there is a small glitch. If you are running multiple instances of Qt Creator, only the first instance displays the console output in the Application output console. The second instance would complain with the following error message:

Cannot retrieve debugging output

Fix for this is to close the second instance or open the project you want to edit and debug in the first instance.

boot2docker: Add volume from windows host to the docker container

boot2docker is great. It allows us to develop using docker even on Windows PCs. One feature that is totally awesome is its ability to share folders on windows host with boot2docker virtual box image. This shared folder from windows can then be used as a volume in the docker containers.

The first part is available to you out of the box. boot2docker shares the c:\User directory with the boot2docker virtualbox image and mounts it under /c/. Yay!

You can add this folder or part of it to the docker container as you would with normal folders.

docker run -it -v /c/:/data/ : bash

This will add the whole C:\User under /data in the launched docker container.

Linux: Detecting and adding fan control

I bought a Zotac EI750 HTPC recently. It has very good specs but its fan gets noisy very too often. Ubuntu by default doesn’t detected EI750′ fan. I installed lm-sensors and tried sensors command.

sudo apt-get install lm-sensors
sudo sensors

Sensors listed my CPU thermal sensors correctly but couldn’t find the fans.

Adapter: Virtual device
temp1: +27.8°C (crit = +105.0°C)
temp2: +29.8°C (crit = +105.0°C)

Adapter: ISA adapter
Physical id 0: +40.0°C (high = +84.0°C, crit = +100.0°C)
Core 0: +36.0°C (high = +84.0°C, crit = +100.0°C)
Core 1: +37.0°C (high = +84.0°C, crit = +100.0°C)
Core 2: +35.0°C (high = +84.0°C, crit = +100.0°C)
Core 3: +38.0°C (high = +84.0°C, crit = +100.0°C)

This means that the driver for the fan is not loaded. I should find what fan my system has and load its driver. So, I executed sensors-detect to see if lm-sensors can find the fan.

sudo sensors-detect

Luckily, it did!!! I have Nuvoton NCT5532D/NCT6779D and the corresponding driver is nct6775.

Found `Nuvoton NCT5532D/NCT6779D Super IO Sensors’ Success!
(address 0xa10, driver `nct6775′)

Driver `nct6775′:
* ISA bus, address 0xa10
Chip `Nuvoton NCT5532D/NCT6779D Super IO Sensors’ (confidence: 9)

Now, its easy! Load nct6775 module.

sudo modprobe nct6775

Sensors should detect your fan now.


fan1: 0 RPM (min = 0 RPM)
fan2: 2246 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
fan5: 0 RPM (min = 0 RPM)

Gnome3: Enable suspend/hibernate option without swap partition

Linux needs swap partition to suspend or hibernate. But there is a way to enable suspend and hibernate without creating a swap partition. The trick is to create a swap file instead of partition and informing linux to use this swap file instead of swap partition.

Install pmi(power management interface) package

sudo apt-get install powermanagement-interface

Now you should be able to suspend using either

sudo pm-suspend


dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Peculiarly for me, the screen doesn’t lock when the PC suspends. Alternatively, you can lock and suspend using the following command

gnome-screensaver-command -l && dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Enable suspend option in Gnome3 status menu

You can enable suspend option in Gnome3 status menu by installing the following extension.

Crack and install Modelsim on linux

Note: Piracy is crime. Please don’t use or encourage pirated software. If you would like to evaluate Modelsim, try the evaluation version. If you still haven’t changed your mind, read on :P.

1) Install the required dependencies

2) Download modelsim 10.1c for linux and its corresponding crack.

3) Mount the downloaded modelsim iso and install modelsim.

mkdir /tmp/modelsim/
mount -o loop path-to-iso /tmp/modelsim
cd /tmp/modelsim

Note:Install modelsim under ~/modelsim/ directory. If you choose another location, please make sure you exchange the default location with your preferred location in the steps below.

4) Execute this script to crack modelsim

Comment the first two lines in the generated license.dat

#SERVER xxxx xxxxxxxxxxxx 27001
#VENDOR mgcld D:FEATURE mgc_s mgcld 2020.00 1-jan-2021 999 0 TS_OK

5) Fix libfreetype problem (Only required if you face this problem)
Try to start vsim

cd ~/modelsim/modeltech/linux_x86_64/

If vsim reports the following error, your distro’s freetype library doesn’t play well with modelsim.

** Fatal: Read failure in vlm process (0,0)
Segmentation fault (core dumped)

Use the following script to compile custom freetype

6) Modelsim is ready to use! One last step, add these commands to ~/.bashrc to avoid executing every time you start a new terminal

Linux and Modelsim!!!! Ain’t it fun?

Ubuntu: Compiling ffmpeg from source

Ubuntu uses avconv instead of ffmpeg. It also doesn’t have a package for libswresample. This can be problematic at times. So I resorted to installing ffmpeg from source. You need the following packages to compile ffmpeg from source.

sudo apt-get install yasm pkg-config

Lets clone the ffmpeg repository and compile it.

git clone https://github.com/FFmpeg/FFmpeg.git FFmpeg
cd FFmpeg
./configure --prefix=/usr/local/ffmpeg --enable-shared
sudo make install

After the above step successfully completes, ffmpeg should be installed in /usr/local/ffmpeg directory. Since we have installed ffmpeg in non standard location, we have to set PKG_CONFIG_PATH and LD_LIBRARY_PATH correctly. Add these lines at the end of your ~/.bashrc.

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/ffmpeg/lib/pkgconfig/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/ffmpeg/lib/