Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Optimus new nvidia drivers
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tolstoi
l33t
l33t


Joined: 20 May 2004
Posts: 678

PostPosted: Wed Oct 16, 2013 4:46 am    Post subject: Reply with quote

Setting
Code:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

in .xinitrc got things going for the desktop here. As mentioned in an earlier post this only worked with the startx command because these
settings only kick in after loging in with a user. Too late for DMs like KDM/GDM etc..

Somewhere I found a hint (guess it was Archlinux Wiki) to set the xrandr options into /usr/share/config/kdm/Xsetup for KDM. Now I can boot up without KDM turning into a black screen.
Back to top
View user's profile Send private message
Witos
n00b
n00b


Joined: 02 May 2012
Posts: 12

PostPosted: Wed Oct 16, 2013 7:11 am    Post subject: Reply with quote

Joeklow, good news, congrats:

One of those two is redundant for sure:

Code:

        xrandr --setprovideroutputsource modesetting NVIDIA-0
        xrandr --setprovideroutputsource 0x45 0x2b0


And I doubt whether this:
Code:

   xrandr --output LVDS-0 --on

changes anything.
Back to top
View user's profile Send private message
iSmashStacks
n00b
n00b


Joined: 16 Oct 2013
Posts: 1

PostPosted: Wed Oct 16, 2013 4:06 pm    Post subject: black screen Reply with quote

hello guys i can't get it working... stuck on black screen as well.

kernel: 3.9.6 (zenkernel)
xorg-server: 1.14.3-r2
nvidia-drivers: 331.13

.xinitrc
Code:

xrandr --setprovideroutputsource Intel NVIDIA-0
xrandr --auto
exec startfluxbox


I've changed "modesetting" to "Intel" here bcause xrandr couldn't find modesetting provider:
xrandr --listproviders output provided when i run startx without a xorg.conf file.
Code:

Providers: number : 1
Provider 0: id: 0x47 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 5 associated providers: 0 name:Intel


xorg.conf
Code:

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"
    # Option "UseDisplayDevice" "none"
    # Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier "intel"
    Driver     "modesetting"
    BusID      "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device     "intel"
EndSection


lspci | grep VGA
Code:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)


Any clue?

Xorg.0.log
http://bpaste.net/raw/141057/


Looks like xrandr --listproviders is not showing up anything when i run startx with the new xorg.conf.
I get: Could not find provider with name Intel.
I tried also modesettings and i get same error but with modesetting instead of Intel.
If i try to run xrandr --listproviders while black screen it couldn't connect to display :0.0.

Please help :(
Back to top
View user's profile Send private message
Atmmac
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2013
Posts: 130
Location: Watertown, MA

PostPosted: Fri Oct 18, 2013 3:07 pm    Post subject: No Idea Reply with quote

No Clue how you guys got this working. I tried everything here and I am having the falling off the bus issue as documented here... https://devtalk.nvidia.com/default/topic/567297/linux/linux-3-10-driver-crash/1

This has been broken for three months i am on 3.10.7-gentoo-r1 and nvidia 331.



[ 64.287867] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 331.13 Sun Sep 29 22:56:10 PDT 2013
[ 64.295640] nvidia 0000:01:00.0: irq 46 for MSI/MSI-X
[ 75.340770] NVRM: GPU at 0000:01:00.0 has fallen off the bus.
[ 75.340774] NVRM: os_pci_init_handle: invalid context!
[ 75.340776] NVRM: os_pci_init_handle: invalid context!
[ 75.340779] NVRM: GPU at 0000:01:00.0 has fallen off the bus.
[ 75.340780] NVRM: os_pci_init_handle: invalid context!
[ 75.340781] NVRM: os_pci_init_handle: invalid context!
[ 75.359937] NVRM: RmInitAdapter failed! (0x25:0x28:1157)
[ 75.359943] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 75.359958] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
[ 75.360184] NVRM: request_irq() failed (-22)
Back to top
View user's profile Send private message
Witos
n00b
n00b


Joined: 02 May 2012
Posts: 12

PostPosted: Mon Oct 21, 2013 8:26 am    Post subject: Reply with quote

iSmashStacks:

[qoute]I've changed "modesetting" to "Intel" here bcause xrandr couldn't find modesetting provider[/quote]

Do you have modesetting installed?

If not install it.

1. Make sure you have CONFIG_DRM=YES in your kernel
2. Make sure that your BusID in Section "Device" for both "nvidia" and "intel" are correct
3. Uncomment AllowEmptyInitialConfiguration in xorg.conf
4. Print how the output of xrandr --listproviders look like after startx.
Back to top
View user's profile Send private message
Atmmac
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2013
Posts: 130
Location: Watertown, MA

PostPosted: Sat Nov 09, 2013 7:54 pm    Post subject: Reply with quote

Alright guys I finally got this working. Updating to kernel 3.12.0 solved every problem I had.


Make sure your make.conf has the following


VIDEO_CARDS="intel nvidia"

and you have the following blacklisted

blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist nvidia


Upgrade your kernel to 3.12.0

You will need to add

sys-kernel/gentoo-sources

to your /etc/portage/pakage.accept_keywords

Emerge gentoo-sources

eselect kernel list

eselect kernel set <new kernel>

cd /usr/src/linux

configure your new kernel or use genkernel.

drop the newly configured kernel into /boot
cp arch/x86_64/boot/bzImage /boot/kernel-3.12.0-gentoo

use genkernel to create an initramfs
genkernel --install initramfs

modify /boot/grub/grub.conf with new kernel name and initramfs

boot into new system

perform a @module-rebuild

i got an error here when first doing an optirun so go ahead and unmerge the following

emerge --unmerge bbswitch bumblebee

emerge --depclean

remove all old packages

then re emerge

emerge bumblebee bbswitch

This will pull in a couple of dependencies.

Reboot the system and you should be golden.

I know most of this is in the manual and i probably missed something. This issue really should have been fixed by nvidia in the 3.10 kernel but w/e.

Just trying to give back after weeks of torture.


Thanks!
Back to top
View user's profile Send private message
ftomassetti
n00b
n00b


Joined: 28 Oct 2013
Posts: 17

PostPosted: Sun Nov 10, 2013 2:00 pm    Post subject: Reply with quote

Hi,
I have this working (but without window manager for same reason) if I run startx but not on GDM (screen remains black).

I understand it is because I need to run xrandr before GDM start.

I added a script in /etc/X11/xinit/xinitrc.d/ and made it executable

Code:

#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


still nothing... do you have any idea where should I put those lines?
Back to top
View user's profile Send private message
ftomassetti
n00b
n00b


Joined: 28 Oct 2013
Posts: 17

PostPosted: Sun Nov 10, 2013 3:19 pm    Post subject: Reply with quote

Ok, to make it work with GDM I put those lines into /etc/X11/gdm/Init/Default

Probably it is not the best solution but it works.

The problem is that it clones by monitors... I can not set anymore a large desktop on two screens
Back to top
View user's profile Send private message
Valheru_pl
n00b
n00b


Joined: 11 Nov 2013
Posts: 1
Location: Poland Gdansk

PostPosted: Mon Nov 11, 2013 10:35 am    Post subject: Reply with quote

Hi,

Kernel 3.10.17
OS Slackware 14.1 x86_64
nvidia-settings: version 331.20 Wed Oct 30 18:20:32 PDT 2013

Xorg /etc/X11/xorg.conf
Code:
Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "nvidia" 0 0
    Inactive       "intel"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse" 
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5" 
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:01:00:0"
EndSection

Section "Device"
    Identifier     "intel"
    Driver         "modesetting"
EndSection

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Monitor        "Monitor0"
    Option         "UseDisplayDevice" "none"
    SubSection     "Display"
        Modes      "nvidia-auto-select"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "intel"
    Device         "intel"
    Monitor        "Monitor0"
EndSection


Xinit /etc/X11/xinit/xinitrc
Code:
#!/bin/sh

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

[...etc...]   
startkde


Where's the point? KDE starting correctly, I can clone display to the external HDMI monitor BUT i can not set anymore a large desktop on two screens :/ My external Monitor on HDMI has a black screen, and turn off.

Do you have any idea what's wrong?

Thx a lot,

webster / Valheru
_________________
††† Chaos Of The Mirror - Valheru †††
††† I ♥ SlackWare RuLeZ †††
Back to top
View user's profile Send private message
Witos
n00b
n00b


Joined: 02 May 2012
Posts: 12

PostPosted: Wed Nov 20, 2013 8:46 pm    Post subject: Reply with quote

Valheru_pl,

You need to you nvidia-settings for 2 monitor set-up I think.
Back to top
View user's profile Send private message
Arthanis
Apprentice
Apprentice


Joined: 21 Mar 2008
Posts: 166

PostPosted: Mon Aug 04, 2014 10:01 pm    Post subject: Reply with quote

Well, I just bought a laptop with optimus technology, and I tried bumblebee and didn`t like it. I read around and I understand that it is now possible to use the nvidia gpu without bumblebee even though my laptop lacks a hardware muxer to disable the intel.
So and followed all the instructions here but couldn' t get it to work. I uninstalled xdm and bumblebee to make things simplier.

These are my adapters:

Code:

lspci -v |grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])

lspci -v |grep 3D
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)



Here is my pci devices and kernel modules being used:

Code:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
   Subsystem: CLEVO/KAPOK Computer Device 2300
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
   Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: i915
   Kernel modules: i915
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: xhci_hcd
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: mei_me
   Kernel modules: mei_me
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: ehci-pci
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
   Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
   Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
   Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: lpc_ich
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
   Subsystem: CLEVO/KAPOK Computer Device 2300
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: nvidia
   Kernel modules: nvidia
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)
   Subsystem: Intel Corporation Centrino Advanced-N 6235 AGN
   Kernel driver in use: iwlwifi
   Kernel modules: iwlwifi
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
   Subsystem: CLEVO/KAPOK Computer Device 2300
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
   Subsystem: CLEVO/KAPOK Computer Device 2300
   Kernel driver in use: r8169



Here is my full dmesg on boot: http://pastebin.com/T1STepGj

Nvidia seems to load fine:
Code:


g1310max linux # dmesg |grep -i nvidia
[    2.140090] nvidia: module license 'NVIDIA' taints kernel.
[    2.171864] Modules linked in: nvidia(PO+) iwldvm snd_hda_codec_via i915(+) snd_hda_codec_generic joydev coretemp iwlwifi snd_hda_intel snd_hda_codec mei_me drm_kms_helper mei snd_hwdep
[    2.172645] CPU: 2 PID: 1343 Comm: nvidia-smi Tainted: P          IO 3.14.14-gentoo #26
[    2.175708]  [<ffffffffa07c86e7>] nvidia_open+0x567/0x8f0 [nvidia]
[    2.175868]  [<ffffffffa07d2dcf>] nvidia_frontend_open+0x4f/0xa0 [nvidia]
[    4.888691] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[    4.888746] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.24  Wed Jul  2 14:24:20 PDT 2014



Although there are some warnings in kernel about intel:

Code:

g1310max linux # dmesg |grep -i vga
[    0.000000] Console: colour VGA+ 80x25
[    0.148899] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.149048] vgaarb: loaded
[    0.149137] vgaarb: bridge control possible 0000:00:02.0
[    2.070477] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    2.205517] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2


I don`t know what is it about this timeout warning.


I have enabled intel kernel mode setting with intel_agpgart and intel drivers, here is my complete kernel config:

http://pastebin.com/LvsuqA0T

Relevant kernel config entries:
Code:

CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_KMS_FB_HELPER=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I810=m
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
CONFIG_DRM_I915_FBDEV=y
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
# CONFIG_DRM_I915_UMS is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set


I also have x11-drivers/xf86-video-intel, xf86-video-modesetting, nvidia-drivers and x11-base/xorg-drivers (with VIDEO_CARDS="intel modesetting nvidia") on their latest versions:

Code:

eix xorg-drivers
[I] x11-base/xorg-drivers
     Available versions:  1.9 1.10 1.11 1.12 1.13 1.14 1.15 ~1.16 {INPUT_DEVICES="acecad aiptek elographics evdev fpit hyperpen joystick keyboard mouse mutouch penmount synaptics tslib vmmouse void wacom" VIDEO_CARDS="apm ark ast chips cirrus dummy epson fbdev fglrx freedreno geode glint i128 i740 impact intel mach64 mga modesetting neomagic newport nouveau nv nvidia omap omapfb qxl r128 radeon radeonsi rendition s3 s3virge savage siliconmotion sis sisusb sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx tdfx tga trident tseng v4l vesa via virtualbox vmware voodoo"}
     Installed versions:  1.15(12:34:58 08/04/14)(INPUT_DEVICES="evdev keyboard mouse synaptics -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -tslib -vmmouse -void -wacom" VIDEO_CARDS="intel modesetting nvidia -apm -ast -chips -cirrus -dummy -epson -fbdev -fglrx -freedreno -geode -glint -i128 -i740 -mach64 -mga -neomagic -nouveau -nv -omap -omapfb -qxl -r128 -radeon -radeonsi -rendition -s3virge -savage -siliconmotion -sisusb -sunbw2 -suncg14 -suncg3 -suncg6 -sunffb -sunleo -suntcx -tdfx -tga -trident -tseng -v4l -vesa -via -virtualbox -vmware -voodoo")

eix -I xf86

[I] x11-drivers/xf86-video-intel
     Available versions:  ~*2.9.1 2.19.0 2.20.13 2.21.15 ~2.99.903 ~2.99.905-r1 ~2.99.906 ~2.99.907-r1 ~2.99.909 ~2.99.910 ~2.99.911-r1 ~2.99.912 ~2.99.912-r1 ~2.99.914 {debug dri glamor (+)sna +udev uxa xvmc}
     Installed versions:  2.21.15(11:12:21 08/04/14)(dri sna udev -glamor -uxa -xvmc)
     Description:         X.Org driver for Intel cards

[I] x11-drivers/xf86-video-modesetting
     Available versions:  0.8.1 ~0.9.0
     Installed versions:  0.8.1(10:43:55 08/04/14)
     Description:         Unaccelerated generic driver for kernel modesetting

[I] x11-drivers/nvidia-drivers
     Available versions:  96.43.23^msd 173.14.39^msd 304.123^msd 331.89^msd 334.21-r3^msd 337.25^msd 340.24^msd {+X acpi custom-cflags gtk multilib pax_kernel (+)tools uvm KERNEL="FreeBSD linux"}
     Installed versions:  340.24^msd(12:02:08 08/04/14)(X acpi tools -multilib -pax_kernel -uvm KERNEL="linux -FreeBSD")
     Description:         NVIDIA Accelerated Graphics Driver


As well, the respective modules are loaded:

Quote:

lsmod
Module Size Used by
cpufreq_ondemand 8149 4
nvidia 10474972 2
iwldvm 124399 0
snd_hda_codec_via 19239 1
i915 685228 4
snd_hda_codec_generic 49601 2 snd_hda_codec_via
joydev 9324 0
coretemp 6198 0
iwlwifi 75304 1 iwldvm
snd_hda_intel 28463 1
snd_hda_codec 76005 3 snd_hda_codec_via,snd_hda_codec_generic,snd_hda_intel
mei_me 7774 0
drm_kms_helper 28073 1 i915
mei 44535 1 mei_me
snd_hwdep 5916 1 snd_hda_codec


Also, I tried to recompile mesa specifically with i915 VIDEO_CARDS variable to no avail:

Code:

[I] media-libs/mesa
     Available versions:  [M]7.10.3 [M]7.11.2 [M]8.0.4-r1 [M]~9.0.3 9.1.6 ~9.2.5-r1 10.0.4 ~10.1.0 ~10.1.1 ~10.1.3 ~10.1.4 ~10.1.6 ~10.2.1 ~10.2.2 ~10.2.4 {bindist +classic debug +dri3 +egl g3dvl +gallium gbm gles gles1 gles2 hardened (+)llvm (+)llvm-shared-libs motif +nptl opencl openmax openvg osmesa pax_kernel pic r600-llvm-compiler selinux shared-dricore +shared-glapi vdpau wayland xa xorg xvmc ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" VIDEO_CARDS="freedreno i915 i965 ilo intel mach64 mga nouveau r100 r128 r200 r300 r600 radeon radeonsi savage sis tdfx via vmware"}
     Installed versions:  10.0.4(12:38:13 08/04/14)(classic egl gallium gbm llvm nptl xa -bindist -debug -gles1 -gles2 -llvm-shared-libs -opencl -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler -selinux -vdpau -wayland -xvmc ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="-FreeBSD" VIDEO_CARDS="i965 intel -freedreno -i915 -ilo -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware")


I think it's also worth mentioning that I had to set a kernel command line on grub to get modesetting on kernel:

Code:

cat /etc/default/grub |grep 915
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/g1310max.bin i915.modeset=1"

cat /sys/module/i915/parameters/modeset
1


The only way I get my Xorg to work is if I don' t have a /etc/X11/xorg.conf file at all, which give me the following /var/log/Xorg.0.log:

http://pastebin.com/rC10K0wf

Which seems to yield intel i965 driver with kms correctly:

Code:

cat /var/log/Xorg.0.log |grep -i intel
[   602.720] (==) Matched intel as autoconfigured driver 0
[   602.720] (==) Matched intel as autoconfigured driver 3
[   602.720] (II) LoadModule: "intel"
[   602.720] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[   602.723] (II) Module intel: vendor="X.Org Foundation"
[   602.724] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
[   602.730] (II) intel(0): Creating default Display subsection in Screen section
[   602.730] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[   602.730] (==) intel(0): RGB weight 888
[   602.730] (==) intel(0): Default visual is TrueColor
[   602.730] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4600
[   602.730] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2
[   602.730] (**) intel(0): Framebuffer tiled
[   602.730] (**) intel(0): Pixmaps tiled
[   602.730] (**) intel(0): "Tear free" disabled
[   602.730] (**) intel(0): Forcing per-crtc-pixmaps? no
[   602.730] (II) intel(0): Output eDP1 has no monitor section
[   602.730] (--) intel(0): found backlight control interface acpi_video0 (type 'firmware')
[   602.730] (II) intel(0): Output VGA1 has no monitor section
[   602.730] (II) intel(0): Output DP1 has no monitor section
[   602.730] (II) intel(0): Output HDMI1 has no monitor section
[   602.730] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 0
[   602.730] (==) intel(0): DPI set to (96, 96)
[   602.731] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend
[   602.731] (==) intel(0): Backing store enabled
[   602.731] (==) intel(0): Silken mouse enabled
[   602.731] (II) intel(0): HW Cursor enabled
[   602.731] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   602.731] (==) intel(0): DPMS enabled
[   602.731] (II) intel(0): [DRI2] Setup complete
[   602.731] (II) intel(0): [DRI2]   DRI driver: i965
[   602.731] (II) intel(0): direct rendering: DRI2 Enabled
[   602.731] (==) intel(0): hotplug detection: "enabled"
[   602.738] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 0 using eDP1, position (0, 0), rotation normal
[   602.747] (II) intel(0): Setting screen physical size to 508 x 285
[   602.791] (II) config/udev: Adding input device HDA Intel HDMI HDMI (/dev/input/event10)
[   602.791] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event7)
[   602.791] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event6)
[   602.843] (II) intel(0): EDID vendor "CMN", prod id 4931
[   602.843] (II) intel(0): Printing DDC gathered Modelines:
[   602.843] (II) intel(0): Modeline "1920x1080"x0.0  138.78  1920 1966 1996 2080  1080 1082 1086 1112 -hsync -vsync (66.7 kHz eP)
[   602.843] (II) intel(0): Modeline "1920x1080"x0.0   92.52  1920 1966 1996 2080  1080 1082 1086 1112 -hsync -vsync (44.5 kHz e)



Although I'm not sure because of the last line of this snippet:

Code:

cat /var/log/Xorg.0.log |grep -i modesetting
[   602.720] (==) Matched modesetting as autoconfigured driver 4
[   602.723] (II) LoadModule: "modesetting"
[   602.723] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[   602.723] (II) Module modesetting: vendor="X.Org Foundation"
[   602.724] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   602.729] (WW) Falling back to old probe method for modesetting


Does this fallback mean that kms isn't working?

Anyway, without the xorg file, I get a funcional X environment, but without 3D acceleration:

Code:

glxinfo               
name of display: :0.0
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".


So, following this topic, I tried with the following xorg.conf:

Code:

cat /etc/X11/xorg.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1: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:0:02.0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection



And with the following contents from .xinitrc :
Code:

cat .xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
exec startxfce4 --with-ck-launch


Which gives me the following Xorg.0.log:

http://pastebin.com/3d3RUSdT

It seems to try to load nvidia xorg module, but fails (which seems to be the root of my problem):

Code:

Failed to initialize GLX extension (Compatible NVIDIA X driver not found)


Which is strange, because everything seems to be in order. Any help would be appreciated. Thank you very much in advance.
Back to top
View user's profile Send private message
Maffblaster
Developer
Developer


Joined: 01 May 2007
Posts: 70
Location: Spokane, Washington, USA

PostPosted: Mon Aug 18, 2014 10:34 pm    Post subject: Nvidia-Drivers issues Reply with quote

I'm glad I'm not the only one who's spent more than one weekend trying to get proprietary nvidia-drivers working. I don't have access to the machine I'm using right now, but when I get home tonight I'm excited to try what I've seen in this thread. I'll post my results either way; if I get it working I'm going to update the article on the wiki so that others can have an easier time...who wants to spend more time than they need to trying to set up multiple monitors to be productive? :roll:

See this article for the "official" Gentoo guide:
https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops

More to come!
_________________
Lets make Gentoo better together!
wiki: https://wiki.gentoo.org/wiki/User:Maffblaster
blog: http://dev.gentoo.org/~maffblaster/
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Fri Oct 10, 2014 1:54 pm    Post subject: Reply with quote

I posted a working opengl accelerated intel xorg.conf file and a working opengl accelerateded nvidia optimus xorg.conf file here if anyone is interested.

https://forums.gentoo.org/viewtopic-p-7630612.html#7630612

Note that if you enable Nvidia Optimus at the moment, you might have random freezes which will require you to disable the touchpad or convert it to a regular mouse.
Back to top
View user's profile Send private message
Maffblaster
Developer
Developer


Joined: 01 May 2007
Posts: 70
Location: Spokane, Washington, USA

PostPosted: Fri Oct 10, 2014 4:15 pm    Post subject: Thanks for the reply Reply with quote

logistiker, Thanks for the reply. I had pretty much given up on the issue. It looks like I'll have to try to get it working using advice from that thread. It also looks like I had my configuration right. I think the thing I did wrong was not referencing the EDID correctly (or possibly generating an EDID that was incorrect).

It would be nice if someone wrote a tutorial on how to generate a EDID for the monitors as well and the exact places it needs to be referenced. I.E. does it need to be referenced at /etc/default/grub like this Gentoo Wiki tutorial suggests: https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops?

Code:
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/1920x1080_clevo_W670SR.bin"
GRUB_GFXMODE=1920x1080


If you have the time, I'm sure myself and the Gentoo community would appreciate you writing up an EDID guide so that people here in the forums can point others to it as a reference. Or if you want to write out the necessary steps on here for me, I'll put it in the wiki (if you give me your permission). :D
_________________
Lets make Gentoo better together!
wiki: https://wiki.gentoo.org/wiki/User:Maffblaster
blog: http://dev.gentoo.org/~maffblaster/
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Fri Oct 10, 2014 4:22 pm    Post subject: Re: Thanks for the reply Reply with quote

Maffblaster wrote:
logistiker, Thanks for the reply. I had pretty much given up on the issue. It looks like I'll have to try to get it working using advice from that thread. It also looks like I had my configuration right. I think the thing I did wrong was not referencing the EDID correctly (or possibly generating an EDID that was incorrect).

It would be nice if someone wrote a tutorial on how to generate a EDID for the monitors as well and the exact places it needs to be referenced. I.E. does it need to be referenced at /etc/default/grub like this Gentoo Wiki tutorial suggests: https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops?

Code:
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/1920x1080_clevo_W670SR.bin"
GRUB_GFXMODE=1920x1080


If you have the time, I'm sure myself and the Gentoo community would appreciate you writing up an EDID guide so that people here in the forums can point others to it as a reference. Or if you want to write out the necessary steps on here for me, I'll put it in the wiki (if you give me your permission). :D


You can just follow the guide on https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops for generating the EDID firmware file. Also note that you will definitely need the xrandr commands as well in /usr/share/config/kdm/Xsetup if you're using kdm, otherwise you will get a blank screen when starting:

Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


I also noted that the kdm login screen is screwed up as well (multiple squares) but you can still log in with it and everything is fine after that (minus the freeze issue).
Back to top
View user's profile Send private message
gulivert
l33t
l33t


Joined: 17 Jun 2004
Posts: 863
Location: Switzerland

PostPosted: Mon Nov 02, 2015 6:27 pm    Post subject: Reply with quote

Hi guys,
I took 2h to get Optimus working on my Macbook Pro 9.1, read everything here and did not find what was wrong with my configuration.

And do you know what? It was just my .xinitrc !!!

When it was not working it was looking like this :
Code:
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
setxkbmap ch fr -model macbook78 &
xbindkeys &
xterm -e mc &
xterm -e mutt &
xterm &
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session awesome


I just modified like this:
Code:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
setxkbmap ch fr -model macbook78 &
xbindkeys &
xterm -e mc &
xterm -e mutt &
xterm &
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session awesome


If this can help someone! Good luck !

Now if someone can tell me how I can check which card is actually running I will be happy.
I will also by happy to find the way to fix the TTY black screen after the startx command when using NVIDIA-DRIVERS :(
Regards,
_________________
Macbook Pro Unibody 9.1 - Kernel 4.4.6 - Awesome 3.5
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Mon Nov 02, 2015 7:00 pm    Post subject: Reply with quote

gulivert,

You are always using the Intel graphics as its the only graphics you have that can read the pixel buffer to the display.
Attempting to use the nVidia on its own gets you a blank screen, since it is not connected to the display surface.

All the nVidia graphics can do is draw into the pixel buffer for the Intel chip to transfer to the display.

You need to explicitly switch to the nVidia chip for drawing. If you haven't done that, you are only using the Intel graphics.
I think its an xrandr command.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
gulivert
l33t
l33t


Joined: 17 Jun 2004
Posts: 863
Location: Switzerland

PostPosted: Mon Nov 02, 2015 9:29 pm    Post subject: Reply with quote

@NeddySeagoon
Ok I see, thank you for your explanations :)
_________________
Macbook Pro Unibody 9.1 - Kernel 4.4.6 - Awesome 3.5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum