[Solved] “is not co-installable with” errors on Ubuntu

I installed 32bit wine on 64bit Kubuntu but for some reason it didn’t install properly so I tried reinstalling wine 64 bit and got the following error:

dpkg: error processing /var/cache/apt/archives/wine1.2_1.2.3-0ubuntu1~ppa1_amd64.deb (–unpack):
wine1.2: 1.2.3-0ubuntu1~ppa1 (Multi-Arch: no) is not co-installable with wine1.2:i386 1.2.3-0ubuntu1~ppa1 (Multi-Arch: no) which is currently installed

You can’t simply remove 32bit wine using apt-get remove wine1.2. To fix the issue suffix the package name with ‘:i386’.

Therefore, I solved the problem by:

sudo dpkg -r wine1.2:i386

[Solved] Unadjustable brightness on laptops having i915 kernel module

I recently purchased a new laptop HP DV6121tx and installed linux on it. Apart from the muxless switchable graphics and openGL (HP will release a BIOS update to fix it soon), and brightness control, everything worked. I couldn’t change the brightness using the Fn Hotkeys. They displayed the brightness applet on pressing but nothing happened.

After scavenging, what seemed like the whole WWW, I finally found a modified kernel by Kamal Mostafa which fixed the issue. You can see the bug reports and patch here.

The issue seemed to be with i915 kernel module and how it handled brightness on certain laptops which had different ACPI implementation.
Only install this kernel if you are using i915 kernel module. You can check if its active by executing:

lsmod | grep i915

If it gives you output, it means you’re using the i915 kernel module and you can proceed further. If it doesn’t give any output, you should leave this page.

Fix the brightness issue by installing kernel debs provided in Kamal’s PPA.

sudo add-apt-repository ppa:kamalmostafa/linux-kamal-mjgbacklight
sudo apt-get update
sudo apt-get dist-upgrade

This will install the modified kernel. Alternatively, you could do (not recommended):

sudo add-apt-repository ppa:kamalmostafa/linux-kamal-mjgbacklight
sudo apt-get update
sudo apt-get install linux-headers-2.6.38-10 linux-headers-2.6.38-10-generic linux-image-2.6.38-10-generic linux-libc-dev

Reboot into the modified kernel to confirm the brightness keys work. Cheers!

[Solved] Disqus causing admin panel issues in wordpress

Disqus comment system was causing javascript errors, which in chrome console looked something like this:

Uncaught Syntax error, unrecognized expression: [href=edit-comments.php?page=disqus]

It caused unmovable widgets, screen-options didn’t open and other related javascript issues in admin panel.

After some researching it turns out, there’s a simple fix.

In /wp-content/plugins/disqus-comment-system/disqus.php, find:

href=edit-comments.php?page=disqus

and replace it with:

href=”edit-comments.php?page=disqus”

Cheers

[How-To] Disable CPU cores in Linux

Although there’s no reason to do this, but some of you might have problem with apps not running well in multi-core environment or maybe looking to save some power (although disabling cores on sandy-bridge CPUs won’t save much power), I’ve written this simple tutorial to disable CPU cores in Linux.

I have i7 2630QM process which has 4 physical cores and 4 logical cores. I’ll show you how to make it act like a dual core machine instead.

Method 1:
This method is dynamic and doesn’t require a reboot. You can just open a terminal and try this out:

  • sudo sh -c "echo 0 > /sys/devices/system/cpu7/online"
    sudo sh -c "echo 0 > /sys/devices/system/cpu6/online"

    Repeat the above steps for cpu2 to cpu7 and it’ll leave you with cpu0 and cpu1 active which is essentially what we’re trying to achieve.

Method 2:
This method will make the linux boot with 2 cores which might make kernel more optimized for dual core environment than the method above.

  • Add maxcpus=2 to GRUB command line by doing the following:
    gksu gedit /etc/default/grub

    Find:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    and change it to

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash maxcpus=2"
  • Then run:
    sudo update-grub

    When you reboot, linux will run on 2 cores.