You are not logged in.

#1 2017-02-03 23:05:40

Isildur
Member
Registered: 2009-05-26
Posts: 96

[SOLVED] Problem using hybrid Intel/Nvidia card with nvidia driver

I'm using a Zenbook with a hybrid Intel/Nvidia graphic card solution. I tried it with Bumblebee and Nouveau a long time ago and then didn't use the Nvidia card for a long time. Now I tried it again and stumbled upon PRIME. $xrandr --listproviders didn't show me the Nvidia card but #modprobe nouveau did the trick and it worked. Now I tried switching to the nivdia driver to compare the gaming performance but I don't see the card in $xrandr --listproviders and #modprobe nvidia doesn't do the trick anymore.
I don't have a (deprecated xorg.conf file or xorg.conf.d/ config file which according to the wiki isn't required anymore.

Do you have any suggestions what might be the reason? Or what other things to check?


lspci | grep NVIDIA
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)

xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel


dmesg | grep nvidia                                                                                                                                      :(
[    9.099777] nvidia: loading out-of-tree module taints kernel.
[    9.099783] nvidia: module license 'NVIDIA' taints kernel.
[    9.110155] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[    9.117730] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  375.26  Thu Dec  8 18:04:14 PST 2016
[    9.119811] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver

Last edited by Isildur (2017-02-08 19:05:46)

Offline

#2 2017-02-04 03:26:13

vileperson
Member
Registered: 2009-07-13
Posts: 59

Re: [SOLVED] Problem using hybrid Intel/Nvidia card with nvidia driver

Make sure you follow this page, since it is an optimus system. I just finished setting my system up the same way, after jumpng from Nouveau.
https://wiki.archlinux.org/index.php/NVIDIA_Optimus

It says you don't need the old stuff in your config files, but then it say you need to add this to your xorg.conf...

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "1:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

I went ahead and put your BusID in there.

My "dmesg | grep nvidia" displays one line that yours does not, about enabling the device...

nvidia 0000:01:00.0: enabling device (0004 -> 0007)


The more I know...
The more I know that I don't know.

Offline

#3 2017-02-05 23:02:26

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [SOLVED] Problem using hybrid Intel/Nvidia card with nvidia driver

Thanks for your detailed help! I followed the article and added the sections to my xorg.conf and .xinitrc. However I get a black screen when booting. If I switch to another console, login as normal user and then execute $startx it works surprisingly. But the provider list of xrandr looks weird to me then with one provider being "NIVIDIA-0" and one "modesetting". I do get some output from xorg.log and dmesg but I can't really judge it.

$cat /var/log/Xorg.0.log.old | grep EE
[    11.704] (EE) modeset(G0): eglGetDisplay() failed
[    11.705] (EE) modeset(G0): glamor initialization failed
$dmesg | grep nvidia
[    7.383132] nvidia: loading out-of-tree module taints kernel.
[    7.383136] nvidia: module license 'NVIDIA' taints kernel.
[    7.390806] nvidia-nvlink: Nvlink Core is being initialized, major device number 244
[    7.398387] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  375.26  Thu Dec  8 18:04:14 PST 2016
[    7.400267] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   11.840188] nvidia-modeset: Allocated GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
[   11.840269] nvidia-modeset: Freed GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
[   32.709971] nvidia-modeset: Allocated GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
[   32.710072] nvidia-modeset: Freed GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
[  290.232757] nvidia-modeset: Allocated GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
[  290.232859] nvidia-modeset: Freed GPU:0 (GPU-95bd6e40-3777-081d-4414-ae8a551c579b) @ PCI:0000:01:00.0
$xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x2b5 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x46 cap: 0x2, Sink Output crtcs: 3 outputs: 4 associated providers: 1 name:modesetting

xorg.conf (with additional section to try to fix the blackscreen problem as described in the wiki

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "1:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier  "intel"
    Driver      "modesetting"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod"  "sna"
    #Option      "TearFree" "True"
    #Option      "Tiling" "True"
    #Option      "SwapbuffersWait" "True"
EndSection

.xinitrc

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

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

exec dbus-launch startxfce4

Offline

#4 2017-02-07 20:49:04

vileperson
Member
Registered: 2009-07-13
Posts: 59

Re: [SOLVED] Problem using hybrid Intel/Nvidia card with nvidia driver

Yeah, I still don't see the line in your dmesg output about enabling the device. That is probably a problem.

Your xrandr --listproviders looks just like mine, with those 2 entries (NVIDIA-0 and modesetting), however it shows that your NVIDIA has [ Source Output crtcs: 0 ]. That is probably a problem, as well.

Do you have an "Enable Optimus" option in your bios? Or any other options pertaining to the video card settings? Check and make sure you are not telling the system not to use the card.


The more I know...
The more I know that I don't know.

Offline

#5 2017-02-08 19:04:20

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [SOLVED] Problem using hybrid Intel/Nvidia card with nvidia driver

Thanks for your reply!
The problem was that I didn't pay attention to my Loginmanager (sorry my fault). So it didn't run the xrandr-commands before the start of x. That explains why it worked for startx. I switched to LightDM (since Slim is unmaintained anyway) and configured it correctly which solved the problem. In the end I switched to Bumblebee again now to be able to switch cards which seems to work fine.

Offline

Board footer

Powered by FluxBB