You are not logged in.

#1 2017-07-13 16:18:07

Lain
Member
Registered: 2017-07-13
Posts: 3

Problem with NVIDIA's drivers in a dual-GPU laptop.

First, hello to everyone.
I'm new to the forum, this is my first post, although I've already lurked on it for some issues.

Now, some information.
I have an ASUS laptop with two GPUs, the Intel integrated one and the NVIDIA dedicated one. Since it's always plugged and I need more performance, I want the OS to use the DGP (i.e. NVIDIA) when it comes to run games or heavy programs such as photo/video editing etc...
I have also graphic rendering problems sometimes, so I assume it's a driver-related problem, but I'm not an expert so I could mistake.


What I have tried:
1) The output of $ lspci -k | grep -A 2 -E "(VGA|3D)" is the following:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
	Subsystem: ASUSTeK Computer Inc. Device 10ee
	Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 920MX] (rev a2)
	Subsystem: ASUSTeK Computer Inc. Device 10ee
	Kernel modules: nouveau

2) Downloading and trying both (but not at the same time, nb) the nouveau and the nvidia drivers (i.e. nvidia, nvidia-utils, nvidia-beta, xf86-video-nouveau)

3) Trying to install Bumblebee with both the NVIDIA proprietary driver method (that didn't work, maybe because I didn't manage to install them?) and the PRIME method (since the wiki says the nouveau install is deprecated). In short, I never managed to run Bumblebee properly, every optirun command give me this output:

[ 5307.148694] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[ 5307.148784] [ERROR]Could not connect to bumblebee daemon - is it running?

The PRIME output was:

Providers: number : 1
Provider 0: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 4 associated providers: 0 name:modesetting

4) The output of $ gpu-switch --dedicated (another program specifically for switching GPUs) is:

Fatal: gpu-switch has to be run in EFI mode.

The fact is that I can't manage to understand what EFI mode stands for.

5) Trying to insert

blacklist nouveau

in the /etc/modprobe.d/blacklist.conf directory. Also trying to insert this script

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
        Option "NoLogo" "true"
        #Option "UseEDID" "false"
        #Option "ConnectedMonitor" "DFP"
        # ...
EndSection

in the /etc/X11/xorg.conf.d/20-nvidia.conf directory; both these commands made LXDE (and the others DE) unable to start at all, I remained stuck (I waited about 20 minutes) at the end of the boot.

I've read these wiki articles:
https://wiki.archlinux.org/index.php/NVIDIA
https://wiki.archlinux.org/index.php/Nouveau
https://wiki.archlinux.org/index.php/Bumblebee
https://wiki.archlinux.org/index.php/Nouveau
https://wiki.archlinux.org/index.php/PRIME
...and countless posts on this and other forums.

I'm getting mad, help.

Last edited by Lain (2017-07-13 16:20:29)

Offline

#2 2017-07-13 16:35:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

I'm fairly certain that these kinds of GPU's do have a dedicated setting to make them the exclusively used GPU in your BIOS/UEFI

That said through your record of attempts so far you seem to have left out an important step here or there (did you do as the error message suggested and actually started the bumblebeed.service for example?)

However given your maximum performance requirement, you should revert everything you've tried so far (except installing the nvidia drivers) and then follow: https://wiki.archlinux.org/index.php/NVIDIA_Optimus pay close attention to the xrandr definitions depending on if you start x via .xinitrc or via a display manager (you can potentially, though it should not be harmful, even ignore the Xorg.conf that is given there, however the correct xrandr lines are paramount). However since you mentioned that listproviders only gave you one provider (that could've also happened due to conflicting configuration) I'm not entirely sure this will work correctly.

Offline

#3 2017-07-13 22:48:36

Lain
Member
Registered: 2017-07-13
Posts: 3

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Thanks and sorry for the late reply.
I don't think it's a problem of conflicting hardware, because when I used Windows it went well.
Also, I've already reverted what I've done and checked in the UEFI (don't have BIOS) for half an hour, and there was nothing about the GPUs.

I've taken another look at the wiki, can you precise which xrandr codes were you referring at?

About bumblebee, I've re-installed it, ran the command optirun glxspheres and got the output

[ERROR]Cannot acces secondary GPU - error: [XORG] (EE) NOUVEAU(0): [drm] failed to set drm interface version.

[ERROR]Aborting because fallback start is disabled.

Offline

#4 2017-07-13 23:00:21

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Lain wrote:

I've taken another look at the wiki, can you precise which xrandr codes were you referring at?

NVIDIA_Optimus#Using_nvidia and NVIDIA_Optimus#Display_Managers

Lain wrote:

About bumblebee, I've re-installed it, ran the command optirun glxspheres and got the output

[ERROR]Cannot acces secondary GPU - error: [XORG] (EE) NOUVEAU(0): [drm] failed to set drm interface version.

[ERROR]Aborting because fallback start is disabled.

Optimus and bumblebee are mutually exclusive so if you are configuring for optimus then remove bumblebee.

Offline

#5 2017-07-14 07:29:40

hfenigma
Member
Registered: 2017-06-29
Posts: 30

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Based on your description, Bumblebee with proprietary NVIDIA driver should be the best solution for you.
Here are the advised steps for you:
1. Remove nouveau driver, reinstall nvidia driver, install Intel graphics driver (mesa, xf86-video-intel).
2. Backup and clear your previous configurations in /etc/X11/xorg.conf, /etc/X11/xorg.conf.d/20-nvidia.conf, since the default empty configuration should work out of the box. This might not be necessary since bumblebee use a dedicated .conf file for Xorg.
3. Make sure you started and enabled "bumblebeed.service", pay special attention to "d" before ".service", not "bumblebee.service" which should give you an error.
4. Make sure you added your regular user to the bumblebee group.
5. Follow the wiki page for Bumblebee carefully.

Offline

#6 2017-07-14 08:12:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

It's not a good idea to have directly conflicting advice in the same thread and hfenigmas interpretation of your requirements seems to be different from mine, here's a summary to prevent you from wasting even more hours with something you still don't want in the end.

- If you want maximum peformance and compatibility, setting up the Optimus way should be best, that way the intel card is only used for display everything else gets rendered on your Nvidia card. Caveats of this: You will have no power management (you can't turn off the dedicated GPU and you won't be able to suspend or hibernate, since the resume in such a setup breaks)

- Bumblebee is for the more "traditional" intention of the dual GPU setup. Your nvidia card will be off by default and only run when its invocation is explicitly requested via optirun/primusrun for as long as that application is active.

Both of these assume that you are using the nvidia driver. Nouveau has native support for PRIME and you can invoke it with no other changes at all with

DRI_PRIME=1 program

however, the nouveau driver isn't exactly well known for its performance especially with newer GPUs

Offline

#7 2017-07-14 09:06:56

hfenigma
Member
Registered: 2017-06-29
Posts: 30

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

@V1del Sorry for giving directly conflicting advice in the same thread.
But as the wiki page for NVIDIA_Optimus stated:

The proprietary NVIDIA driver does not support dynamic switching like the nouveau driver (meaning it can only use the NVIDIA device). It also has notable screen-tearing issues that NVIDIA recognizes but has not fixed. However, it does allow use of the discrete GPU and has (as of October 2013) a marked edge in performance over the nouveau driver.

As my personal experience, the method on NVIDIA_Optimus page is the same as the "Reverse PRIME" with "Discrete card as primary GPU" method on PRIME page. Both of them simply use the discrete NVIDIA card all the time, and does not dynamically switching GPU. That's why I suggested to use Bumblebee.

If you doesn't care about power consumption (say you are always connected to the charger) or you want to use the HDMI port connected to the NVIDIA card, then I would recommend you use NVIDIA_Optimus / PRIME. (I didn't figure out how to follow the "you have to run 2 X Servers" instruction on Bumblebee wiki page)

Last edited by hfenigma (2017-07-14 09:07:29)

Offline

#8 2017-07-14 09:33:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Yeah but I've read the OP as that being the case with the always plugged in and the need of having maximum performance, that dynamic switching might not be as relevant. Only Lain can really define what they want, but seem a bit daunted with the plethora of options and which route is the correct one to go with, which my post hopefully clears up. (and to reinforce: All three options are mutually exclusive, you must choose one and stick with trying to get the correct setup right for that)

Offline

#9 2017-07-14 10:34:26

hfenigma
Member
Registered: 2017-06-29
Posts: 30

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

That's true, do not mess up with all the methods, choose one at a time and fix all the errors with it.

Offline

#10 2017-07-23 10:54:49

Lain
Member
Registered: 2017-07-13
Posts: 3

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Sorry if I reply only today, but I've had an unexpected network problem.
I've tried both your solutions, but in both cases the X server has broken.

Here's one pic I've taken, it was keeping switching back to the first ttfy (the one where's the boot log) every 5 secs.
https://i.imgur.com/LVpQbBP.jpg

EDIT: Image format.

-- mod edit: replaced img with url tags.  Please see guidelines on image sizes.  Trilby --

Last edited by Trilby (2017-07-23 20:49:33)

Offline

#11 2017-07-24 20:14:06

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: Problem with NVIDIA's drivers in a dual-GPU laptop.

Which solution do you want to pursue?
What steps have you taken to configure that solution?   What relevant packages that are currently installed?  What is the contents of the relevant configuration files?
What is the contents of Xorg.log?
Why are you attempting to run

$ sudo startx

You appear to have skipped Installation_guide#Hostname,  localhost is not a valid hostname.

Offline

Board footer

Powered by FluxBB