You are not logged in.

#1 2018-02-15 11:34:41

pilif0
Member
Registered: 2018-02-15
Posts: 2

Gnome shell uses nvidia

Hi

I have been trying to set up my laptop so that I can run X without having my dGPU turned on, as even when it's idling it shortens battery life by about one hour compared to when it's off. The idea is to use the integrated GPU for everything unless I specify that the dGPU should be used. Before last summer I used Bumblebee for that and it worked great, but at the start of the summer an update broke it. I think the issue is that nvidia added a module to the driver that Bumblebee doesn't properly unload, therefore it can't unload the whole driver and turn off the card. This resulted in the system freezing whenever Bumblebee tried to do that, most noticeably on boot. Back then I didn't have much time with work and school to properly look into it and used Fedora until now. Now I am trying to fix the problem so I can go back to using Arch.

At the current stage, I still need to turn on the dGPU with bbswitch every time I want to start X and can only turn it off after shutting down X and running modprobe -r nvidia. If I try to run X with the dGPU off, the system freezes. At one point X was using nvidia (based on output of lsof), but I managed to set X to only use intel drivers. But gnome-shell still seems to be using nvidia for something and I think that is the issue that prevents X from successfully starting into Gnome. I have looked through Gnome documentation hoping to find a config file that could switch that, but I couldn't find anything.

Could you please point me in the right direction?

Output of lsof -n -w /dev/nvidia*:

COMMAND    PID  USER   FD   TYPE  DEVICE SIZE/OFF  NODE NAME
gnome-she 3601 smola    7u   CHR 195,255      0t0 21424 /dev/nvidiactl

Offline

#2 2018-02-16 17:24:05

cafe
Member
Registered: 2014-03-20
Posts: 156

Re: Gnome shell uses nvidia

Hello,

I believe I'm facing the same issue here. My notebook comes with a i7 7700HQ (Intel HD Graphics 630), and a Nvidia 1070M.
I'm unable to start X if the dedicated GPU is OFF. And when I try to disable the GPU manually within the graphical environment using bbswitch I get "module in use by..."

In my setup I can only get maximum performance when launching X using nvidia-xrun. Optirun and Primusrun do provide some performance boost but nothing compared to a full nvidia X environment. But with this setup my computer gets hot and loud. Not cool... wink

All I could find is this: https://github.com/Bumblebee-Project/Bu … -in-use-by
Maybe this could be a starting point for us.

Have you tried with another graphical environment, like i3?

Offline

#3 2018-02-17 17:45:04

pilif0
Member
Registered: 2018-02-15
Posts: 2

Re: Gnome shell uses nvidia

I have gone through the issue that is referenced in the wiki article you linked. It just notes that the problem is in Bumblebee's inability to unload some new module of nvidia and that a proper solution will be added for Bumblebee 4.0.0. The workaround suggested there is using modprobe -r ... to unload the modules. I can do this after shutting down X, as the nothing is using any of nvidia's modules. The problem is that the modules are still required for starting and running X, because gnome-shell uses them. I can't use the command to remove the modules while X is running, as it says that the module can't be removed because its is being used.

Most confusing is that the X session, that Gnome is running in, is using intel drivers (based on configuration, power consumption and glxinfo), so I don't know why Gnome doesn't just use the same thing.

I think my issue might be related to https://github.com/Bumblebee-Project/Bu … issues/924, but I don't know the commands suggested there or how they could influence gnome-shell's choice of drivers.

Also, my hardware is an MSI laptop with i7 and Nvidia 970M. I have not tried anywhere else, because I don't have full access to any other machine.

Offline

#4 2018-02-18 13:27:37

cafe
Member
Registered: 2014-03-20
Posts: 156

Re: Gnome shell uses nvidia

I could get bumblebee to work in i3 removing the nvidia part of the xorg.conf
Maybe this is a gnome issue afterall.

$ cat /etc/X11/xorg.conf 
Section "Device"
    Identifier     "intelgpu"
    Driver         "intel"
    Option         "XvMC" "true"
    Option         "UseEvents" "true"
    Option         "AccelMethod" "UXA"
    BusID          "PCI:0:2:0"
EndSection

Offline

#5 2018-02-22 06:32:50

carlday
Member
Registered: 2011-10-04
Posts: 45

Re: Gnome shell uses nvidia

Have removed the nvidia card from the pci bus, via a service/shell cmd, when i want to run wayland.
No Nvidia dev or mods are loaded.
Runs Before=kmod-static-nodes.service

When i need to encode with h264_nvenc, disable the service/shell cmd and reboot.
The Shell cmd:
echo 1 > /sys/bus/pci/devices/0000:01:00.1/remove
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove

Offline

Board footer

Powered by FluxBB