Installing bumblebee freezes computer after reboot

Hello!

I am attempting to get the displayport (thunderbolt) port to output a signal to my external monitor. From my 13" macbook pro with only integrated Intel graphics this works fine.
From my main 15" macbook pro with Nvidia/Intel setup I am not getting any signal output to the external monitor. So I am guessing it is a driver issue.

I want to try to use the recommended bumblebee driver to hopefully remedy the displayport issue but when I try to install it it just freezes my computer after restart. What can I do to fix this? I have been trying the same install on Xfce, Gnome and Kde with the same result.

System info:

System:
  Kernel: 5.15.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=5b00aa74-4572-4c1b-883d-63755cb04e4e rw quiet
    cryptdevice=UUID=7c5bb4e0-2f2e-42aa-966f-96aefda76d1b:luks-7c5bb4e0-2f2e-42aa-966f-96aefda76d1b
    root=/dev/mapper/luks-7c5bb4e0-2f2e-42aa-966f-96aefda76d1b splash
    apparmor=1 security=apparmor
    resume=/dev/mapper/luks-e47fa923-04f4-4257-9db4-b14b68389573
    udev.log_priority=3
  Desktop: GNOME 41.3 tk: GTK 3.24.31 wm: gnome-shell dm: GDM 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Apple product: MacBookPro9,1 v: 1.0
    serial: <superuser required> Chassis: type: 10 v: Mac-4B7AC7E43945597E
    serial: <superuser required>
  Mobo: Apple model: Mac-4B7AC7E43945597E v: MacBookPro9,1
    serial: <superuser required> UEFI: Apple v: MBP91.88Z.00DA.B00.1804091930
    date: 04/09/2018
Battery:
  ID-1: BAT0 charge: 41.0 Wh (80.4%) condition: 51.0/75.2 Wh (67.8%)
    volts: 12.3 min: 10.9 model: SMP bq20z451 type: Li-ion serial: N/A
    status: Charging cycles: 770
Memory:
  RAM: total: 7.7 GiB used: 1.24 GiB (16.1%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-3820QM bits: 64 type: MT MCP arch: Ivy Bridge
    family: 6 model-id: 0x3A (58) stepping: 9 microcode: 0x21
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 1512 high: 2815 min/max: 1200/3700 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1197 2: 1197 3: 1213
    4: 1287 5: 1313 6: 1877 7: 2815 8: 1197 bogomips: 43112
  Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov
    constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts ept erms
    est f16c flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs ida lahf_lm
    lm mca mce md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe
    pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts rdrand
    rdtscp rep_good sep smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp
    syscall tm tm2 tpr_shadow tsc tsc_deadline_timer vme vmx vnmi vpid x2apic
    xsave xsaveopt xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds status: Vulnerable: No microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Apple driver: i915
    v: kernel bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: NVIDIA GK107M [GeForce GT 650M Mac Edition] vendor: Apple
    driver: nouveau v: kernel bus-ID: 01:00.0 chip-ID: 10de:0fd5 class-ID: 0300
  Device-3: Apple FaceTime HD Camera type: USB driver: uvcvideo
    bus-ID: 1-1.1:3 chip-ID: 05ac:8509 class-ID: 0e02 serial: <filter>
  Display: wayland server: X.Org 1.21.1.4 compositor: gnome-shell driver:
    loaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3360x1050 s-dpi: 96 s-size: 889x277mm (35.0x10.9")
    s-diag: 931mm (36.7")
  Monitor-1: XWAYLAND0 res: 1680x1050 hz: 60 dpi: 129
    size: 330x210mm (13.0x8.3") diag: 391mm (15.4")
  Monitor-2: XWAYLAND1 res: 1680x1050 hz: 60 dpi: 129
    size: 330x210mm (13.0x8.3") diag: 391mm (15.4")
  OpenGL: renderer: NVE7 v: 4.3 Mesa 21.3.4 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
    class-ID: 0403
  Device-2: NVIDIA GK107 HDMI Audio vendor: Apple driver: snd_hda_intel
    v: kernel bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403
  Sound Server-1: ALSA v: k5.15.16-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.43 running: no
Network:
  Device-1: Broadcom NetXtreme BCM57765 Gigabit Ethernet PCIe driver: tg3
    v: kernel port: N/A bus-ID: 02:00.0 chip-ID: 14e4:16b4 class-ID: 0200
  IF: enp2s0f0 state: down mac: <filter>
  Device-2: Broadcom BCM4331 802.11a/b/g/n driver: bcma-pci-bridge v: N/A
    modules: bcma bus-ID: 03:00.0 chip-ID: 14e4:4331 class-ID: 0280
  IF-ID-1: wlp3s0b1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Apple Bluetooth USB Host Controller type: USB driver: btusb v: 0.8
    bus-ID: 2-1.8.1.3:9 chip-ID: 05ac:821d class-ID: fe01
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
  Device-1: luks-7c5bb4e0-2f2e-42aa-966f-96aefda76d1b maj-min: 254:0
    type: LUKS dm: dm-0 size: 438.03 GiB
  Components:
  p-1: sdb2 maj-min: 8:18 size: 438.03 GiB
  Device-2: luks-e47fa923-04f4-4257-9db4-b14b68389573 maj-min: 254:1
    type: LUKS dm: dm-1 size: 8.8 GiB
  Components:
  p-1: sdb3 maj-min: 8:19 size: 8.8 GiB
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 913.05 GiB used: 10.14 GiB (1.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Apple model: SSD SM512E
    size: 465.92 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 7A1Q scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: KingMAX model: SSD 480GB
    size: 447.13 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 4E scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 438.03 GiB size: 430.09 GiB (98.19%)
    used: 10.14 GiB (2.4%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-7c5bb4e0-2f2e-42aa-966f-96aefda76d1b label: N/A
    uuid: 5b00aa74-4572-4c1b-883d-63755cb04e4e
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 440 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 label: NO_LABEL
    uuid: 6C2C-865F
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-e47fa923-04f4-4257-9db4-b14b68389573 label: swap
    uuid: 646939f1-17cc-41e0-879e-cba469de2215
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 200 MiB fs: vfat label: EFI
    uuid: 67E3-17ED
  ID-2: /dev/sda2 maj-min: 8:2 size: 464.51 GiB fs: hfsplus label: OSX
    uuid: f7570295-fb9f-385e-8298-72ac36b8ab8d
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 1-1.1:3 info: Apple FaceTime HD Camera type: Video
    driver: uvcvideo interfaces: 3 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 05ac:8509 class-ID: 0e02 serial: <filter>
  Hub-3: 2-0:1 info: Full speed or root hub ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Hub-5: 2-1.8:3 info: Microchip (formerly SMSC) 2.0 Hub ports: 3 rev: 2.0
    speed: 480 Mb/s power: 2mA chip-ID: 0424:2513 class-ID: 0900
  Hub-6: 2-1.8.1:4
    info: Broadcom BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth) ports: 3
    rev: 2.0 speed: 12 Mb/s power: 94mA chip-ID: 0a5c:4500 class-ID: 0900
  Device-1: 2-1.8.1.3:9 info: Apple Bluetooth USB Host Controller
    type: Bluetooth driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s
    chip-ID: 05ac:821d class-ID: fe01
  Device-2: 2-1.8.2:5 info: Apple Built-in IR Receiver type: HID
    driver: appleir,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s power: 100mA
    chip-ID: 05ac:8242 class-ID: 0300
  Device-3: 2-1.8.3:6 info: Apple Internal Keyboard/Trackpad (ISO)
    type: Keyboard,HID,Mouse driver: apple,bcm5974,usbhid interfaces: 3 rev: 2.0
    speed: 12 Mb/s power: 40mA chip-ID: 05ac:0253 class-ID: 0301
  Hub-7: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-8: 4-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 69.0 C mobo: N/A gpu: nouveau temp: 58.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 294 Uptime: 0m wakeups: 2 Init: systemd v: 250 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1154 lib: 306
  flatpak: 0 Shell: Zsh v: 5.8 running-in: gnome-terminal inxi: 3.3.12

Driver info

--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:01.0/0000:01:00.0 (0300:10de:0fd5)
  Display controller nVidia Corporation GK107M [GeForce GT 650M Mac Edition]
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 



  > AVAILABLE:

   NAME:	video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:	PCI
   VERSION:	2021.12.18
   INFO:	Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	6
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-nvidia-390xx
   ATTACHED:	PCI
   VERSION:	2021.12.18
   INFO:	Closed source NVIDIA drivers for linux.
   PRIORITY:	3
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 
   VENDORIDS:	10de 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 

   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X .org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 

   NAME:	video-vesa
   ATTACHED:	PCI
   VERSION:	2017.03.12
   INFO:	X .org vesa video driver.
   PRIORITY:	0
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 


--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:02.0 (0300:8086:0166)
  Display controller Intel Corporation 3rd Gen Core processor Graphics Controller
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 



  > AVAILABLE:

   NAME:	video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:	PCI
   VERSION:	2021.12.18
   INFO:	Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	6
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 

   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X. org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 

   NAME:	video-vesa
   ATTACHED:	PCI
   VERSION:	2017.03.12
   INFO:	X .org vesa video driver.
   PRIORITY:	0
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 


Warning: no configs for USB devices found!

Bumblebee install info

> Installing video-hybrid-intel-nvidia-390xx-bumblebee...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/graphic_drivers/hybrid-intel-nvidia-390xx-bumblebee/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 community downloading...
 multilib downloading...
warning: xf86-video-intel-1:2.99.917+916+g31486f40-2 is up to date -- skipping
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: primus will be installed before its bumblebee dependency

Packages (12) egl-wayland-2:1.1.9+r3+g582b2d3-1  eglexternalplatform-1.1-2  primus-20151110-9  bumblebee-3.2.1-22  lib32-nvidia-390xx-utils-390.147-2  lib32-primus-20151110-4  libxnvctrl-390xx-390.147-1  linux510-bbswitch-0.8-109  linux510-nvidia-390xx-390.147-7  linux515-bbswitch-0.8-23  linux515-nvidia-390xx-390.147-7  nvidia-390xx-utils-390.147-3

Total Download Size:   104.94 MiB
Total Installed Size:  241.26 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
Y
 nvidia-390xx-utils-390.147-3-x86_64 downloading...
 lib32-nvidia-390xx-utils-390.147-2-x86_64 downloading...
 linux515-nvidia-390xx-390.147-7-x86_64 downloading...
 linux510-nvidia-390xx-390.147-7-x86_64 downloading...
 linux515-bbswitch-0.8-23-x86_64 downloading...
 linux510-bbswitch-0.8-109-x86_64 downloading...
 libxnvctrl-390xx-390.147-1-x86_64 downloading...
 primus-20151110-9-x86_64 downloading...
 lib32-primus-20151110-4-x86_64 downloading...
 bumblebee-3.2.1-22-x86_64 downloading...
 egl-wayland-2:1.1.9+r3+g582b2d3-1-x86_64 downloading...
 eglexternalplatform-1.1-2-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing primus...
installing eglexternalplatform...
installing egl-wayland...
installing libxnvctrl-390xx...
installing nvidia-390xx-utils...
==> If you run into trouble with CUDA not being available, run nvidia-modprobe first.
Optional dependencies for nvidia-390xx-utils
    xorg-server-devel: nvidia-xconfig
    opencl-nvidia-390xx: OpenCL support
installing bumblebee...
Don't forget to add yourself to the 'bumblebee' group to use Bumblebee
Optional dependencies for bumblebee
    xf86-video-nouveau: nouveau driver [installed]
    nouveau-dri: 3D acceleration features fo nouveau
    bbswitch: switch on/off discrete card [pending]
    nvidia: NVIDIA kernel driver [pending]
    virtualgl: alternative back-end for optirun
    lib32-virtualgl: run 32bit applications with optirun
    lib32-primus: faster back-end for optirun [pending]
installing lib32-nvidia-390xx-utils...
Optional dependencies for lib32-nvidia-390xx-utils
    lib32-opencl-nvidia
installing lib32-primus...
installing linux510-nvidia-390xx...
In order to use nvidia module, reboot the system.
installing linux510-bbswitch...
installing linux515-nvidia-390xx...
In order to use nvidia module, reboot the system.
installing linux515-bbswitch...
:: Running post-transaction hooks...
(1/7) Creating system user accounts...
Creating group 'bumblebee' with GID 56.
Creating group 'nvidia-persistenced' with GID 143.
Creating user 'nvidia-persistenced' (NVIDIA Persistence Daemon) with UID 143 and GID 143.
(2/7) Reloading system manager configuration...
(3/7) Reloading device manager configuration...
(4/7) Arming ConditionNeedsUpdate...
(5/7) Updating module dependencies...
(6/7) Refreshing PackageKit...
(7/7) Updating the desktop file MIME type cache...
bumblebee: install reason has been set to 'explicitly installed'
nvidia-390xx-utils: install reason has been set to 'explicitly installed'
libxnvctrl-390xx: install reason has been set to 'explicitly installed'
xf86-video-intel: install reason has been set to 'explicitly installed'
lib32-primus: install reason has been set to 'explicitly installed'
lib32-nvidia-390xx-utils: install reason has been set to 'explicitly installed'
linux510-nvidia-390xx: install reason has been set to 'explicitly installed'
linux510-bbswitch: install reason has been set to 'explicitly installed'
linux515-nvidia-390xx: install reason has been set to 'explicitly installed'
linux515-bbswitch: install reason has been set to 'explicitly installed'
modprobe: ERROR: could not insert 'bbswitch': No such device
xorg configuration file: '/etc/X11/mhwd.d/intel.conf'
Created symlink /etc/systemd/system/multi-user.target.wants/bumblebeed.service → /usr/lib/systemd/system/bumblebeed.service.
> Successfully installed video-hybrid-intel-nvidia-390xx-bumblebee

Hello,

bbswitch does not work with the PCI-E port power management method since kernel 4.8
You might have to use acpi_call
More here Hybrid graphics - ArchWiki

Thank you for this idea. I am trying to use the acpi_call as described in the wiki.
However, as a linux beginner in general and an arch newbie in particular I am unable to install the required package.

https://archlinux.org/packages/community/x86_64/acpi_call/

I tried looking for it in the AUR repositories first but could not match any package with the exact name and version number. Then I tried downloading from mirror and just doubleclick the file. It prompted me to enter password and it seems it should have worked but when I run the command described in the article:

    ~  # modprobe acpi_call                                                                           ✔ 

zsh: bad pattern: #

It did not work. Either there is some dependencies missing or the installation did not happen in the first place. What is the proper way to install this package from the terminal?