Saturday, 4 January 2014

Dell XPS13 Developer Edition (Haswell) touchpad not recognised by Synaptics Ubuntu 13.10


After installing Ubuntu 13.10 on this laptop I found that the touchpad settings could not be modified from the usual mouse menus, and two fingered scrolling/edge scrolling could not be enabled.

It turns out this is due to the touchscreen driver interfering with the mouse driver, and a workaround is provided here. Just run:

sudo echo blacklist i2c_hid > /etc/modprobe.d/blacklist_i2c_hid.conf
and reboot. This left the touchscreen still functional for me, and the touchpad is now picked up by Synaptics.

Dell XPS13 Developer Edition (Haswell) touchscreen not working in Ubuntu 13.10


After recently purchasing one of these laptops and deciding to update from vanilla Ubuntu 12.04 LTS to 13.10 I found the touchscreen was no longer working.

The solution, happily, turns out to be extremely simple. I updated to Kernel 3.12 from the Ubuntu Kernel PPA.

Download the appropriate deb files for your version of the OS, for me these were:

 linux-headers-3.12.6-031206-generic_3.12.6-031206.201312201218_amd64.deb
 linux-headers-3.12.6-031206_3.12.6-031206.201312201218_all.deb
linux-image-3.12.6-031206-generic_3.12.6-031206.201312201218_amd64.deb

Then navigate in the terminal to the directory these were downloaded to and run:
sudo dpkg -i linux*3.12*.deb
Assuming there were no errors, reboot and you should be set.

Friday, 29 November 2013

Intel 7260 wireless stops working / is dropping in kernel versions 3.11/3.12


I'd recently been having trouble with the Intel 7260 wireless card in my laptop with these kernels. There were several manifestations of the problem:

  • With powersaving on the card would repeatedly drop and eventually reconnect under kernel 3.12
  • With powersaving off and connected in ac mode the card would frequently (but very quickly) drop authentication, then reauthenticate with the network. This mostly manifested in the form of freezes in audio/video conversations, and was visible in dmesg.
  • With powersaving off and connected in bgn mode the wireless would work pefectly for a certain amount of time, and then stop. Wireless would still show as connected, but there would be no network traffic. Fixing this required turning the network interface off and on again.
There are several bugreports up for this card in Bugzilla at the moment, so I decided to try pulling in some more up-to-date iwlwifi code from the compat-wireless backports repository. A guide on compiling and installing these can be found here or in the answer here.

The long and short of it is, in the dir with the tarball:
tar -xvf backports-*.tar.gz
cd backports*
make defconfig-iwlwifi
make -j2
sudo make install    
After building and installing the compat wireless for kernel 3.12.1, my current running kernel (you can determine yours with uname -a) I've found the experience to be much better so far, no irritating drops to date.

Sunday, 24 November 2013

Frequent pauses/freezing in Gnome Shell/Ubuntu 13.10 with Sandy Bridge


While doing any graphics heavy task, such as playing a game or just watching Netflix via pipelight I was getting frequent pauses, where the entire system would lock up for ~5 seconds.

Dmesg was showing the following whenever it happened:

[drm:i915_set_reset_status] *ERROR* render ring hung inside bo 3.11

It turns out this is related to a bug in Mesa, which has been fixed in 10.0. To update to this in Ubuntu 13.10, add this repository:

sudo add-apt-repository ppa:oibaf/graphics-drivers
then:
sudo apt-get update && sudo apt-get dist-upgrade
and restart.

Be aware that while these packages seemed stable for me, they could well result in system instability for others. Make sure you know what you're doing and have a recovery plan, or backups should you need to revert. Something like PPA-Purge is likely the trick.

Skype not using Pulseaudio in Linux Mint 16 Cinnamon 64 bit


Another quick one. I was having trouble with Skype in the recent Linux Mint 16 RC with Cinnamon 2.0 (an otherwise fantastic release). Skype was showing a long list of audio devices and utilising Alsa, which was causing some problems when other sound events occurred via Pulse.

To fix, just run:

sudo apt-get install libpulse0:i386
And restart Skype, hopefully that's that.

Sunday, 17 November 2013

Bad Overview performance in Gnome 3.8? Try re-enabling UXA on your Intel card


After upgrading to Ubuntu Gnome 13.10 recently, I was struck by how much worse graphical performance was in the overview, and was greatly disappointed, as I've been using Gnome on 12.04 for a very long time now without difficulties.

On a hunch I re-enabled UXA for the Intel graphics chip in place of SNA, and the difference is night and day - pretty much on par with what it was before. This is using a Sandy Bridge i7-2670QM, HD 3000 cpu.

To do so:

sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf
Paste in the following text (ctrl + shift + v):
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection
Ctrl + X to exit and save, then reboot.

Edit: I've additionally found that after upgrading to Kernel 3.12.1 overview performance has increased again.

Saturday, 16 November 2013

Monodevelop crashes on startup in Linux Mint 16/Ubuntu 13.10


Nice and easy one this time round, looks like the dependencies on the package aren't set properly:

sudo apt-get install libmono-cairo2.0-cil
That should sort it.

Sunday, 15 April 2012

Fix mouse sensitivity (Razer Diamondback 3g)


After plugging in a Razer Diamondback 3g in Ubuntu 11.10 I found that the sensitivity was spectacularly high, and I was unable to edit it using gnome settings.

The fix is to manually edit xorg.conf to set a constant deceleration for the device in question.

sudo gedit /etc/X11/xorg.conf
Whether or not the file exists, simply append the following:

Section "InputClass"
     Identifier "mouse speed adjustment"
MatchIsPointer "on"
MatchProduct "Diamondback 3G"
Option "ConstantDeceleration" "2"
EndSection

Where MatchProduct will look for a device name containing what is specified. This can be found by running:
cat /proc/bus/input/devices
and scanning the resulting output for the name of the device in question.

The higher the number associated with ConstantDeceleration, the less sensitive the mouse will be.

Hope this helps.

Monday, 9 April 2012

Automatically kill process using too much memory (Skype for Linux)


Recently i've found Skype 2.2 beta for Linux has been infrequently succumbing to massive memory leaks. Most of the time it will perform fine, however it will very occasionally manage to hose the entire system with horrific swapping and make everything unresponsive.

With no updates seeming to be forthcoming from Skype these days, a workaround seemed necessary. The solution being in the form of a clever perl script called Timeout being used to launch Skype.

Download the tarball (or zip) from the github repository and extract it somewhere appropriate:

tar -xvf nameofarchive
Navigate to the directory you've just extracted and make the script executable
chmod 777 timeout
Then you can use it to launch skype thusly
 ./timeout -m 1000000 skype 
Where -m tells it to watch the memory consumption, and is followed by the memory limit you wish to set in kilobytes. Here I set it to kill skype if it uses more than one gigabyte of memory.

To launch Skype like this all the time, use a program like Alacarte (Main Menu Editor) to change the command the Skype menu entry launches with to the path of the script. It should look something like:
/home/username/scripts/timeoutdir/timeout -m 1000000 skype
After running like this for a while I found that the script was using more cpu time than seemed reasonable, as it was running ten times a second, so I modified it to run once every ten seconds instead, which removed it entirely from concern, both cpu and power consumption wise.

To do this you'll want to open the timout script itself in your favourite editor
gedit timeout
And find the line that says 'my $frequency = 10;'

Change this to look like 'my $frequency = 0.1;'

Save and exit.

Hopefully this makes life easier for anyone afflicted similarly. You can of course use this to monitor and limit any process with regards to cpu or memory usage by utilising the timeout script to launch it.

Friday, 24 February 2012

Use Bumblebee/optirun to launch program from Codeblocks


The Intel integrated graphics driver is wonderfully stable, it's does not, however, play particularly well with certain opengl calls, and rendering apis.

The solution if you have an optimus laptop is to install bumblebee and run the program with the optirun command. This ensures that it is rendered with the Nvidia chip, and using the Nvidia proprietary blob. Making this happen by default when you launch a program from your IDE is therefore desirable.

Thankfully, for Codeblocks it's fairly simple; You just need to add "optirun" to the terminal launch option in Environment -> General.



This only works if you have your program set to launch as a console application, however, when working in the IDE this is usually the case. The program can be launched externally with optirun for release builds set as to compile as gui applications.

If anyone has a better solution that would ensure all application type settings automatically utilise optirun, i'd love to hear them!

Intel integrated graphics tearing in Gnome 3/Shell


I recently purchased a new laptop that has an Intel integrated graphics chip as part of its graphics arsenal, and found it was tearing slightly in Gnome 3/Cinnamon.

The solution, happily turns out to be very simple.

sudo nano /etc/environment
Append the following the the end of the file
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
ctrl+x to quit and save

Log out or reboot. Done!

Saturday, 19 November 2011

Create persistent Bash aliases


Having recently updated to Xubuntu I found that the command "l" no longer showed a colourised 'ls' output, which was rather irritating. The solution is, of course, to re-create the bash alias so that the command 'l' executes what I expect it to. I'm unsure whether or not I managed to remove this functionality myself at some point, or whether it's simply not a default alias in Xubuntu.

In any case, I didn't have a .bashrc file in my home directory, so the first thing I did was to copy the default one to it:

cp /etc/skel/.bashrc ~/
It turns out this is enough to get the 'l' command back, as it already exists in that bashrc. Having had a look through this default .bashrc though, I couldn't resist the temptation to add another alias for convenience!

Simply append the following to the end of your ~/.bashrc to have the terminal update and upgrade when you type 'update'
alias update='sudo apt-get update && sudo apt-get dist-upgrade'
It's tempting to go nuts and start adding aliases left right and centre for mundane tasks, this is something that should probably be resisted for anything that isn't both genuinely useful, and frequently executed however.

Friday, 11 November 2011

Force Nvidia Powermizer to always set performance mode - Ubuntu 11.10 (Update)


This is an update from an older post, as that particular method no longer seems to work in the latest version of Ubuntu. This one, however, does.

Open xorg.conf with your favourite editor:

sudo nano /etc/X11/xorg.conf
Add the following line under the section "Device"
Option "RegistryDwords" "PerfLevelSrc=0x2222"
So that your device section looks something like this:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "True"
Option "RegistryDwords" "PerfLevelSrc=0x2222"
EndSection
Save and reboot, hopefully your performance level is now always at maximum.

Monday, 24 October 2011

Moving windows laggy in Compiz


A most irritating bug whereby windows will jerk and lag when attempting to move them, either after compiz has been running for a bit, or just after a viewport/workspace change.

The problem appears to be something to do with mouse polling in compiz, and the fix is to limit the rate at which your mouse can be polled.

Following the solution posted here:

sudo gedit /etc/modules
Add the following to the end of the file:
-r usbhid
usbhid mousepoll=10
Save and reboot. Hopefully moving windows is now back to being smooth!

Friday, 21 October 2011

Manually change GTK3 theme in Xubuntu, Xfce 4.8


Due to a rather intense dislike of both Unity and Gnome-Shell in their current iterations, I've recently switched to using Xubuntu. One quibble i've had is that changing the theme in xfce4-settings-manager often causes the theme used with gtk3 applications to revert to the ugly default, presumably as many themes do not have gtk3 counterparts to display.

The only solution i've been able to find with regards to manually changing the gtk3 theme is to hunt down the theme folder in /user/share/themes and copy the gtk-3.0 folder from that theme into ~/.config.

So if you've changed the theme and just want the default greybird gtk-3.0 theme back for your gtk3 apps, while keeping a different theme for your gtk2 applications you might run something along the lines of:

cp -r /usr/share/themes/greybird/gtk-3.0 ~/.config

For applications run as root to adapt to this theme too you'll need to copy to /root/.config also.
sudo cp -r /usr/share/themes/greybird/gtk-3.0 /root/.config

Hope that helps someone, as it was beginning to annoy me rather a lot. If anyone has a cleaner way to do this please let me know.

Thursday, 26 May 2011

Ubuntu - Skype won't start, crashes with aborted.


Completely out of the blue a previously working install of Skype started crashing out every time it was started. The window would flash up briefly, and then dissapear, leaving an "aborted" message in the terminal. I'm unsure as to what caused this, as I hadn't recently applied any updates, however I eventually found a fix.

For 64 bit the problem appears to be to do some combination of ia32-libs and the Skype temporary directory. So (skip to the second command if you're using 32 bit):

sudo apt-get install --reinstall ia32-libs
and remove the skype temporary directory (This will remove stored passwords and conversations):
rm -rf ~/.Skype
Start Skype again and hopefully it'll work! While searching for information on this problem I saw a fair few different fixes, with differing success rates, so while this may or may not work for you, it's worth a try.

Otherwise, this thread on launchpad may help.

Edit: The problem seems to be fairly widespread, and across distributions - So I suspect Skype have managed to do something that has broken current installations of their program on Linux.

Edit2: A less intrusive and more specific alternative of the second command appears to go along the lines of (thanks to whoever commented this):
 rm ~/.Skype/shared.xml
This will preserve things like your chat history. As this is the file causing the problem.

Monday, 11 April 2011

Install Steam version of Darwinia natively in Ubuntu 64 bit


Idle hands end up fiddling with stuff when you have a Linux distro at your fingertips!

So having this game in my steam list led me to wonder if it was possible to install Darwinia on my Linux box without repurchasing the game. Happily, it turns out that it is, though it requires a little bit of fiddling to get running.

Tuesday, 11 January 2011

Ubuntu 10.10 can't connect to Win 7 share, password keeps popping up


A most irritating problem, no matter how many times you enter the correct password the box will pop up again.

Evidently this is a problem with Windows 7 Live Sign-in Assistant. The solution being to simply remove it from the windows machine providing the share.

Tuesday, 14 December 2010

Revenge of the Titans won't install properly in Ubuntu


If during the installation of this game you get an error complaining that it couldn't create a directory in /opt, run the following command:

 sudo mkdir  -p /opt/revengeofthetitans/full_length_music
Then run the installer again. All this does is create the directory manually, which seems to be all that's needed!

Edit: Looks like the devs are aware of the problem and planning on releasing a fixed installer imminently. A commendably expeditious response!

Wednesday, 1 December 2010

Mythtv Frontend won't connect to Master Backend over network (can't login)


A quick post with a quick fix for an irritating issue.

When attempting to connect to the master backend for the resident mythtv setup in the house over the network via mythfrontend on my laptop I ran into this error. The IP was correct, the login and mysql database password was also correct, even all the firewall rules were properly configured, all to no avail. I'd just keep getting "can't login" over and over again.

Simple fix (On the computer running the master backend):

gedit /etc/mysql/my.cnf
Then comment out the following line with a hash so that it looks like this:
#bind-address = 127.0.0.1
Exit and save, then reboot. Try and connect again with your frontend, hopefully all is now well!