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!