Difference between pages "Create a boot option for easy nvidia or nouveau display driver switching" and "CPU FLAGS"

(Difference between pages)
 
 
Line 1: Line 1:
This howto describes how to use nvidia and nouveau drivers on the same computer and kernel. 
+
This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the {{c|CPU_FLAGS_*}} variables.
<br>
+
{{Fancynote|You must know how to install {{Package|x11-drivers/nvidia-drivers}} and {{package|x11-drivers/nouveau}} (references at the end of the page). First, you need to configure your kernel and install nvidia drivers and nouveau. We assume that this stage is successfully passed.}}
+
  
== boot-update ==
+
==CPU_FLAGS_X86 ==
The most important change: edit <tt>/etc/boot.conf</tt>:
+
  
{{file|name=/etc/boot.conf|desc= |body=
+
{{TableStart}}
boot {
+
<tr><th>Flag</th><th>Introduced</th><th>Name</th><th></th></tr>
generate grub
+
<tr><td>{{c|mmx}}</td><td>1997 (Pentium MMX)</td><td>MMX</td><td>See [[Wikipedia:MMX (instruction set)]] </td></tr>
default "Funtoo Linux [nvidia]"
+
<tr><td>{{c|mmxext}}</td><td>1999</td><td>AMD MMX Extensions</td><td>See [[Wikipedia:Extended MMX]]</td></tr>
# or
+
<tr><td>{{c|sse}}</td><td>1999 (Pentium III)</td><td>Streaming SIMD Extensions (SSE)</td><td>See [[Wikipedia:Streaming SIMD Extensions]]</td></tr>
# default "Funtoo Linux [nouveau]"
+
<tr><td>{{c|sse2}}</td><td>2001 (Pentium 4)</td><td>Streaming SIMD Extensions 2 (SSE2)</td><td>See [[Wikipedia:SSE2]]</td></tr>
timeout 3
+
<tr><td>{{c|sse3}}</td><td>2004 (Pentium 4 Prescott)</td><td>Streaming SIMD Extensions 3 (SSE3/PNI)</td><td>See [[Wikipedia:SSE3]]</td></tr>
}
+
<tr><td>{{c|ssse3}}</td><td>2006 (Core 2 Woodcrest)</td><td>Supplemental Streaming SIMD Extensions 3 (SSSE3)</td><td>See [[Wikipedia:SSSE3]]</td></tr>
 
+
<tr><td>{{c|popcnt}}</td><td>2007</td><td>POPCNT and LZCNT</td><td>See [[Wikipedia:SSE4#POPCNT_and_LZCNT]]</td></tr>
color {
+
{{TableEnd}}
normal cyan/blue
+
highlight blue/cyan
+
}
+
 
+
display {
+
#gfxmode 1280x800
+
#font unifont.pf2
+
}
+
 
+
"Funtoo Linux [nvidia]" {
+
kernel vmlinuz[-v]
+
params += ro console=tty1 quiet <other standard boot options>
+
params += nouveau.blacklist=true vga=791 # nouveau.blacklist=true is important
+
# or
+
# params += nouveau.blacklist=true video=uvesafb:1440x900-8,mtrr:2
+
}
+
 
+
"Funtoo Linux [nouveau]" {
+
kernel vmlinuz[-v]
+
params += ro console=tty1 quiet <other standard boot options>
+
params += nvidia.blacklist=true # nvidia.blacklist=true is important
+
}
+
}}
+
Next, run [[Boot-Update | <tt>boot-update</tt>]].
+
 
+
After boot-update has been run, you should have something like:
+
<console>
+
###i## grep menuentry /boot/grub/grub.cfg | wc -l
+
2
+
###i## grep menuentry /boot/grub/grub.cfg
+
menuentry "Funtoo Linux [nouveau] - vmlinuz-2.6.32.71_p14-rh" {
+
menuentry "Funtoo Linux [nvidia] - vmlinuz-2.6.32.71_p14-rh" {
+
</console>
+
 
+
== xcfgmaker deamon ==
+
 
+
<console>
+
###i## mkdir /etc/X11/video/;
+
###i## cd /etc/X11/video/;
+
###i## nano 10-monitor.conf.nouveau # make default config for nouveau. or copy existing config…
+
###i## nano 10-monitor.conf.nvidia # also for nvidia
+
</console>
+
 
+
Then create a new daemon. Edit the file <tt>/etc/init.d/xcfgmaker</tt>:
+
<syntaxhighlight lang="bash">
+
#!/sbin/runscript
+
 
+
# by http://wiki.sabayon.org/index.php?title=HOWTO:_Create_a_boot_option_for_easy_dual_to_single_display_switching
+
# To be placed in /etc/init.d/
+
# Run Command: rc-update add xcfgmaker boot
+
 
+
depend()
+
{
+
  need localmount
+
  before xdm-setup
+
  before xdm
+
  before alsasound
+
}
+
 
+
start()
+
{
+
 
+
  cmdline_display_mode_exist=$(cat /proc/cmdline | grep -e "nouveau.blacklist=" -e "nvidia.blacklist=")
+
  display_mode_nvidia_exist=$(ls /etc/X11/video/ | grep "10-monitor.conf.nvidia")
+
  display_mode_nouveau_exist=$(ls /etc/X11/video/ | grep "10-monitor.conf.nouveau")
+
  cmdline_display_mode=$(cat /proc/cmdline | awk -Fnvidia.blacklist= '{print $2}' | awk '{print $1}')
+
  if [ -n "$cmdline_display_mode_exist" ]; then
+
      if [ -n "$display_mode_nvidia_exist" ] && [ -n "$display_mode_nouveau_exist" ]; then
+
            #Choose the xorg file to be copied over
+
            if [ "$cmdline_display_mode" == "true" ]; then
+
              ebegin "Configuring X display with nouveau"
+
              cp /etc/X11/video/10-monitor.conf.nouveau /etc/X11/xorg.conf.d/10-monitor.conf
+
              eselect opengl set xorg-x11 >/dev/null 2>&1;
+
            else
+
              ebegin "Configuring X display with nvidia"
+
              cp /etc/X11/video/10-monitor.conf.nvidia /etc/X11/xorg.conf.d/10-monitor.conf
+
              eselect opengl set nvidia >/dev/null 2>&1;
+
            fi
+
        sleep 5
+
        eend 0
+
      else
+
        ebegin "Xorg file missing. Exitting"
+
        eend 0
+
      fi
+
  fi
+
 
+
}
+
</syntaxhighlight>
+
 
+
Do not forget:
+
<console>
+
###i## chmod +x /etc/init.d/xcfgmaker
+
###i## rc-update add xcfgmaker boot
+
</console>
+
 
+
== Additional Resources ==
+
*[http://en.gentoo-wiki.com/wiki/Nvidia Nvidia how-to on gentoo-wiki]
+
*[http://en.gentoo-wiki.com/wiki/Nouveau Nouveau how-to on gentoo-wiki]
+
*[http://sudormrf.wordpress.com/2011/02/14/create-a-boot-option-for-easy-nvidia-or-nouveau-display-driver-switching The same text on my blog(in Russian)]
+
 
+
[[Category:HOWTO]]
+
[[Category:First Steps]]
+

Revision as of 18:55, March 26, 2015

This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the CPU_FLAGS_* variables.

CPU_FLAGS_X86

FlagIntroducedName
mmx1997 (Pentium MMX)MMXSee Wikipedia:MMX (instruction set)
mmxext1999AMD MMX ExtensionsSee Wikipedia:Extended MMX
sse1999 (Pentium III)Streaming SIMD Extensions (SSE)See Wikipedia:Streaming SIMD Extensions
sse22001 (Pentium 4)Streaming SIMD Extensions 2 (SSE2)See Wikipedia:SSE2
sse32004 (Pentium 4 Prescott)Streaming SIMD Extensions 3 (SSE3/PNI)See Wikipedia:SSE3
ssse32006 (Core 2 Woodcrest)Supplemental Streaming SIMD Extensions 3 (SSSE3)See Wikipedia:SSSE3
popcnt2007POPCNT and LZCNTSee Wikipedia:SSE4#POPCNT_and_LZCNT