Tips and tricks: Gentoo Linux on a Samsung Q45 laptop

I won’t talk here about the difficulties encountered while installing ~amd64 Gentoo on this baby, as most of the components work quite well and without a problem, but rather about a few tips I had to dig around the Internet. Some of these tips may apply to other PCs, or other distributions too 😉

External kernel modules to emerge

To get most of the hardware, emerge:

  • net-wireless/iwlwifi: even if it’s still relatively new, it works much better than ipw3945 for the wifi! Update: merged in kernel, simply emerge net-wireless/iwl3945-ucode, and enable iwlwifi in kernel tree
  • media-video/linux-uvc: who knows, this webcam may be useful one day
  • x11-drivers/nvidia-drivers: yes, it’s proprietary, but you need it to try compiz-fusion (add “options nvidia NVreg_RegistryDwords=”PerfLevelSrc=0x2222” to /etc/modules.d/nvidia to fix flickering in X)
  • app-misc/sdricoh_cs: this is a *very* experimental driver for the card reader (I did not try further though, as I still have an old PCMCIA one that works fine and fast) ”Update””: turns out you don’t need this one, simply use the “sdhci” module from kernel

Power management

Now, let’s get the most of the battery. First some links that will give a lot of ideas to get a longer battery life:

  • Gentoo Power Management Guide
  • Intel-sponsored Less watts site: by the way, emerging powertop definitely is a good idea!
  • Mandatory to let your CPU rest while on battery: HRT (tickless system) patch for amd64, apply it to your 2.6.23 gentoo-sources. Update: merged in recent kernels
  • A patch to apply to gnome-applets (works fine here, less CPU wakeups)

By the way, nvidia broke the brightness key shortcuts while in X, but you can switch to a console (where the keys work!), adjust brightness, and switch back to X.

Gnome tips

For now, I run Gnome (2.20) on it, here a few fixes. First, the gnome-power-manager tray icon may not appear from time to time on login. This is a known problem, also known as bug 188618 to poor Gentoo developers. (Update) This was fixed by leio (don’t forget to thank him), now you just need to upgrade to gnome-power-manager-2.20.0-r1 (no need to kill and restart g-p-m manually now). For other distributions, this was accepted usptream, so you should be fine soon too 🙂

OK, now that we have a battery life monitor, next tweak: if you have kept the hidden backup partition on this system, gnome will add a nice (completely useless) icon for it on your desktop. Thanks to the french Ubuntu forums, here is how to tell HAL to ignore that partition (/dev/sda1 in my case). Create a file called /etc/hal/fdi/preprobe/10ignore-disks.fdi, with these lines inside:

<?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2"> <device> <match key="block.device" string="/dev/sda1"> <merge key="info.ignore" type="bool">true</merge> </match> </device> </deviceinfo> 

And voila, this one will not bother you anymore 🙂

Last thing, if you’d like to enter your password once at gdm screen, without the need to retype it for gnome-keyring (NetworkManager trying to connect to the home wifi), and even SSH passphrases, read this great planet post by fellow french conspiracy Gentoo developer remi.

Another last thing (last one I promise), about NetworkManager: this is a great tool, but it will work better if you add something like ‘RC_PLUG_SERVICES=”!net.eth* !net.wlan*”‘ to /etc/conf.d/rc (so the system does not try to start the interfaces before networmanager does). Also take a look at NetworkManagerDispatcher (bug here): this tool will automate start/stop of services when NetworkManager connects to a network (openvpn, ntpd, …)

OK, I’ve finished now, thanks to the few people that are still reading 😉

4 thoughts on “Tips and tricks: Gentoo Linux on a Samsung Q45 laptop”

  1. The gnome-power-manager tray icon problem is now fixed in gnome-power-manager-2.20.0-r1.
    Thanks to me reading your blog now and revisiting the upstream bug and finding that a Gentoo user had pinpointed the problematic codepath some four days ago and me missing the mail notification in the usual inbox flood combined with busy times.

    I suggest anyone on ~arch who uses a workaround to upgrade to 2.20.0-r1 and remove any such workarounds, as launching gnome-power-manager twice isn’t exactly a good thing for startup speed.

    PS: Your blogs comment textarea has some serious issues as it doesn’t show a scrollbar and doesn’t scroll down when I exceed the height

  2. Good news, thanks a lot! That was a longstanding bothering bug (and the workaround did not always work)

    Note to self: sync and update the laptop tonight and remove hacky workaround

  3. Wow – this is an awesome post – for two different reasons – One, I was looking for the HRT patch for my amd64 machine – and two, you reminded me of my bug for NetworkManagerDispatcher – I will get cracking on this again soon, and I do apologize that it has taken so long to get in to Gentoo. Thanks for the reminder even if you didn’t realize you were!

Comments are closed.