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: 644

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
n00b
n00b


Joined: 17 Oct 2013
Posts: 30
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
n00b
n00b


Joined: 17 Oct 2013
Posts: 30
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
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