The website has moved

Note: the website moved to www.keenformatics.com. You're being redirected.

Saturday, June 15, 2013

How to solve Dell laptops fan issues in Ubuntu

When I finally bought my new Dell Inspiron laptop, I decided to take a look at the brand new Windows 8 OEM installation which I (forcedly) paid for. About 20 seconds later, I was installing the latest Ubuntu distribution. I didn't knew what I would have found, but I was happy as well.
How to solve Dell laptops fan issues in Ubuntu
Sarah Klockars-Clauser for openphoto.net


One of the main problems I faced has been that of the incredibly loud fan noise which came from my new laptop, so I began my online quest until I found i8kutils, a (partial) solution to my problem. I'm saying "partial" because we shouldn't confuse the cause and the effect: i8kutils won't solve your overheating issues, but it will help you to configure your fans in order to overwrite their exasperated and irritating default behaviour. But be warned: if your fans are running it's probably because they're trying to manage your overheating problems for you, so don't set i8kutils just to make your fans definitively shut up (unless you know what you're doing).


The steps!

1) First of all, let's download and install i8kutils. Open your terminal and write:
sudo apt-get install i8kutils
2) Now you've got to add i8k to your modules. Open the modules file:
sudo gedit /etc/modules
and add the string "i8k" (without quotes) to the file. Save and exit.

3) Create an i8k.conf file
sudo vim /etc/modprobe.d/i8k.conf
and fill it with this code:
options i8k force=1

Note: Some older guides will tell you to create a /modprobe.d/options file. The "options" file isn't used anymore on Ubuntu. What does matter is that you create a file with a .conf extension (the filename isn't important, but I decided to name it i8k.conf for clarity). So beware of older i8kmon configuration guides.

4) Now restart your computer, or run this code to make i8k run:
sudo modprobe i8k force=1
5) We will now create a i8kmon.conf file which will tell the i8kmon utility how to behave.
sudo gedit /etc/i8kmon.conf
Paste the following code in it:
# Run as daemon, override with --daemon option
set config(daemon)      0

# Automatic fan control, override with --auto option
set config(auto)        1

# Report status on stdout, override with --verbose option
set config(verbose) 1

# Status check timeout (seconds), override with --timeout option
set config(timeout) 20

# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
set config(0)   {{-1 0}  -1  40  -1  40}
set config(1)   {{-1 1}  30  60  30  60}
set config(2)   {{-1 2}  53  128  53  128}

# For computer with 2 fans, use a variant of this instead:
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
# set config(0) {{-1 0}  -1  52  -1  65}
# set config(1) {{-1 1}  41  66  55  75}
# set config(2) {{-1 1}  55  80  65  85}
# set config(3) {{-1 2}  70 128  75 128}

# end of file

This has been edited to match my Dell Inspiron 15r 5521 fan configuration (and I hope I did it well). If you want more informations take a look at the documentation on Ubuntu Manuals: http://manpages.ubuntu.com/manpages/gutsy/man1/i8kmon.1.html

6) Now you should be able to run i8kmon from your terminal and see if (and how) it's working. Simply run:
i8kmon

Finished!

But wait...what if you want i8kmon to automatically start at boot? I'll simply copy-paste what's been written in the official documentation:
Under Debian GNU/Linux it is possible to start the daemon automatically by creating an /etc/default/i8kmon configfile containing the line "set config(daemon) 1". Note the the /etc/default/i8kmon configfile is not installed by the i8kutils package because the program is designed to be run by normal users. If you want to use it as daemon you must create the config file yourself. In this case, the --nouserconfig option can sometimes also help by limiting it to sourcing /etc/i8kmon (and not ~/.i8kmon).
Doubts: I wonder why I don't have the ~/.i8kmon file on my system, while the docs refer to it.
If you take a look in your /usr/bin/i8k you'll find that ~/.i8kmon is considered as a user configuration, while /etc/i8kmon.conf (the file we edited before) is treated as a system configuration.
If something in your configuration goes wrong (e.g. if you can't make your temperature limits work) it would be worthwhile checking if you've got this ~/.i8kmon file on your system and try to edit it, because it could be perfidiously overwriting your system configuration. If you discover something about it, please let me know.

I hope this article has been useful to you. If so, please click here and there on social buttons to make it more visible. If not, I'm waiting for your constructive comments ;)

Monday, May 27, 2013

How To build your TeX file using LaTeX on Sublime Text


How To build your TeX file using LaTeX on Sublime Text
LaTeX and Sublime Text
Sublime Text 2 (the 3rd release is about to come) is one of the smarter and most elegant editors on the scene nowadays. It comes with a lot of interesting functions, and it can easily be enriched with plugins using its awesome Package Control function.

While I was writing my thesis about Kurt Gödel I discovered LaTeX, an incredible markup language which I felt in love with; it passed just a short time before I desired to use it with Sublime Text, but when I installed the LatexTools package via Package Control I had to face a little problem in order to make it work.

First of all: I think you already installed TexLive (a LaTeX distribution with many LaTeX tools) but if you did not, you can do so by typing this in your terminal:

sudo apt-get install texlive

Now you can try (as I did) to build your .tex file in Sublime Text by pressing Ctrl+B. Unfortunately, all I got at this point was this error message:

COULD NOT COMPILE!
Attempted command:latexmk -cd -e $pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S' -f -pdf <your-tex-file-path>


Read carefully these lines: what Sublime Text is trying to tell you is that it needs the latexmk package to build your file, and you didn't previously install it.
If you're encountering the same problem, the solution is trivial: you just have to install the latexmk package. Write this you your terminal:

sudo apt-get install latexmk

Now try again: you'll find that Sublime is now correctly building your tex file.

Saturday, May 25, 2013

How To access phpMyAdmin page

Here's the case: you installed Xampp (or Lampp, as it was called until some months ago), you made it run, but now you can't access your phpMyAdmin page because you get this error message:

New Xampp Security concept
Access to the requested object is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".

So, as the message says, let's open the file:
/opt/lampp/etc/extra/httpd-xampp.conf
(its path may vary depending on your system and installation).

Now edit the lines under this comment:
# since XAMPP 1.4.3
So that they look like these:
# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Require all granted
Allow from all
</Directory>
Now restart your Xampp and you're done!

Monday, May 20, 2013

How To activate wireless and bluetooth interfaces on Ubuntu

Context: I bought a new laptop a few weeks ago, a brand new Dell Inspiron 15r 5521, and I immediately installed Ubuntu on it (since I don't like Windows 8 and I recently have more fun with Linux-like systems).

One of the many problems I faced, due to the poor Dell compatibility with Ubuntu, is that of the wireless network keyboard key. When I disabled my WiFi pressing "Fn + F2" it worked as it should. But when I tried to have my wireless connection back, the same key combination enabled just my bluetooth connection, while the wireless kept to be disabled.


If you're facing the same problem, or even if you just want to check the status of your wireless and bluetooth interfaces, here's the way to do so. These commands are intended to be written in your terminal, so you have to open it (the default key combination on Ubuntu is "Ctrl + Alt + T").

To check your wireless interfaces status, write down:
rfkill list

This command will tell you if your interfaces are blocked, both software and hardware side.

If you notice to have some kind of problems with their status and you want to activate them, type this in your terminal:
rfkill unblock all

And you're done (you should be, at least)!

Friday, May 10, 2013

Brief intro

Hi everyone :)
Not so much about presentations: I'm just someone who spends his not-so-precious hours trying to configure some softwares, packages, drivers and other things that you could imagine to be linked with computers and informatics.

I sometimes find it hard to retrieve all the informations I'm looking for on the internet, even if there are amazing sites out there that could easily help us to resolve our programming issues. My site is a solution-container and a trouble-container as well, and I'll be happy to give a grateful feedback to those who created the guides I followed during these years of hopeless programming. I hope you'll use the same kindness with me; feel free to share my solutions for the rest.
Let's go on!