Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Dual GPU laptop recognization issues

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
elbraca
Posts: 34
Joined: 2017-07-27 18:49

Re: Dual GPU laptop recognization issues

#31 Post by elbraca »

Here an update.

I've been trying some solitions posted in another threads. There are a lot of people with the fan issue and bbswitch, but seems to be a kernel issue with nvidia drivers or vice versa, according the case. One proposed solution was modifing the kernel parameters. I understand that's via editing /etc/default/grub file for permanent changes, and then updating grub. For a lot of people this solved the fan issue, but they losted some functionality, like brightness hotkey or the touchpad. Most of these cases were with GTX 960 and similars, not with GTX 10 series.

At this moment, I've tried doing the three following solutions, but without sucess:

Code: Select all

GRUB_CMDLINE_LINUX="acpi_osi!'Windows 2009" 

Code: Select all

GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009'"

Code: Select all

GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009' pcie_port_pm=off" 
For each case, I tested if this was working doing:

Code: Select all

$ optirun glxgears
and then closing the window. After a few seconds, the fan started working at 100% speed, when the discrete GPU were OFF.

Another guy seems to got solved this issues downgrading the Nvidia drivers to 375.39. He had 4.9.7 kernel version and was using a GTX 1050.This is the thread. I didn't try this yet, and I don't know if is easy to do with Bumblebee. Maybe I'll need a fresh Debian install. I haven't found other promising solutions, except I was wrong with when I modified kernel parameters.

elbraca
Posts: 34
Joined: 2017-07-27 18:49

Re: Dual GPU laptop recognization issues

#32 Post by elbraca »

I'm considering reporting these incidents as bug on Optimus systems. I don't know if should I report to Debian, to Bumblebee or somebody else. The problems are:

1) When you install Bumblebee with Nvidia non-free drivers, it sets off the discrete GPU on boot, doing the system get freezed when you try to login in graphical mode. To fix this issue you have to log as su on a Alt+F2 terminal and do

Code: Select all

# echo ON > /proc/acpi/bbswitch 
The problem with this fix is the GPU stays enabled all the time, until bbswitch sets it off.

2) Once you solved the issue exposed above, each time that bbswitch turn off the discrete GPU the fan start working at 100% speed indifenitely. You must poweroff the laptop to stop it, is not enought reboot the system. I haven't found a way to fix this issue yet. Nothing exposed on the other sites worked for ASUS laptop with GTX 10 series GPU on a Optimus system.

What do you think guys? Where should I report this issues? There are three critial componentes involved: kernel, Bumblebee (bbswitch), Nvidia drivers.

BTW: I don't know how many people visit this forum, but with more than 500 views of this post only 3 (three) users tried to help or had something to say. It's a common issue and should be fixed, come on! I'll try to make a guide for new users when I solve this.

loki
Posts: 13
Joined: 2017-08-02 22:01

Re: Dual GPU laptop recognization issues

#33 Post by loki »

I would think that any bugs reported at this time wouldn't get much time or attention on the ground that there is very little clarity, detail or information to go on.

I'm not convinced that bumblebee/bbswitch is a factor in the issue at all and suspect that the system hang after (graphical) login will occur if the discrete GPU is disabled/unloaded regardless of the method or mechanism used to do so.

I've been looking into my issue and have concluded the system appears to hang during the initialization of the user desktop session as X is expecting, and sat waiting for, a response from the discrete GPU that never comes. Although the discrete GPU is disabled, the system (and X) is still detecting it.

After a bit more investigation, passing kernel parameter...

Code: Select all

acpi_rev_override
...at boot has addressed this issue for me.

This option should force the OS to return/report ACPI revision "5" which some system firmware (I guess mine included) expects for Linux and will cause some things to be handled differently. I think this has been addressed in later Linux kernels.

elbraca
Posts: 34
Joined: 2017-07-27 18:49

Re: Dual GPU laptop recognization issues

#34 Post by elbraca »

Well, finally I was able to solve the problem. It wasn't the way I wanted it, but the most important thing is that now is solved.

For this, I tried to imitate what Ubuntu (I think) does. I proceeded to disable the integrated GPU to exclusively use the discrete GPU, without using BIOS. The ideal solution would have been to make it work properly with Bumblebee, but it was getting out of my hands and I went through 11 fresh Debian installations, piles of threads and attempts at solution. All were "patches", nothing to fix it from root.

Regarding the "non-recognition" of lspci (and nvidia-detect) command, what probably happens is that it doesn't have built-in recognition of the new GPUs yet and that is why when we use that command shows only a part of the GPU ID.

As I promised, I'll left a step-by-step guide to what I did to be able to walk the discreet GPU. I would like to mention that although I based the tutorial on Debiban's wikis, these wikis aren't properly drafted and aren't complete. There are important things that are not properly clarified or mentioned, forcing the user to "guess" certain things that for some may be trivial and for others not.

Here we go...
--------------------------------------------------------------------------------------------------------------
Pros and cons of this solution
--------------------------------------------------------------------------------------------------------------
First, I would like to mention the pros and cons that I found with this solution.
Pros:
+ We can get more performance from the Nvidia GPU, regarding if we didn't use the official drivers.
+ In cases where correspond, we can take advantage of the use CUDA support.

Cons:
- The GPU is constantly on, which generates more power consumption and therefore reduces the battery life.
- A few degrees of temperature are appreciated more than using only the onboard GPU or even Bumblebee. This point seems to me more worrying than the previous one, since the temperature and the batterie life arent good friends considering some laptops don't offer the possibility to remove the battery when we use the power adapter.

--------------------------------------------------------------------------------------------------------------
Guide: how to install Nvidia drivers on Optimus system and using only the discrete GPU
--------------------------------------------------------------------------------------------------------------
OS: Debian Stretch
Desktop: GNOME
Drivers version: 375.66

Important: This guide is intended for someone who has just completed a fresh installation of Debian. We consider that we already know our model of GPU Nvidia and that's covered in the version of drivers that we're going to use.

Step 1
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example

Code: Select all

deb http://httpredir.debian.org/debian/ stretch main contrib non-free
Step 2
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

Code: Select all

# apt-get update
# apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-driver
Step 3
Ensure xrandr is installed and available

Code: Select all

# apt-get install x11-xserver-utils
Step 4
Create an xorg.conf under /etc/X11/xorg.conf and add the following:

Code: Select all

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:X:Y:Z"
    Option "AllowEmptyInitialConfiguration"
EndSection

# Insert any additional custom configurations, below:
Where "BusID" X:Y:Z are the shortened/truncated numbers from the ID gathered by lspci | grep 3D. For example, if the output of lspci | grep 3D displayed a PCI ID of 09:00.0, the BusID entry would read: BusID "9:0:0"

Step 5
Create a custom script, /usr/local/bin/switch_nvidia.sh:

Code: Select all

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --dpi 96
The DPI setting, (--dpi) should be fine for most screens; however, this may need to be adjusted for newer high density pixel screens. Systems with HiDPI screens likely will want to set this to 192. Consult your hardware manufacturer's specification for the appropriate setting.

Step 6
Make the script executable:

Code: Select all

# chmod +x /usr/local/bin/switch_nvidia.sh
Step 7
Create a two new .desktop files - /usr/share/gdm/greeter/autostart/optimus.desktop and /etc/xdg/autostart/optimus.desktop about following content:

Code: Select all

[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
Step 7
Reboot the system.

Step 8
Enjoy the drivers.

--------------------------------------------------------------------------------------------------------------
Verify the discrete GPU is working
--------------------------------------------------------------------------------------------------------------
1. Install inxi

Code: Select all

$ sudo apt-get install inxi
and reboot.

Then call inxi -G, you should get something like this

Code: Select all

$ inxi -G
Graphics:  Card-1: Intel Device 591b
           Card-2: NVIDIA Device 1c8d
           Display Server: X.Org 1.19.2 drivers: modesetting,nvidia
           Resolution: 1920x1080@60.01hz
           GLX Renderer: GeForce GTX 1050/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 375.66
2. Run

Code: Select all

$ glxgears
You must have a large number of FPS. For example, on a GTX 1050 it has ~5000fps while with the Intel and Bumblebee had ~70fps.

Note: In some cases could be usefull install firmware-linux with contrib and non-free repositories.

--------------------------------------------------------------------------------------------------------------
Sources:
--------------------------------------------------------------------------------------------------------------
NVIDIA Proprietary Driver
NVIDIA Optimus
--------------------------------------------------------------------------------------------------------------
Feel free to share, edit or comment this guide. I hope this help someone. Cheers!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Dual GPU laptop recognization issues

#35 Post by stevepusser »

I'll say again that nvidia-detect will not "see" the secondary Nvdia GPU on an Optimus system.

Also, glxgears is matching your refresh rate of 60. Your 630 graphics actually should be much, much higher--run this for an xorg driver like the intel or modesetting.

Code: Select all

vblank_mode=0 glxgears


Out of curiosity, did you ever try an MX 16.1 install (should only take a few minutes from the Live USB), enable the MX test repo in Synaptic for the 375.66 driver, reload the apt database, and then try the Nvidia driver installer in MX Tools? It's supposed to recognize an Optimus system and automatically set up bumble-nvidia. At least, that's what it does on my Skylake Optimus system, and the developer will be interested to see if it works or fails on your system.
MX Linux packager and developer

elbraca
Posts: 34
Joined: 2017-07-27 18:49

Re: Dual GPU laptop recognization issues

#36 Post by elbraca »

I'll say again that nvidia-detect will not "see" the secondary Nvdia GPU on an Optimus system.
I've clarified it about nvidia-detect because in the installation guide of Nvidia Drivers of the Debian's wiki isn't clear that it doesn't work on Optimus systems. Maybe I didn't write it properly. There are some relevant things in those guides that an average user who has never used Optimus system could ignore and end up going through what happened to me.
Also, glxgears is matching your refresh rate of 60. Your 630 graphics actually should be much, much higher--run this for an xorg driver like the intel or modesetting.
I totally agree. I probably mispronounced it, but my intention was to compare the results of glxgears using the discrete GPU against when we use the integrated GPU with Bumblebee (simultaneously), that is, when we take advantage of the Optimus system.

It would have been a better comparison if it did against the glxgears of the Intel GPU.
Out of curiosity, did you ever try an MX 16.1 install (should only take a few minutes from the Live USB), enable the MX test repo in Synaptic for the 375.66 driver, reload the apt database, and then try the Nvidia driver installer in MX Tools? It's supposed to recognize an Optimus system and automatically set up bumble-nvidia. At least, that's what it does on my Skylake Optimus system, and the developer will be interested to see if it works or fails on your system.
I remember trying MX 16.1 but at that time I didn't try to install the GPU drivers. If my memory doesn't fail, we tried to use SolydXK's DDM tool, because the one in MX 16.1 required some dependencies that it didn't satisfied in Debian Stretch, so we had pending the test of that tool. That installation with MX Tools in MX 16.1 can it be done via USB Live or do is necesary to install it on the disk in order to use the backports? I have no problem trying, we can do it.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [SOLVED] Dual GPU laptop recognization issues

#37 Post by stevepusser »

I doubt it will work on a standard Live USB, because you have to reboot to get it working. If you have another stick, you could use the Live USB tool in MX to create a Live USB with persistence---that means any changes are saved.
MX Linux packager and developer

Post Reply