Code: Select all
nano /etc/modprobe.d/blacklist.confCode: Select all
blacklist nouveauCode: Select all
nano /etc/portage/package.keywordsCode: Select all
=x11-apps/xrandr-1.4.0 ~x86
=x11-base/xorg-server-1.14.1 ~x86
=x11-proto/inputproto-2.3 ~x86
=x11-drivers/nvidia-drivers-319.17 ~x86
=x11-drivers/xf86-input-evdev-2.8.0 ~x86
=x11-drivers/xf86-input-synaptics-1.7.0 ~x86
=x11-drivers/xf86-video-modesetting-0.7.0 ~x86
Code: Select all
emerge x11-apps/xrandrCode: Select all
emerge -1 $(qlist -IC x11-drivers)Code: Select all
nano /home/yourusername/.xinitrcCode: Select all
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
Code: Select all
eselect opengl listCode: Select all
eselect opengl set 1Code: Select all
Switching to nvidia OpenGL interface... doneCode: Select all
nano /etc/X11/xorg.confCode: Select all
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "<BusID for NVIDIA device here>"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
# Uncomment this line if your computer has no display devices connected to
# the NVIDIA GPU. Leave it commented if you have display devices
# connected to the NVIDIA GPU that you would like to use.
#Option "UseDisplayDevice" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
Code: Select all
lspci |grep VGACode: Select all
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 640M] (rev a1)

You should wait for use the lastest nvidia pilote with your login manager, it's not officialy supported by Gentoo I guess.BeaTtheMeaT666 wrote:It works for me when I use startx , but not with a login manager (slim), I get a black screen.
Do I have to put the xrandr commands somewhere in slim's configuration?

Code: Select all
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:01:00.0 "
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
# Uncomment this line if your computer has no display devices connected to
# the NVIDIA GPU. Leave it commented if you have display devices
# connected to the NVIDIA GPU that you would like to use.
#Option "UseDisplayDevice" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:00:02.0 "
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
I have tried with corrected BusID, but still not work, xorg.log saied no srceen, if uncommentedDr.Willy wrote:Your BusID syntax is probably wrong. Change them to PCI:1:0:0 and PCI:0:2:0
Code: Select all
Option "UseDisplayDevice" "none" Code: Select all
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

^^ the arch wiki is awesomeThe ~/.xinitrc file is a shell script read by xinit and startx. It is mainly used to execute desktop environments, window managers and other programs when starting the X server (e.g., starting daemons and setting environment variables). The xinit and startx programs starts the X Window System and works as first client programs on systems that cannot start X directly from /etc/init, or in environments that use multiple window systems.

had some other issues where the screen also stayed black before you logged inDr.Willy wrote:It's your user's .xinitrc so more to the point it is executed after you login.Tolstoi wrote:... I guess after KDM?
Which in turn means until you log in your screen is black.

I have this too compiled in my kernelIs it necessary to enable an option in the kernel 3.9.x for optimus works?
I activated the hybrid graphics in section device/graphics.
Code: Select all
[ebuild R ~] x11-proto/inputproto-2.3 ABI_X86="32 (64) (-x32)" 0 kB
[ebuild R ~] x11-apps/xrandr-1.4.0 0 kB
[ebuild R ~] x11-base/xorg-server-1.14.1.901:0/1.14.1.901 USE="ipv6 nptl suid udev xorg -dmx -doc -kdrive -minimal (-selinux) -static-libs -tslib -xnest -xvfb" 0 kB
[ebuild R ~] sys-kernel/gentoo-sources-3.9.4:3.9.4 USE="-build -deblob -symlink" 0 kB
[ebuild R ~] x11-drivers/xf86-input-evdev-2.8.0 0 kB
[ebuild R ~] x11-drivers/xf86-input-synaptics-1.7.1 0 kB
[ebuild R ~] x11-drivers/xf86-video-modesetting-0.7.0 0 kB
[ebuild R ~] x11-drivers/nvidia-drivers-319.23 USE="X acpi (multilib) tools -pax_kernel" 0 kB
Code: Select all
lspci | grep 'VGA\|NVIDIA'
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] (rev a1)
Code: Select all
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
# Uncomment this line if your computer has no display devices connected to
# the NVIDIA GPU. Leave it commented if you have display devices
# connected to the NVIDIA GPU that you would like to use.
Option "UseDisplayDevice" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
Code: Select all
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Looks like it's incompatible/useless with proprietary driversVGA Switcheroo ne fonctionne pas avec les pilotes graphiques propriétaires des cartes graphiques
Hi got the same kernel as you I found out about my previously error and wrote wrong bus id and now I got the same error as you but I dont have VGA_SWITCHEROO built injms.gentoo wrote:ok
about kernel option VGA_SWITCHEROO
Laptop Hybrid Graphics - GPU switching support (VGA_SWITCHEROO)
from what I found here
http://doc.ubuntu-fr.org/vga_switcherooLooks like it's incompatible/useless with proprietary driversVGA Switcheroo ne fonctionne pas avec les pilotes graphiques propriétaires des cartes graphiques
will test without this when I will have time