Monday, December 15, 2008

Gentoo: How-to emerge the latest beta nvidia driver with portage and layman

UPDATE: this guide is now obsolete, since 180.22 is in ~arch. however new drivers come and go every day so maybe it'll be useful for someone in the future!

The nvidia-drivers package in gentoo ~arch lags behind the latest official beta from nVidia.

In this post I'll show you how to install the latest nvidia driver through Gentoo's overlays. Most of the stuff you'll do here is a one-time operation, meaning you won't have to do it again the next time an update rolls out.

To begin, we need to be able to add overlays. Gentoo has "layman" for this job.

emerge -av layman

make sure git and subversion USE flags are enabled

when that's done, you'll need a list with all the available overlays:

layman -L

now its time to add an overlay. the commands for adding/deleting overlays are layman -a overlay and layman -d overlay

There are currently two overlays with the latest nvidia-driver ebuilds available, berkano and voyageur.

We'll randomly go with berkano now but you can choose whichever you want. I have them both since they provide other stuff too.

Add the overlay:

layman -a berkano

when its done, we need to add a line in make.conf to let portage know we've activated layman:

echo "source /usr/local/portage/layman/make.conf" >> /etc/make.conf

NOTE: depending on the configuration, your layman installation might be in /usr/portage/local/layman/ - adjust this guide as needed :)

If you're inserting the line manually, make sure its the last line in the file!

If we are running on stable, portage will ignore the new nvidia-drivers by default. We simply need to add some lines to unmask them:

echo "x11-drivers/nvidia-drivers" >> /etc/portage/package.unmask
echo "x11-drivers/nvidia-drivers **" >> /etc/portage/package.keywords

** BEWARE ** If you have switched /etc/portage/package.* to a directory structure the above commands will destroy everything, so take care and adjust them if necessary (most users don't have to worry here)

Now we are ready to install or update to the new nvidia-drivers

emerge -av nvidia-drivers

and portage takes care of the rest:

wired@cloud ~ $ sudo emerge -av nvidia-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] x11-drivers/nvidia-drivers-180.16 USE="acpi custom-cflags gtk (multilib)" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage/layman/voyageur

Would you like to merge these packages? [Yes/No]

Please note that the overlays contain other stuff that are not masked if you are running ~arch (testing) and will be updated if you emerge world. You'll need to mask everything you may want to avoid (i.e. mplayer-9999);

To mask mplayer-9999 (adjust the same command for any package):

echo ">=media-video/mplayer-9999" >> /etc/portage/package.mask

Thats it! You're now running the latest and greatest nvidia-driver.
Here's my xorg.conf for reference. I don't use aiglx, desktop effects or compiz, but these settings make 2D blazingly fast for me - you may have to experiment with them to find what works best for you - 180.16 is really a good driver release =)

There's one thing left though: updating!

Overlays need to be synced like the main portage tree. To sync all overlays, simply run

layman -S

preferably alongside emerge --sync. after this is done,

emerge -avDuN world

will include overlay updates (yeah, nvidia updates too ;))


Tuesday, November 11, 2008

[UPDATED] Xorg: How to make your synaptics touchpad work the way its supposed to...

UPDATE: it seems that the latest version of synaptics doesn't tap-click with my current settings... I had to add the "TapButton1" option to make it work again. Ive made it bold :)

If you are looking for a way to make your stupid touchpad work correctly under xorg, including the side/scroller, use the following config in xorg.conf:

* NOTE: the following works nicely on a Dell XPS m1530. It might require some tweaking to work with your laptop's touchpad.

Section "InputDevice"
  Identifier "Synaptics Touchpad"
  Driver "synaptics"
  Option "SendCoreEvents" "true"
  Option "Device" "/dev/psaux"
  Option "Protocol" "auto-dev"
  Option "LeftEdge" "120"
  Option "RightEdge" "830"
  Option "TopEdge" "120"
  Option "BottomEdge" "650"
  Option "FingerLow" "14"
  Option "FingerHigh" "15"
  Option "MaxTapTime" "180"
  Option "MaxTapMove" "110"
  Option "ClickTime" "0"
  Option "EmulateMidButtonTime" "75"
  Option "VertScrollDelta" "10"
  Option "HorizScrollDelta" "0"
  Option "MinSpeed" "0.45"
  Option "MaxSpeed" "1.50"
  Option "AccelFactor" "0.040"
  Option "EdgeMotionMinSpeed" "200"
  Option "EdgeMotionMaxSpeed" "200"
  Option "UpDownScrolling" "1"
  Option "CornerCoasting" "true"
  Option "CoastingSpeed" "2"
  Option "VertTwoFingerScroll" "false"
  Option "HorizTwoFingerScroll" "false"
  Option "CircularScrolling" "0"
  Option "SHMConfig" "true"
  Option "TapButton1" "1" # Needed for tap-clicking

Don't forget to add it in your layout section:

Section "ServerLayout"
  Identifier "X.Org Configured"
  Screen 0 "Screen0" 0 0
  InputDevice "Keyboard0" "CoreKeyboard"
  InputDevice "Synaptics Touchpad" "AlwaysCore"
  InputDevice "USB Mouse" "AlwaysCore"


Wednesday, October 15, 2008

Gentoo: How-to unmerge KDE 3 packages if their KDE 4 versions exist

So you've merged KDE 4 versions of your favorite packages and want to remove the 3.5 versions...

Make sure you have installed portage-utils and run the following:

emerge -avC `qlist -C -I -D -v kde | grep 3.5 | sed 's/^/=/g'`

qlist finds the duplicates and lists them, then we use grep to keep only the 3.5 versions, which we then pass to emerge (with = in front of each one) to unmerge :)

you can also remove all of kde 3.5 with a similar command:

emerge -avC `qlist -C -I -v kde | grep 3.5 | sed 's/^/=/g'`


Sunday, October 12, 2008

Linux, EVE Online, Premium Content and Wine :)

Eve is a great game. Unfortunately, the client provided by CCP for linux doesn't include the new and much improved graphics.

Wine handles the game well though, allowing you to play with the Premium Content enabled :D

Steps to make it work:

Install wine

Run winecfg once, select Windows XP under "windows version"

Edit the file ~/.wine/user.reg and add the following lines:
[Software\\Wine\\Direct3D] 1223841454

[Software\\Wine\\DllOverrides] 1223842291

Download the following two files and copy them to

( )
( )

cp d3dx9_35.dll ~/.wine/drive_c/windows/system32/
cp d3dx9_36.dll ~/.wine/drive_c/windows/system32/

Download the Arial font and copy it to ~/.wine/drive_c/windows/Fonts/


Then extract it (u need cabextract)
cabextract arial.exe

and copy fonts
cp *TTF ~/.wine/drive_c/windows/Fonts/

Now you're ready to install/copy EVE.

To install, get the client and run "wine client.exe"
To copy, just put the CCP/EVE folder somewhere on your linux filesystem.
cp -R /mnt/win/Games/CCP /opt/games/

Finally, to run EVE, switch to the installed/copied folder
cd /opt/games/CCP/EVE/

and type
wine eve.exe

Enjoy :)

Friday, October 10, 2008

Gentoo: Updating all your 9999 packages

I needed a way to keep my kde-svn up-to-date.

Pretty simple actually:
emerge -av `eix -Jc | grep 9999 | cut -d" " -f2 | tr "\n" " "`


Monday, July 21, 2008

Linux, Gentoo and Awesome Fonts

With Gentoo I finally have a linux setup that beats Windows in font display!

I just enabled the "bindist" USE flag and activated anti-aliasing by writing some options in /etc/fonts/local.conf and ~/.fonts.conf

this guide was really useful:

The result?

Free Image Hosting at


Gentoo Chronicles

I've been running Gentoo for the last 3 weeks :)

Its actually pretty cool. You get to know the complete in-and-outs of your system. Im definately more aware of each service running on my system now that I've configured each and every one I've activated. USE flags are also pretty cool since you get to decide what you want down to the tinny little detail.

You do need a good system to compile the packages quickly though. Don't try it on old machines!

Debian is still my favorite distro since everything works (tm) and I still use it on my MythTV box and my Workstation @ work, but gentoo is fun to fiddle with on my personal laptop :)

Gentoo > *

Friday, March 28, 2008

Debian 64bit, Iceweasel and Flash Plugin

Alrighty... I just installed Debian AMD64 on my new dell...

I was a bit worried about Iceweasel not working with flash properly, since everyone says you have to do this and do that to make it work.

I just ran

sudo apt-get install flashplugin-nonfree

and everything worked out by itself!

So, no more hassle with the flash plugin in 64bit, debian takes care of it for ya! ;)