You are not logged in.

#1 2019-04-01 09:11:26

czx
Member
Registered: 2019-03-31
Posts: 20

[SOLVED]Could not enable discrete graphics card on laptop.

Hello, I have already searched many topics about this problem but none of them solve such question on my laptop.
Could you please help me with this?

Linux version 5.0.5-arch1-1-ARCH (builduser@heftig-17705) (gcc version 8.2.1 20181127 (GCC))
Bumblebee version 3.2.1

[dell@precision ~]$ optirun nvidia-smi
[  283.192025] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card

[  283.192108] [ERROR]Aborting because fallback start is disabled.
[dell@precision ~]$ sudo bumblebeed -vv
[  273.480286] [DEBUG]Found card: 01:00.0 (discrete)
[  273.480293] [DEBUG]Found card: 00:02.0 (integrated)
[  273.480294] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  273.480347] [INFO]Configured driver: nvidia
[  273.480351] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
[  273.480403] [DEBUG]Process /sbin/modprobe started, PID 1887.
[  273.480435] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[  273.481280] [DEBUG]SIGCHILD received, but wait failed with No child processes
[  273.481302] [DEBUG]bbswitch has been detected.
[  273.481305] [INFO]Switching method 'bbswitch' is available and will be used.
[  273.481307] [DEBUG]Active configuration:
[  273.481308] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  273.481310] [DEBUG] X display: :8
[  273.481311] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[  273.481313] [DEBUG] Socket path: /var/run/bumblebee.socket
[  273.481314] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[  273.481315] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[  273.481317] [DEBUG] ModulePath: /usr/lib/nvidia/xorg,/usr/lib/xorg/modules
[  273.481318] [DEBUG] GID name: bumblebee
[  273.481320] [DEBUG] Power method: auto
[  273.481321] [DEBUG] Stop X on exit: 1
[  273.481322] [DEBUG] Driver: nvidia
[  273.481324] [DEBUG] Driver module: nvidia
[  273.481325] [DEBUG] Card shutdown state: 1
[  273.481368] [DEBUG]Process /sbin/modprobe started, PID 1888.
[  273.481439] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[  273.482125] [DEBUG]SIGCHILD received, but wait failed with No child processes
[  273.482134] [DEBUG]Configuration test passed.
[  273.482234] [INFO]bumblebeed 3.2.1 started
[  273.482255] [INFO]Initialization completed - now handling client requests
[  283.191298] [DEBUG]Accepted new connection
[  283.191773] [INFO]Switching dedicated card ON [bbswitch]
[  283.191922] [ERROR]Could not enable discrete graphics card
[  283.192168] [DEBUG]Socket closed.

I solved this problem about optirun, but it seems that I still can not use bbswitch. I tested the approximate battery life between the one with the GPU on and the one with the GPU disabled on my laptop. The change is so subtle that I don't want to continue working on the bbswitch problem. I changed my kernel to 4.19-lts and all things done smile PS: The Nvidia GPU PWR Usage is 4W if it is idle.

But if you have a better solution, please tell me.

Last edited by czx (2019-04-22 09:10:09)

Offline

#2 2019-04-01 10:37:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,123

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Please use [ code ] tags for such listings, see https://wiki.archlinux.org/index.php/Co … uct#Forums



[  273.480403] [DEBUG]Process /sbin/modprobe started, PID 1887.
[  273.480435] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[  273.481280] [DEBUG]SIGCHILD received, but wait failed with No child processes

post journalctl -b (will be big, use a pastebin client

lspci -k and xorg log may also be helpful

Last edited by Lone_Wolf (2019-04-01 10:38:09)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2019-04-01 12:58:57

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

/*This message is wrong so it is deleted*/

Last edited by czx (2019-04-02 10:16:38)

Offline

#4 2019-04-01 13:11:14

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

/* Useless Message */

Last edited by czx (2019-04-22 09:11:17)

Offline

#5 2019-04-02 06:27:48

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Lone_Wolf wrote:

Please use [ code ] tags for such listings, see https://wiki.archlinux.org/index.php/Co … uct#Forums



[  273.480403] [DEBUG]Process /sbin/modprobe started, PID 1887.
[  273.480435] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[  273.481280] [DEBUG]SIGCHILD received, but wait failed with No child processes

post journalctl -b (will be big, use a pastebin client

lspci -k and xorg log may also be helpful

Now I have solved the problem that the NVIDIA and bbswitch modules can't be found. I deleted linux-lts kernel and installed linux kernel.
But I still could not enable discrete graphics card.
Here is the new journalctl -b
and the new xorg log

Bumblebee log:

[dell@precision ~]$ sudo bumblebeed -vv
[sudo] password for dell: 
[ 1763.235618] [DEBUG]Found card: 01:00.0 (discrete)
[ 1763.235624] [DEBUG]Found card: 00:02.0 (integrated)
[ 1763.235626] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 1763.235749] [INFO]Configured driver: nvidia
[ 1763.235768] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
[ 1763.235849] [DEBUG]Process /sbin/modprobe started, PID 1975.
[ 1763.235930] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 1763.236695] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 1763.236716] [DEBUG]bbswitch has been detected.
[ 1763.236718] [INFO]Switching method 'bbswitch' is available and will be used.
[ 1763.236720] [DEBUG]Active configuration:
[ 1763.236721] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 1763.236723] [DEBUG] X display: :8
[ 1763.236724] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[ 1763.236726] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 1763.236727] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 1763.236728] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 1763.236730] [DEBUG] ModulePath: /usr/lib/nvidia/xorg,/usr/lib/xorg/modules
[ 1763.236731] [DEBUG] GID name: bumblebee
[ 1763.236733] [DEBUG] Power method: auto
[ 1763.236734] [DEBUG] Stop X on exit: 1
[ 1763.236735] [DEBUG] Driver: nvidia
[ 1763.236737] [DEBUG] Driver module: nvidia
[ 1763.236738] [DEBUG] Card shutdown state: 1
[ 1763.236783] [DEBUG]Process /sbin/modprobe started, PID 1976.
[ 1763.236838] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 1763.237500] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 1763.237508] [DEBUG]Configuration test passed.
[ 1763.237617] [INFO]bumblebeed 3.2.1 started
[ 1763.237639] [INFO]Initialization completed - now handling client requests
[ 1768.864279] [DEBUG]Accepted new connection
[ 1768.864596] [INFO]Switching dedicated card ON [bbswitch]
[ 1769.119365] [ERROR]Could not enable discrete graphics card
[ 1769.119541] [DEBUG]Socket closed.

Version:

Linux version 5.0.5-arch1-1-ARCH (builduser@heftig-17705) (gcc version 8.2.1 20181127 (GCC)) #1 SMP PREEMPT Wed Mar 27 17:53:10 UTC 2019

Bumblebee Version:

[dell@precision ~]$ bumblebeed --version
bumblebeed (Bumblebee) 3.2.1
Copyright (C) 2011 The Bumblebee Project
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Last edited by czx (2019-04-22 09:12:28)

Offline

#6 2019-04-03 12:36:14

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,123

Re: [SOLVED]Could not enable discrete graphics card on laptop.

[     5.757] (==) Using config file: "/etc/X11/xorg.conf"

Post the contents of that file, please.


The journalctl output is truncated, use SYSTEMD_LESS=FRXMK journalctl -b


Also, please stop running bumblebeed with sudo .
Is your user a member of the bumblebee group ?

Last edited by Lone_Wolf (2019-04-03 12:36:51)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2019-04-03 16:18:33

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Lone_Wolf wrote:
[     5.757] (==) Using config file: "/etc/X11/xorg.conf"

Post the contents of that file, please.


The journalctl output is truncated, use SYSTEMD_LESS=FRXMK journalctl -b


Also, please stop running bumblebeed with sudo .
Is your user a member of the bumblebee group ?

/etc/X11/xorg.conf

[dell@precision ~]$ cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.56

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
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 "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

[dell@precision ~]$ 

SYSTEMD_LESS=FRXMK journalctl -b


Yes I added my username to the bumblebee group by "sudo gpasswd -a dell bumblebee", but bumblebeed can not run without sudo here. (I have already rebooted)

[dell@precision ~]$ sudo gpasswd -a dell bumblebee
[sudo] password for dell: 
Adding user dell to group bumblebee
[dell@precision ~]$ bumblebeed
[  138.036055] [ERROR]Could not set the GID of bumblebee: Operation not permitted
[dell@precision ~]$ 

And these may helpful too.

[dell@precision ~]$ sudo modprobe bbswitch
[dell@precision ~]$ sudo modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': No such device
[dell@precision ~]$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

[dell@precision ~]$ sudo pacman -Qs nvidia
local/bumblebee 3.2.1-20
    NVIDIA Optimus support for Linux through VirtualGL
local/lib32-libvdpau 1.2-1
    Nvidia VDPAU library
local/lib32-opencl-nvidia 418.56-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/libxnvctrl 418.56-1
    NVIDIA NV-CONTROL X extension
local/nvidia 418.56-5
    NVIDIA drivers for linux
local/nvidia-settings 418.56-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 418.56-1
    NVIDIA drivers utilities
[dell@precision ~]$ 

Offline

#8 2019-04-03 16:23:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,243

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Remove that xorg.conf nvidia-xconfig will always generate the wrong configuration. Enable the bumblebeed.service reboot, test functionality with optirun or primusrun (you are not supposed to run bumblebeed as your own user, it should already be started before trying things.)

Offline

#9 2019-04-03 16:28:50

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

V1del wrote:

Remove that xorg.conf nvidia-xconfig will always generate the wrong configuration. Enable the bumblebeed.service reboot, test functionality with optirun or primusrun (you are not supposed to run bumblebeed as your own user, it should already be started before trying things.)

Thank you for your advice.
I deleted the xorg.conf so now the /etc/X11/ is:

[dell@precision ~]$ ls /etc/X11
nvidia-xorg.conf.d  xorg.conf.back  xorg.conf.d
xinit               xorg.confback1  xorg.conf.nvidia-xconfig-original
[dell@precision ~]$ 

And I have already enabled the bumblebeed.service by doing

sudo systemctl enable bumblebeed.service

But it still can't run as before.

[dell@precision ~]$ optirun bash
[  161.923297] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card

[  161.923314] [ERROR]Aborting because fallback start is disabled.
[dell@precision ~]$ primusrun bash
bash: primusrun: command not found
[dell@precision ~]$ 

Last edited by czx (2019-04-03 16:30:50)

Offline

#10 2019-04-03 16:33:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,243

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Are you actually in a xorg session there? Also try to optirun something that will actually try to use the GPU like glxgears

And post a dmesg after generating that error, and an updated xorg log.

Last edited by V1del (2019-04-03 16:33:51)

Offline

#11 2019-04-03 16:47:46

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

V1del wrote:

Are you actually in a xorg session there? Also try to optirun something that will actually try to use the GPU like glxgears

And post a dmesg after generating that error, and an updated xorg log.

Yes in xorg session.

xorg log
dmesg

Offline

#12 2019-04-03 17:38:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,243

Re: [SOLVED]Could not enable discrete graphics card on laptop.

Looks like you are running into the general bbswitch/dell issues, I suggest you look through this extensive thread on the issue and the workarounds and solutions provided therein.

Offline

#13 2019-04-04 06:00:04

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

V1del wrote:

Looks like you are running into the general bbswitch/dell issues, I suggest you look through this extensive thread on the issue and the workarounds and solutions provided therein.

I followed the instructions one by one on it (the 2nd instructions which he regarded it as 'better solution'), but I still can not use the GPU. The only change I've seen is that I cannot see the card in lspci. And the enableGpu.sh provided by him can not run properly on my computer too.

enableGpu.sh

[dell@precision ~]$ cat enableGpu.sh 
#!/bin/sh
# allow to load nvidia module
mv /etc/modprobe.d/disable-nvidia.conf /etc/modprobe.d/disable-nvidia.conf.disable

# remove NVIDIA card (currently in power/control = auto)
echo -n 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
sleep 1
# change PCIe power control
echo -n on > /sys/bus/pci/devices/0000\:00\:01.0/power/control
sleep 1
# rescan for NVIDIA card (defaults to power/control = on)
echo -n 1 > /sys/bus/pci/rescan

modprobe nvidia
[dell@precision ~]$ 

And I can see the card in the lspci after reboot and without running the enableGpu.sh.

When I was trying to run it:

[dell@precision ~]$ ./enableGpu.sh
mv: cannot stat '/etc/modprobe.d/disable-nvidia.conf': No such file or directory
./enableGpu.sh: line 6: /sys/bus/pci/devices/0000:01:00.0/remove: No such file or directory
./enableGpu.sh: line 9: /sys/bus/pci/devices/0000:00:01.0/power/control: Permission denied
./enableGpu.sh: line 12: /sys/bus/pci/rescan: Permission denied
modprobe: ERROR: Error running install command for ipmi_devintf
modprobe: ERROR: could not insert 'nvidia': Operation not permitted
[dell@precision ~]$ sudo sh enableGpu.sh
mv: cannot stat '/etc/modprobe.d/disable-nvidia.conf': No such file or directory
enableGpu.sh: line 6: /sys/bus/pci/devices/0000:01:00.0/remove: No such file or directory
modprobe: ERROR: Error running install command for ipmi_devintf
modprobe: ERROR: could not insert 'nvidia': No such device
[dell@precision ~]$ 

And it seems that they can not find nvidia device, but I have already installed the driver. I also tried to install nvidia-beta and the result is the same.

[dell@precision ~]$ sudo pacman -Ql nvidia
nvidia /usr/
nvidia /usr/lib/
nvidia /usr/lib/modprobe.d/
nvidia /usr/lib/modprobe.d/nvidia.conf
nvidia /usr/lib/modules/
nvidia /usr/lib/modules/extramodules-ARCH/
nvidia /usr/lib/modules/extramodules-ARCH/nvidia-drm.ko.gz
nvidia /usr/lib/modules/extramodules-ARCH/nvidia-modeset.ko.gz
nvidia /usr/lib/modules/extramodules-ARCH/nvidia-uvm.ko.gz
nvidia /usr/lib/modules/extramodules-ARCH/nvidia.ko.gz
nvidia /usr/share/
nvidia /usr/share/licenses/
nvidia /usr/share/licenses/nvidia/
nvidia /usr/share/licenses/nvidia/LICENSE
[dell@precision ~]$ sudo pacman -Qs nvidia
local/bumblebee 3.2.1-20
    NVIDIA Optimus support for Linux through VirtualGL[dell@precision ~]$ sudo pacman -Qs nvidia
[sudo] password for dell: 
local/bumblebee 3.2.1-20
    NVIDIA Optimus support for Linux through VirtualGL
local/lib32-libvdpau 1.2-1
    Nvidia VDPAU library
local/lib32-opencl-nvidia 418.56-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/libxnvctrl 418.56-1
    NVIDIA NV-CONTROL X extension
local/nvidia 418.56-5[dell@precision ~]$ sudo pacman -Qs nvidia
[sudo] password for dell: 
local/bumblebee 3.2.1-20
    NVIDIA Optimus support for Linux through VirtualGL
local/lib32-libvdpau 1.2-1
    Nvidia VDPAU library
local/lib32-opencl-nvidia 418.56-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/libxnvctrl 418.56-1
    NVIDIA NV-CONTROL X extension
local/nvidia 418.56-5
    NVIDIA drivers for linux
local/nvidia-settings 418.56-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 418.56-1
    NVIDIA drivers utilities
[dell@precision ~]$ 
    NVIDIA drivers for linux
local/nvidia-settings 418.56-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 418.56-1
    NVIDIA drivers utilities
[dell@precision ~]$ 
local/lib32-libvdpau 1.2-1
    Nvidia VDPAU library
local/lib32-opencl-nvidia 418.56-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/nvidia 418.56-5
    NVIDIA drivers for linux
local/nvidia-utils 418.56-1
    NVIDIA drivers utilities
[dell@precision ~]$ sudo modprobe nvidia
modprobe: ERROR: Error running install command for ipmi_devintf
modprobe: ERROR: could not insert 'nvidia': No such device
[dell@precision ~]$ 

xorg log
journalctl -b
dmesg

Last edited by czx (2019-04-22 09:13:31)

Offline

#14 2019-04-08 10:01:03

czx
Member
Registered: 2019-03-31
Posts: 20

Re: [SOLVED]Could not enable discrete graphics card on laptop.

/*This message is wrong so it is deleted*/

Last edited by czx (2019-04-08 10:02:00)

Offline

Board footer

Powered by FluxBB