Optimus-manager vs bumblebee

yes you are running the 6.0, so switch to the older 5.19 one, and try with it…

I don’t see the optimus-manager in the system tray at all after rebooting to the 5.19 kernel

[demo@manjaro Downloads]$ uname -a
Linux manjaro 5.19.17-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon Oct 24 16:49:53 UTC 2022 x86_64 GNU/Linux
[demo@manjaro Downloads]$ optimus-manager --switch nvidia
Traceback (most recent call last):
  File "/usr/bin/optimus-manager", line 33, in <module>
    sys.exit(load_entry_point('optimus-manager==1.4', 'console_scripts', 'optimus-manager')())
  File "/usr/bin/optimus-manager", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/optimus_manager/client/__init__.py", line 8, in <module>
    from .. import checks
  File "/usr/lib/python3.10/site-packages/optimus_manager/checks.py", line 5, in <module>
    import dbus
ModuleNotFoundError: No module named 'dbus'

so its probably related to you being on unstable… but i dont really know, whats the issue …
do you plan to switch regularly your gpus? like several times a day?

No I don’t plan on switching.
Just would like to use the Nvida driver as my everyday driver.
To my knowledge and I could be wrong.
Wouldn’t the nvidia driver be better for my system from a performance and system functioning perspective?
And to run graphic intensive packages better?

so if you plan to switch to only one gpu, we can install something else… but first, post output from:
grep ibt /etc/default/grub

[demo@manjaro Downloads]$ grep ibt /etc/default/grub
[demo@manjaro Downloads]$ 

How about installing this dependency?

pamac install dbus-python

so just to be sure, add this kernel parameter:
open this file:
kate /etc/default/grub
and inside this line: GRUB_CMDLINE_LINUX_DEFAULT inside the quotes add this parameter:
ibt=off
dont remove anything, just add it to existing parameters, save the file, update grub:
sudo update-grub


uninstall optimus:
pamac remove optimus-manager optimus-manager-plasma
reboot, and switch back to the 6.0 kernel if you wish


then provide output from:
find /etc/X11/ -name "*.conf"
to check that there are no optimus leftovers

he have it already installed

added the line to grub.
Updated grub
Rebooted

GRUB_CMDLINE_LINUX_DEFAULT="quiet pci=nocrs acpi=force acpi_osi='Windows 2022' ibt=off"

[demo@manjaro Downloads]$ find /etc/X11/ -name "*.conf"
/etc/X11/mhwd.d/nvidia.conf
/etc/X11/xorg.conf.d/30-touchpad.conf
/etc/X11/xorg.conf.d/00-keyboard.conf

ok, so no leftovers, so install this, thats what im using:
pamac build envycontrol
when its done, run this:
sudo envycontrol -s nvidia
and reboot, and finger crossed, that you dont end up with a blackscreen… :sunglasses:

Didn’t get far

[demo@manjaro Downloads]$ pamac build envycontrol
Preparing...
Cloning envycontrol build files...
Generating envycontrol information...
Checking envycontrol dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (1):
  envycontrol  2.1.1-1    AUR


Edit build files : [e] 
Apply transaction ? [e/y/N] y


Building envycontrol...
==> Making package: envycontrol 2.1.1-1 (Sun 30 Oct 2022 11:12:16 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating envycontrol git repo...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), 4.29 KiB | 877.00 KiB/s, done.
From https://github.com/geminis3/envycontrol
 + 5b3bd75...f49b997 refs/pull/25/merge -> refs/pull/25/merge  (forced update)
 + 0456bda...9e5bd76 refs/pull/47/merge -> refs/pull/47/merge  (forced update)
 + 2bc749c...f63ad32 refs/pull/63/merge -> refs/pull/63/merge  (forced update)
==> Validating source files with sha256sums...
    envycontrol ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of envycontrol git repo...
Cloning into 'envycontrol'...
done.
Switched to a new branch 'makepkg'
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "/var/tmp/pamac-build-demo/envycontrol/src/envycontrol/setup.py", line 2, in <module>
    from setuptools import setup
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 16, in <module>
    import setuptools.version
  File "/usr/lib/python3.10/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 74, in <module>
    from jaraco.text import (
  File "/usr/lib/python3.10/site-packages/jaraco/text/__init__.py", line 11, in <module>
    from jaraco.functools import compose, method_cache
ModuleNotFoundError: No module named 'jaraco.functools'
==> ERROR: A failure occurred in package().
    Aborting...

so either there is something wrong with your system;
or its because you are on unstable branch (more likely this is the reason);
do you have this installed:
pacman -Qs jaraco.functools
if yes, try reinstalling it:
sudo pacman -S python-jaraco.functools
and are there any errors when reinstalling?

It seems you may have mixed local and system Python packages. What’s the output of:

which python

Also see: [root tip] [How To] Avoid common pitfalls as developer

Looks like I have other issues.
Is there a way to maybe clean things up without reinstalling the whole system:

[demo@manjaro Downloads]$ pacman -Qs jaraco.functools
local/python-jaraco.functools 3.5.2-1
    Functools like those found in stdlib
[demo@manjaro Downloads]$ sudo pacman -S python-jaraco.functools
[sudo] password for demo: 
warning: python-jaraco.functools-3.5.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) python-jaraco.functools-3.5.2-1

Total Download Size:   0.01 MiB
Total Installed Size:  0.05 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 python-jaraco.functools-3.5.2-1-any          12.9 KiB  33.9 KiB/s 00:00 [#########################################] 100%
(1/1) checking keys in keyring                                           [#########################################] 100%
(1/1) checking package integrity                                         [#########################################] 100%
(1/1) loading package files                                              [#########################################] 100%
(1/1) checking for file conflicts                                        [#########################################] 100%
(1/1) checking available disk space                                      [#########################################] 100%
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/LICENSE
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/METADATA
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/RECORD
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/WHEEL
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.functools-3.5.2.dist-info/top_level.txt
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/__pycache__/
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/__pycache__/functools.cpython-310.opt-1.pyc
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/__pycache__/functools.cpython-310.pyc
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/functools.py
:: Processing package changes...
(1/1) reinstalling python-jaraco.functools                               [#########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...

[demo@manjaro Downloads]$ which python
/usr/bin/python

well you have these, so your system is messed up…


rerun the reinstall again:
sudo pacman -S python-jaraco.functools
are there again errors?

Must be something else:

[demo@manjaro Downloads]$ sudo pacman -S python-jaraco.functools
[sudo] password for demo: 
warning: python-jaraco.functools-3.5.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) python-jaraco.functools-3.5.2-1

Total Installed Size:  0.05 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                           [#########################################] 100%
(1/1) checking package integrity                                         [#########################################] 100%
(1/1) loading package files                                              [#########################################] 100%
(1/1) checking for file conflicts                                        [#########################################] 100%
(1/1) checking available disk space                                      [#########################################] 100%
:: Processing package changes...
(1/1) reinstalling python-jaraco.functools                               [#########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...
[demo@manjaro Downloads]$ pamac build envycontrol
Preparing...
Cloning envycontrol build files...
Generating envycontrol information...
Checking envycontrol dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (1):
  envycontrol  2.1.1-1    AUR


Edit build files : [e] 
Apply transaction ? [e/y/N] y


Building envycontrol...
==> Making package: envycontrol 2.1.1-1 (Sun 30 Oct 2022 11:30:29 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating envycontrol git repo...
==> Validating source files with sha256sums...
    envycontrol ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of envycontrol git repo...
Cloning into 'envycontrol'...
done.
Switched to a new branch 'makepkg'
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "/var/tmp/pamac-build-demo/envycontrol/src/envycontrol/setup.py", line 2, in <module>
    from setuptools import setup
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 16, in <module>
    import setuptools.version
  File "/usr/lib/python3.10/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 74, in <module>
    from jaraco.text import (
  File "/usr/lib/python3.10/site-packages/jaraco/text/__init__.py", line 12, in <module>
    from jaraco.context import ExceptionTrap
ModuleNotFoundError: No module named 'jaraco.context'
==> ERROR: A failure occurred in package().
    Aborting...

now its jaraco.context…
so reinstall it:
sudo pacman -S python-jaraco.context

Do you think we are getting closer to the issue?

[demo@manjaro Downloads]$ sudo pacman -S python-jaraco.context
[sudo] password for demo: 
warning: python-jaraco.context-4.1.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) python-jaraco.context-4.1.2-1

Total Download Size:   0.01 MiB
Total Installed Size:  0.02 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 python-jaraco.context-4.1.2-1-any             9.2 KiB  22.5 KiB/s 00:00 [#########################################] 100%
(1/1) checking keys in keyring                                           [#########################################] 100%
(1/1) checking package integrity                                         [#########################################] 100%
(1/1) loading package files                                              [#########################################] 100%
(1/1) checking for file conflicts                                        [#########################################] 100%
(1/1) checking available disk space                                      [#########################################] 100%
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/LICENSE
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/METADATA
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/RECORD
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/WHEEL
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco.context-4.1.2.dist-info/top_level.txt
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/__pycache__/context.cpython-310.opt-1.pyc
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/__pycache__/context.cpython-310.pyc
warning: could not get file information for usr/lib/python3.10/site-packages/jaraco/context.py
:: Processing package changes...
(1/1) reinstalling python-jaraco.context                                 [#########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...