I have an Nvidia card

rt-sources and nvidia-drivers are not compatible. For audio, you do not need advanced or 3D graphics. If you do other things on your Gentoo Studio system, such as play games, you should compile gentoo-sources and boot into that to use nvidia-drivers and play games. When booting into your rt kernel, let the default config without specifying any video cards in make.conf take over. More than this you will need to manage yourself, as it’s beyond the scope of Gentoo Studio.

That said, I have trouble on my primary DAW with this setup. I get xruns by the second using either nouveau or nv. I get xruns almost never when I use nvidia-drivers/rt-sources. With this setup, I really have to push my system to get underruns, and this is while maintaining a 10 ms latency or less. So if this is something you want to do, you will need nvidia-drivers-381.22-r1 and rt-sources-4.9.76_p61, and you will need to mask all higher versions of both. Don’t forget to eselect opengl after emerging. When compiling rt-sources, don’t forget to genkernel –menuconfig all and make sure that fully preemptible is the preemption model.

Here are the steps you need to take to use nvidia-drivers and rt-sources. Please note that WordPress mangles double-dashes, so you need to type actual double-dashes where you see “(double-dash)”:

  1. su – (Make sure you are root.)
  2. mkdir -p /etc/portage/package.mask
  3. echo “>sys-kernel/rt-sources-4.9.76_p61” >> /etc/portage/package.mask/sys-kernel (Because quotes/marks may not copy correctly, you may need to manually type these lines.)
  4. echo “>x11-drivers/nvidia-drivers-381.22-r1″ >> /etc/portage/package.mask/x11-drivers
  5. echo “VIDEO_CARDS=\”nvidia\”” >> /etc/portage/make.conf (Or edit this line if you have it already.)
  6. emerge rt-sources (You should see rt-sources-4.9.76_p61 emerging.)
  7. emerge -uDN @system @world (You should see xorg-drivers re-emerging.)
  8. eselect kernel list
  9. eselect kernel set (number next to rt-sources-4.9)
  10. mount /dev/sda2 /boot (Replace /dev/sda2 with your boot partition if you set it up differently during a manual install.)
  11. ls /boot (To confirm your boot partition has been mounted. You should see kernels and grub stuff.)
  12. genkernel (double-dash)menuconfig all (When the menu appears, navigate to Processor Type & Features and set the Low-Latency Preemption Model to Fully Preemptible. Make other adjustments if you know what you are doing, otherwise, the defaults are fine.)
  13. The previous step will take a while.
  14. grub-mkconfig -o /boot/grub/grub.cfg
  15. eselect opengl list (You should see nvidia as an option.)
  16. eselect opengl set (Number next to nvidia.)
  17. Reboot.

Please report if the above does not work and/or you continue to get xruns.

I have submitted a bug report regarding Nouveau.

It looks like this is actually a known issue already. See post at bottom of this page:

ERROR: Failed to compile the “firmware_install” target…

genkernel needs to be keyworded ~amd64 in /etc/portage/package.keywords/sys-kernel:

sys-kernel/genkernel ~amd64

Once you have updated genkernel, this problem should be resolved.

For more info, see this post:


If, after installing, you kernel hangs on boot but doesn’t actually panic, you might need to perform the following:

  1. Edit /etc/default/grub by adding this line: GRUB_CMDLINE_LINUX_DEFAULT="acpi=off nomodeset xforcevesa"
  2. Make sure boot partition is mounted: mount /dev/sda2 /boot in chroot or mount /dev/sda2 /mnt/gentoo/boot outside of chroot.
  3. grub-mkconfig -o /boot/grub/grub.cfg
  4. Reboot.


Running eix-sync, you get:

fatal: destination path '.' already exists and is not an empty directory.


rm -rvf /usr/local/portage