bbswitch: No discrete VGA device found on debian buster
 
Notifications
Clear all

bbswitch: No discrete VGA device found on debian buster  

  RSS

Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

I'm having a Geforce RTX2060 in a Sonnet Breakaway Box 550. I'm running Debian Buster and I'm trying to get the egpu working. I followed http://www.pocketnix.org/posts/eGPUs%20under%20Linux%3A%20an%20advanced%20guide and https://wiki.debian.org/NvidiaGraphicsDrivers#Version_440.82_.28via_buster-backports.29 .

In short: the card is recongized, but I'm missing something to make applications run on the external gpu. 

 

There are no thunderbolt issues:

# boltctl
● Sonnet Technologies, Inc. eGFX Breakaway Box 550
├─ type: peripheral
├─ name: eGFX Breakaway Box 550
├─ vendor: Sonnet Technologies, Inc.
├─ uuid: 00523095-2f5f-0800-ffff-ffffffffffff
├─ status: authorized
│ ├─ domain: c6030000-0070-7c1e-0386-fb1c26242123
│ └─ authflags: none
├─ authorized: Mon 15 Jun 2020 03:34:36 PM UTC
├─ connected: Mon 15 Jun 2020 03:34:36 PM UTC
└─ stored: no

The external gpu is found:

# lspci | grep VGA 
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
06:00.0 VGA compatible controller: NVIDIA Corporation Device 1f06 (rev a1)

# nvidia-smi 
Mon Jun 15 18:11:58 2020 
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 206... On | 00000000:06:00.0 Off | N/A |
| 29% 29C P8 8W / 175W | 0MiB / 7982MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

It is possible to run, e.g., hashcat

# hashcat -b 
hashcat (v5.1.0) starting in benchmark mode...

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

OpenCL Platform #1: NVIDIA Corporation
======================================
* Device #1: GeForce RTX 2060 SUPER, 1995/7982 MB allocatable, 34MCU

Benchmark relevant options:
===========================
* --optimized-kernel-enable

Hashmode: 0 - MD5

Speed.#1.........: 26678.6 MH/s (85.13ms) @ Accel:256 Loops:1024 Thr:256 Vec:1

Hashmode: 100 - SHA1

Speed.#1.........: 9545.9 MH/s (59.42ms) @ Accel:256 Loops:256 Thr:256 Vec:1

Hashmode: 1400 - SHA2-256

Speed.#1.........: 3959.6 MH/s (71.66ms) @ Accel:256 Loops:128 Thr:256 Vec:1

X11 doesn't use it (yet)

# inxi -Fxx
System: Host: moment-4 Kernel: 4.19.0-9-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 Desktop: Cinnamon 3.8.8 dm: GDM3 
        Distro: Debian GNU/Linux 10 (buster) 
Machine: Type: Laptop System: Notebook product: N13_N140ZU v: N/A serial: <root required> Chassis: No Enclosure type: 10 
         serial: <root required> 
         Mobo: Notebook model: N13_N140ZU serial: <root required> UEFI: INSYDE v: 1.07.08 date: 06/21/2019 
Battery: ID-1: BAT0 charge: 34.2 Wh condition: 34.2/35.3 Wh (97%) volts: 13.0/11.4 model: Notebook BAT serial: 0001 
         status: Full 
CPU: Topology: Quad Core model: Intel Core i7-8565U bits: 64 type: MT MCP arch: Kaby Lake rev: B L2 cache: 8192 KiB 
     flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31872 
     Speed: 1898 MHz min/max: 400/4600 MHz Core speeds (MHz): 1: 1869 2: 1868 3: 1865 4: 1878 5: 1899 6: 1897 7: 1844 
     8: 1840 
Graphics: Device-1: Intel UHD Graphics 620 vendor: CLEVO/KAPOK driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3ea0 
          Device-2: NVIDIA vendor: PNY driver: nvidia v: 440.82 bus ID: 06:00.0 chip ID: 10de:1f06 
          Display: x11 server: X.Org 1.20.4 driver: intel,modesetting resolution: 1920x1080~60Hz, 1920x1080~60Hz 
          OpenGL: renderer: Mesa DRI Intel HD Graphics (Whiskey Lake 3x8 GT2) v: 4.5 Mesa 18.3.6 compat-v: 3.0 
          direct render: Yes 
[...]

(the aim would be to switch automatically to the egpu whenever attached, but I guess I need to get the egpu running properly)

I can't run glxinfo

# optirun -v glxinfo
[ 2480.535810] [INFO]Response: No - error: [XORG] (EE)

[ 2480.535832] [ERROR]Cannot access secondary GPU - error: [XORG] (EE)

[ 2480.535845] [ERROR]Aborting because fallback start is disabled.


PRIMUS_VERBOSE=2 primusrun glxgears
primus: fatal: Bumblebee daemon reported: error: [XORG] (EE) 

Because some handle can't be found?

# cat /var/log/syslog | grep VGA
[...]
Jun 15 17:34:39 moment-4 kernel: [ 0.616029] pci 0000:00:02.0: vgaarb: setting as boot VGA device
Jun 15 17:34:39 moment-4 kernel: [ 0.616029] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
Jun 15 17:34:39 moment-4 kernel: [ 0.616029] pci 0000:06:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none
Jun 15 17:34:39 moment-4 kernel: [ 1.794873] fb0: EFI VGA frame buffer device
Jun 15 17:34:39 moment-4 kernel: [ 2.793234] fb: switching to inteldrmfb from EFI VGA
Jun 15 17:34:39 moment-4 kernel: [ 2.793342] [drm] Replacing VGA console driver
Jun 15 17:34:39 moment-4 kernel: [ 2.795142] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
Jun 15 17:34:39 moment-4 kernel: [ 7.659119] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
Jun 15 17:34:39 moment-4 kernel: [ 7.659125] bbswitch: cannot find ACPI handle for VGA device 0000:06:00.0
Jun 15 17:34:39 moment-4 kernel: [ 7.659127] bbswitch: No discrete VGA device found
Jun 15 17:34:39 moment-4 kernel: [ 7.805424] nvidia 0000:06:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
Jun 15 17:34:54 moment-4 /usr/lib/gdm3/gdm-x-session[1736]: (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
Jun 15 17:43:52 moment-4 kernel: [ 560.566946] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
Jun 15 17:43:52 moment-4 kernel: [ 560.566953] bbswitch: cannot find ACPI handle for VGA device 0000:06:00.0
Jun 15 17:43:52 moment-4 kernel: [ 560.566956] bbswitch: No discrete VGA device found
# sudo dmesg | grep bbswitch

[ 7.658836] bbswitch: loading out-of-tree module taints kernel.
[ 7.658884] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
[ 7.659114] bbswitch: version 0.8
[ 7.659119] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[ 7.659125] bbswitch: cannot find ACPI handle for VGA device 0000:06:00.0
[ 7.659127] bbswitch: No discrete VGA device found
[ 560.566942] bbswitch: version 0.8
[ 560.566946] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[ 560.566953] bbswitch: cannot find ACPI handle for VGA device 0000:06:00.0
[ 560.566956] bbswitch: No discrete VGA device found

xorg config

I have been using egpu-switcher https://github.com/hertg/egpu-switcher , which is reflected in my x11 configs:

# pwd
/etc/X11
# ls -alh
total 56K
drwxr-xr-x 1 root root 378 Jun 15 17:15 .
drwxr-xr-x 1 root root 4.4K Jun 15 17:43 ..
drwxr-xr-x 1 root root 612 Nov 13 2019 app-defaults
-rw-r--r-- 1 root root 15 Jun 2 19:26 default-display-manager
drwxr-xr-x 1 root root 40 Nov 13 2019 fonts
-rw-r--r-- 1 root root 17K Nov 23 2016 rgb.txt
drwxr-xr-x 1 root root 48 Mar 28 12:32 xinit
drwxr-xr-x 1 root root 0 Feb 11 2019 xkb
lrwxrwxrwx 1 root root 27 Jun 15 17:12 xorg.conf -> /etc/X11/xorg.conf.internal
-rw-r--r-- 1 root root 272 Jun 15 17:06 xorg.conf.egpu
-rw-r--r-- 1 root root 271 Jun 15 17:06 xorg.conf.internal.backup
-rwxr-xr-x 1 root root 709 Nov 23 2016 Xreset
drwxr-xr-x 1 root root 12 Nov 13 2019 Xreset.d
drwxr-xr-x 1 root root 20 Nov 13 2019 Xresources
-rwxr-xr-x 1 root root 3.5K Nov 23 2016 Xsession
drwxr-xr-x 1 root root 702 Jun 2 19:26 Xsession.d
-rw-r--r-- 1 root root 265 Nov 23 2016 Xsession.options
drwxr-xr-x 1 root root 20 Nov 13 2019 xsm
-rw-r--r-- 1 root root 13 Dec 5 2016 XvMCConfig
-rw-r--r-- 1 root root 630 Nov 13 2019 Xwrapper.config

I moved `xorg.conf.internal`, because I couldn't login to cinnamon anymore when `xorg.conf` pointed to that configuration.

# cat xorg.conf.egpu
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    BusID "6:0:0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection
# cat xorg.conf.internal.backup 
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "intel"
    BusID "0:2:0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSectio

bbswitch modprobe fails

# modprobe -vvv bbswitch
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x55fc2234f150 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.19.0-9-amd64/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.19.0-9-amd64/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.19.0-9-amd64/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/4.19.0-9-amd64/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=bbswitch, normalized=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:562 kmod_module_new_from_lookup() lookup modules.dep bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:574 kmod_search_moddep() use mmaped index 'modules.dep' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='bbswitch' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x55fc22734f80 key='bbswitch'
modprobe: DEBUG: ../libkmod/libkmod-module.c:202 kmod_module_parse_depline() 0 dependencies for bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup bbswitch=0, list=0x55fc22734650
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/bbswitch/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/bbswitch': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_pcsp mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_audio mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=cx88_alsa mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_atiixp_modem mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_intel8x0m mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_via82xx_modem mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=bonding mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=dummy mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/bbswitch/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/bbswitch': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/4.19.0-9-amd64/updates/dkms/bbswitch.ko'
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/4.19.0-9-amd64/updates/dkms/bbswitch.ko'
insmod /lib/modules/4.19.0-9-amd64/updates/dkms/bbswitch.ko 
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/4.19.0-9-amd64/updates/dkms/bbswitch.ko'
modprobe: INFO: ../libkmod/libkmod-module.c:886 kmod_module_insert_module() Failed to insert module '/lib/modules/4.19.0-9-amd64/updates/dkms/bbswitch.ko': No such device
modprobe: ERROR: could not insert 'bbswitch': No such device
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x55fc22734f80 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x55fc22734f80 key='bbswitch'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x55fc22734460 released

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

I upgraded the kernel and the headers of my Debian to 5.6.0-0.bpo.2:

module bbswitch not found

# modprobe -vvv bbswitch
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x5616b35f1150 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=bbswitch, normalized=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:562 kmod_module_new_from_lookup() lookup modules.dep bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:574 kmod_search_moddep() use mmaped index 'modules.dep' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:566 kmod_module_new_from_lookup() lookup modules.symbols bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:570 kmod_module_new_from_lookup() lookup install and remove commands bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:574 kmod_module_new_from_lookup() lookup modules.aliases bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:434 kmod_lookup_alias_from_alias_bin() use mmaped index 'modules.alias' for name=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:578 kmod_module_new_from_lookup() lookup modules.builtin bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup bbswitch=0, list=(nil)
modprobe: FATAL: Module bbswitch not found in directory /lib/modules/5.6.0-0.bpo.2-amd64

processing bbswitch-dkms fails

# apt install --reinstall -t buster-backports bbswitch-dkms
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
bbswitch-dkms
0 upgraded, 1 newly installed, 0 to remove and 164 not upgraded.
Need to get 0 B/12.8 kB of archives.
After this operation, 36.9 kB of additional disk space will be used.
Selecting previously unselected package bbswitch-dkms.
(Reading database ... 486769 files and directories currently installed.)
Preparing to unpack .../bbswitch-dkms_0.8-8_amd64.deb ...
Unpacking bbswitch-dkms (0.8-8) ...
Setting up bbswitch-dkms (0.8-8) ...
Loading new bbswitch-0.8 DKMS files...
Building for 5.6.0-0.bpo.2-amd64
Building initial module for 5.6.0-0.bpo.2-amd64
Error! Bad return status for module build on kernel: 5.6.0-0.bpo.2-amd64 (x86_64)
Consult /var/lib/dkms/bbswitch/0.8/build/make.log for more information.
dpkg: error processing package bbswitch-dkms (--configure):
installed bbswitch-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
bbswitch-dkms
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

there's an incompatible pointer

# cat /var/lib/dkms/bbswitch/0.8/build/make.log 
DKMS make.log for bbswitch-0.8 for kernel 5.6.0-0.bpo.2-amd64 (x86_64)
Tue 16 Jun 2020 09:13:51 AM CEST
make -C /lib/modules/5.6.0-0.bpo.2-amd64/build M="$(pwd)" modules
make[1]: Entering directory '/usr/src/linux-headers-5.6.0-0.bpo.2-amd64'
CC [M] /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_init’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:460:63: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
^~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-5.6.0-0.bpo.2-common/include/acpi/acpi_bus.h:83,
from /usr/src/linux-headers-5.6.0-0.bpo.2-common/include/linux/acpi.h:32,
from /var/lib/dkms/bbswitch/0.8/build/bbswitch.c:32:
/usr/src/linux-headers-5.6.0-0.bpo.2-common/include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.6.0-0.bpo.2-common/scripts/Makefile.build:273: /var/lib/dkms/bbswitch/0.8/build/bbswitch.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.6.0-0.bpo.2-common/Makefile:1704: /var/lib/dkms/bbswitch/0.8/build] Error 2
make[1]: *** [/usr/src/linux-headers-5.6.0-0.bpo.2-common/Makefile:180: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.6.0-0.bpo.2-amd64'
make: *** [Makefile:13: default] Error 2

I have no idea how to proceed from here... What should I try/do next? Thx.

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

I downloaded bbswitch-dkms from debian bulseye and installed it:

# dpkg -i bbswitch-dkms_0.8-9_amd64.deb 
(Reading database ... 504505 files and directories currently installed.)
Preparing to unpack bbswitch-dkms_0.8-9_amd64.deb ...

-------- Uninstall Beginning --------
Module: bbswitch
Version: 0.8
Kernel: 5.6.0-0.bpo.2-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

bbswitch.ko:
- Uninstallation
- Deleting from: /lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/
rmdir: failed to remove 'updates/dkms': Directory not empty
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.

------------------------------
Deleting module version: 0.8
completely from the DKMS tree.
------------------------------
Done.
Unpacking bbswitch-dkms (0.8-9) over (0.8-9) ...
Setting up bbswitch-dkms (0.8-9) ...
Loading new bbswitch-0.8 DKMS files...
Building for 5.6.0-0.bpo.2-amd64
Building initial module for 5.6.0-0.bpo.2-amd64
Done.

bbswitch.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/

depmod...

DKMS: install completed.
# modprobe -vvv bbswitch
modprobe: INFO: ../libkmod/libkmod.c:364 kmod_set_log_fn() custom logging function 0x55c1c8672150 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:755 index_mm_open() file=/lib/modules/5.6.0-0.bpo.2-amd64/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() input alias=bbswitch, normalized=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:562 kmod_module_new_from_lookup() lookup modules.dep bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:574 kmod_search_moddep() use mmaped index 'modules.dep' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod.c:402 kmod_pool_get_module() get module name='bbswitch' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:410 kmod_pool_add_module() add 0x55c1c9a7f020 key='bbswitch'
modprobe: DEBUG: ../libkmod/libkmod-module.c:202 kmod_module_parse_depline() 0 dependencies for bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:583 kmod_module_new_from_lookup() lookup bbswitch=0, list=0x55c1c9a7ec70
modprobe: DEBUG: ../libkmod/libkmod.c:501 lookup_builtin_file() use mmaped index 'modules.builtin' modname=bbswitch
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/bbswitch/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/bbswitch': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_pcsp mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_usb_audio mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=cx88_alsa mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_atiixp_modem mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_intel8x0m mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=snd_via82xx_modem mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=bonding mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1393 kmod_module_get_options() modname=dummy mod->name=bbswitch mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1750 kmod_module_get_initstate() could not open '/sys/module/bbswitch/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1760 kmod_module_get_initstate() could not open '/sys/module/bbswitch': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/bbswitch.ko'
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/bbswitch.ko'
insmod /lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/bbswitch.ko 
modprobe: DEBUG: ../libkmod/libkmod-module.c:744 kmod_module_get_path() name='bbswitch' path='/lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/bbswitch.ko'
modprobe: INFO: ../libkmod/libkmod-module.c:886 kmod_module_insert_module() Failed to insert module '/lib/modules/5.6.0-0.bpo.2-amd64/updates/dkms/bbswitch.ko': No such device
modprobe: ERROR: could not insert 'bbswitch': No such device
modprobe: DEBUG: ../libkmod/libkmod-module.c:468 kmod_module_unref() kmod_module 0x55c1c9a7f020 released
modprobe: DEBUG: ../libkmod/libkmod.c:418 kmod_pool_del_module() del 0x55c1c9a7f020 key='bbswitch'
modprobe: INFO: ../libkmod/libkmod.c:331 kmod_unref() context 0x55c1c9a7e480 released

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
nu_ninja
(@nu_ninja)
Reputable Member
Joined: 2 years ago
 

I'm not experienced with the nvidia side of things, but is bumblebee necessary? I don't think it's required with the egpu switcher script you are using. I noted that your xorg.conf is still linked to xorg.conf.internal in your logs. Can you try switching it to the xorg.conf.egpu and try running something without bumblebee?

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1

 
2012 13" MacBook Pro [3rd,2C,M] + RX 460 @ 10Gbps-TB1 (AKiTiO Thunder2) + macOS 10.14.4 [build link]  


ReplyQuote
Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

No, I don't really need bumblebee, so I removed it and tried with the egpu-switcher. The xorg configs are generated, but no matter which one I use, in both cases I get a blank screen when I start. I renamed them to .backup, so the symlink points to nowhere. So, it's a matter of getting this xorg config right?

 

# ls -l xorg.conf* 
lrwxrwxrwx 1 root root  23 Jun 19 22:05 xorg.conf -> /etc/X11/xorg.conf.egpu
-rw-r--r-- 1 root root 272 Jun 16 11:19 xorg.conf.egpu.backup
-rw-r--r-- 1 root root 271 Jun 16 11:19 xorg.conf.internal.backup

xorg.conf.d:
total 0
# cat xorg.conf.egpu.backup 
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    BusID "6:0:0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection
# cat xorg.conf.internal.backup 
Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "intel"
    BusID "0:2:0"  
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection


# lspci | grep VGA 
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
06:00.0 VGA compatible controller: NVIDIA Corporation Device 1f06 (rev a1)

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
nu_ninja
(@nu_ninja)
Reputable Member
Joined: 2 years ago
 

Right, that looks to be correct from what I've seen and used on this forum, but maybe Debian configures itself differently somehow...

This part of the debian wiki might be the one to follow: https://wiki.debian.org/NVIDIA%20Optimus#Using_NVIDIA_GPU_as_the_primary_GPU

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1

 
2012 13" MacBook Pro [3rd,2C,M] + RX 460 @ 10Gbps-TB1 (AKiTiO Thunder2) + macOS 10.14.4 [build link]  


ReplyQuote
Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

OK, so we're making progress: I'm able to use the egpu when I connect my monitor to the egpu with the config below and my laptop screen works fine as well.

Thanks a lot already!

I used nvidia-xconfig to generate one, but added a few lines, the most important ones:

BusID "PCI:6:0:0"
Option "AllowExternalGpus" "true"
Option "AllowEmptyInitialConfiguration" "true"

and

Section "Device"
    Identifier "iGPU_intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
EndSection

I don't really understand why it's working, so it would be nice if someone can elaborate on it: I'm mainly struggling to understand the `Inactive` and `Driver  "modesetting"` in my xorg.conf. However, at this point, all works well when I'm connected to the egpu, but when I disconnect the egpu, the console starts, and it flickers about every 2 seconds, which makes it pretty hard to do anything useful. So, the next question is: how to configure xorg to the iGPU when the eGPU is not connected?

Thanks!

 

# cat /var/log/Xorg.0.log.old 
[ 13.965] (--) Log file renamed from "/var/log/Xorg.pid-1727.log" to "/var/log/Xorg.0.log"
[ 13.965] 
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 13.965] Build Operating System: Linux 4.19.0-8-amd64 x86_64 Debian
[ 13.965] Current Operating System: Linux moment-4 5.6.0-2-amd64 #1 SMP Debian 5.6.14-1 (2020-05-23) x86_64
[ 13.966] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.6.0-2-amd64 root=UUID=d01cf972-f73a-4a56-9245-da6e54adc320 ro quiet
[ 13.966] Build Date: 31 March 2020 10:14:40AM
[ 13.966] xorg-server 2:1.20.8-2 ( https://www.debian.org/support)  
[ 13.966] Current version of pixman: 0.36.0
[ 13.966] Before reporting problems, check  http://wiki.x.org 
to make sure that you have the latest version.
[ 13.966] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 13.966] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun 20 21:10:56 2020
[ 13.966] (==) Using config file: "/etc/X11/xorg.conf"
[ 13.966] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 13.966] (==) ServerLayout "Layout0"
[ 13.966] (**) |-->Screen "screen_nvidia" (0)
[ 13.966] (**) | |-->Monitor "<default monitor>"
[ 13.967] (**) | |-->Device "eGPU_nvidia"
[ 13.967] (**) | |-->GPUDevice "iGPU_intel"
[ 13.967] (==) No monitor specified for screen "screen_nvidia".
Using a default monitor configuration.
[ 13.967] (**) |-->Inactive Device "iGPU_intel"
[ 13.967] (==) Automatically adding devices
[ 13.967] (==) Automatically enabling devices
[ 13.967] (==) Automatically adding GPU devices
[ 13.967] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 13.967] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 13.967] Entry deleted from font path.
[ 13.967] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 13.967] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 13.967] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 13.967] (II) Loader magic: 0x563585bcbe20
[ 13.967] (II) Module ABI versions:
[ 13.967] X.Org ANSI C Emulation: 0.4
[ 13.967] X.Org Video Driver: 24.1
[ 13.967] X.Org XInput driver : 24.1
[ 13.967] X.Org Server Extension : 10.0
[ 13.968] (++) using VT number 7

[ 13.968] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 13.969] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 13.980] (--) PCI:*([email protected]:2:0) 8086:3ea0:1558:1323 rev 0, Mem @ 0x6022000000/16777216, 0x4000000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[ 13.980] (II) LoadModule: "glx"
[ 13.980] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 13.981] (II) Module glx: vendor="X.Org Foundation"
[ 13.981] compiled for 1.20.8, module version = 1.0.0
[ 13.981] ABI class: X.Org Server Extension, version 10.0
[ 13.981] (II) LoadModule: "nvidia"
[ 13.981] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 13.981] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 13.981] compiled for 1.6.99.901, module version = 1.0.0
[ 13.981] Module class: X.Org Video Driver
[ 13.981] (II) LoadModule: "modesetting"
[ 13.982] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 13.982] (II) Module modesetting: vendor="X.Org Foundation"
[ 13.982] compiled for 1.20.8, module version = 1.20.8
[ 13.982] Module class: X.Org Video Driver
[ 13.982] ABI class: X.Org Video Driver, version 24.1
[ 13.982] (II) NVIDIA dlloader X Driver 440.82 Wed Apr 1 19:50:17 UTC 2020
[ 13.982] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 13.982] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 14.010] (II) modeset(G0): using drv /dev/dri/card0
[ 14.010] (WW) Falling back to old probe method for modesetting
[ 14.027] (EE) No devices detected.
[ 14.027] (EE) 
Fatal server error:
[ 14.027] (EE) no screens found(EE) 
[ 14.027] (EE) 
Please consult the The X.Org Foundation support 
at  http://wiki.x.org 
for help. 
[ 14.027] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 14.027] (EE) 
[ 14.105] (EE) Server terminated with error (1). Closing log file.
# cat /etc/X11/xorg.conf


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "screen_nvidia" 0 0
    Inactive       "iGPU_intel"
EndSection

Section "Files"
EndSection

Section "Device"
    Identifier     "eGPU_nvidia"
    Driver         "nvidia"
    BusID          "PCI:6:0:0"
    Option         "AllowExternalGpus" "true"
    Option         "AllowEmptyInitialConfiguration" "true"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "screen_nvidia"
    Device         "eGPU_nvidia"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Device"
    Identifier     "iGPU_intel"
    Driver         "modesetting"
    BusID          "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier     "screen_laptop"
    Device         "iGPU_intel"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
nu_ninja
(@nu_ninja)
Reputable Member
Joined: 2 years ago
 

Without the egpu you shouldn't need any xorg configuration file I don't think. You can use the egpu switcher script to switch between the working egpu xorg.conf you have now and internal which should be nothing or just an empty file. Or you could also create your own way of switching if you like.

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1

 
2012 13" MacBook Pro [3rd,2C,M] + RX 460 @ 10Gbps-TB1 (AKiTiO Thunder2) + macOS 10.14.4 [build link]  


ReplyQuote
Kurt Sys
(@kurt_sys)
Active Member
Joined: 4 months ago
 

Right. It seems to work right now. I switch now, without reboot, by one of these, they all do the same, I think:

  • `sudo pkill X`
  • `sudo systemctl restart display-manager`
  • alt + PrintScreen + k

I was about to make two entries in my grub, with different parameters and a systemd script reading these, but it seems egpu-switcher is doing something like this without the boot parameters. It automatically detects if there's an egpu or not. Nice... 

Thanks a lot... I'm fine for now.

This post was modified 3 months ago

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

nu_ninja liked
ReplyQuote