Sunday, August 31, 2014

Listing binary packages

After some reading about the cons of mixing binary and ports on FreeBSD, I needed to have a list of the binary packages in order to replace them by ports:

# pkg info --annotations --all | grep -B 1 binary

Saturday, August 30, 2014

FreeBSD shutting down due to overheat on Lenovo T61

During long software compilations, FreeBSD was shutting down my laptop due to very high temperature.
After some research, I manage to have a stable system and build big ports without problems:

-First and foremost, re-apply thermal paste on your processor and GPU chip.

-Make sure your heat sink and fan are clean.

-Configure the system to load the ACPI module during boot time, loader.conf must have:

acpi_ibm_load="YES"
coretemp_load="YES"

coretemp will help you get additional temperature-related details.

You can monitor the temperature via sysctl, example:

# sysctl -a | grep temperature

-Adjust the ACPI module parameters. In my case, the following values helped to get a good temperature/performance balance:

# grep acpi /etc/sysctl.conf
hw.acpi.thermal.user_override=1
hw.acpi.thermal.polling_rate=2
hw.acpi.thermal.tz1._PSV=85.0C

Further details about them at acpi_ibm man page.

vimrc_example.vim

In some systems, for instance FreeBSD, you need to prepare your .vimrc right after installing vim:

-Install vim via ports or binary.

-Locate the .vimrc example and copy it to your home folder:

% vim --version | grep fall-back                       
  fall-back for $VIM: "/usr/local/share/vim"

% cp /usr/local/share/vim/vim74/vimrc_example.vim ~/.vimrc

It helps when you need some plugins, like the spell checker plugin which automatically downloads dictionaries for you.