Optimus-manager vs bumblebee

so its in hybrid mode…
run it again:
sudo envycontrol -s nvidia
do you have the same error?

[demo@manjaro Downloads]$ sudo envycontrol -s nvidia
[sudo] password for demo: 
Error: switching directly from integrated to Nvidia mode is not supported
Try switching to hybrid mode first!

so i have no idea whats wrong with it… im using envycontrol and have no issues…
so uninstall it:
pamac remove envycontrol
reboot and post output from:
find /etc/X11/ -name "*.conf"
to check for leftovers

[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

output from:
cat /etc/X11/mhwd.d/nvidia.conf

[demo@manjaro Downloads]$ cat /etc/X11/mhwd.d/nvidia.conf
##
## Generated by mhwd - Manjaro Hardware Detection
##
 
 

looks ok, so you are running on kde?

yes sorry I didn’t say that earlier.
Here:

[demo@manjaro Downloads]$ inxi -Faaz
System:
  Kernel: 6.0.6-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.0-x86_64
    root=UUID=45ca132d-4a37-4dc3-afa0-be2e80d6a4a2 rw quiet pci=nocrs
    acpi=force "acpi_osi=Windows 2022" ibt=off
  Desktop: KDE Plasma v: 5.26.2 tk: Qt v: 5.15.6 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Convertible System: HP product: HP Spectre x360 Convertible 15-df1xxx
    v: N/A serial: <superuser required> Chassis: type: 31
    serial: <superuser required>
  Mobo: HP model: 863F v: 54.24 serial: <superuser required> UEFI: AMI
    v: F.28 date: 07/14/2022
Battery:
  ID-1: BAT0 charge: 69.3 Wh (100.0%) condition: 69.3/69.3 Wh (100.0%)
    volts: 13.0 min: 11.6 model: HP Primary type: Li-ion serial: <filter>
    status: full cycles: 178
  Device-1: hid-0018:04F3:2992.0003-battery model: ELAN2514:00 04F3:2992
    serial: N/A charge: N/A status: N/A
CPU:
  Info: model: Intel Core i7-10510U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check gen: core 10 level: v3 note: check
    built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xF0
  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: 2883 high: 3311 min/max: 400/4900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 3300 2: 2300 3: 3297
    4: 3303 5: 958 6: 3298 7: 3311 8: 3300 bogomips: 36812
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: eDP-1 empty: DP-1,DP-2 bus-ID: 00:02.0 chip-ID: 8086:9b41
    class-ID: 0300
  Device-2: NVIDIA GP108M [GeForce MX250] vendor: Hewlett-Packard
    driver: nvidia v: 520.56.06 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-10) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 4
    link-max: gen: 3 speed: 8 GT/s bus-ID: 3b:00.0 chip-ID: 10de:1d13
    class-ID: 0302
  Device-3: Chicony HP Wide Vision FHD Camera type: USB driver: uvcvideo
    bus-ID: 1-5:3 chip-ID: 04f2:b67b class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa dri: iris gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x571mm (40.00x22.48")
    s-diag: 1165mm (45.88")
  Monitor-1: eDP-1 model: AU Optronics 0x30eb built: 2017 res: 3840x2160
    hz: 60 dpi: 284 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 3840x2160
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.2.1
    direct render: Yes
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-cnl
    alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0401
  Sound API: ALSA v: k6.0.6-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.59 running: yes
Network:
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
Drives:
  Local Storage: total: 931.51 GiB used: 258.21 GiB (27.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO Plus
    1TB size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B2QEXM7
    temp: 39.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 239 GiB size: 234.94 GiB (98.30%) used: 44.63 GiB (19.0%)
    fs: ext4 dev: /dev/nvme0n1p8 maj-min: 259:8
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 68.8 MiB
    (71.6%) fs: vfat dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-3: /home raw-size: 415.57 GiB size: 407.98 GiB (98.17%) used: 213.51
    GiB (52.3%) fs: ext4 dev: /dev/nvme0n1p7 maj-min: 259:7
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 48.0 C pch: 47.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 236 Uptime: 12m wakeups: 161 Memory: 15.26 GiB used: 3.88 GiB
  (25.4%) Init: systemd v: 251 default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: 1705 pm: pacman pkgs: 1699
  libs: 487 tools: pamac,pikaur,yay pm: flatpak pkgs: 6 pm: snap pkgs: 0
  Shell: Bash v: 5.1.16 running-in: konsole inxi: 3.3.22

thats ok, just wanted to be sure, so post output from:
cat /etc/sddm.conf

[demo@manjaro Downloads]$ cat /etc/sddm.conf 
[General]
InputMethod=
Numlock=none

[Theme]
CursorTheme=breeze_cursors
DisableAvatarsThreshold=7
EnableAvatars=true
FacesDir=/usr/share/sddm/faces
ThemeDir=/usr/share/sddm/themes

[Users]
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
HideShells=
HideUsers=
RememberLastSession=true
RememberLastUser=true
ReuseSession=false

[Wayland]
EnableHiDPI=false
SessionCommand=/usr/share/sddm/scripts/wayland-session
SessionDir=/usr/share/wayland-sessions
SessionLogFile=.local/share/sddm/wayland-session.log

[X11]
#DisplayCommand=/usr/share/sddm/scripts/Xsetup
#DisplayStopCommand=/usr/share/sddm/scripts/Xstop
EnableHiDPI=false
MinimumVT=1
ServerArguments=-nolisten tcp
ServerPath=/usr/bin/X
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/share/xsessions
SessionLogFile=.local/share/sddm/xorg-session.log
UserAuthFile=.Xauthority
XauthPath=/usr/bin/xauth
XephyrPath=/usr/bin/Xephyr

so lets try again with optimus:
pamac install optimus-manager optimus-manager-plasma
reboot
switch to nvidia via optimus tray icon, and check if it worked with:
nvidia-smi

I think we have success:

demo@manjaro Downloads]$ nvidia-smi
Sun Oct 30 15:04:13 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.56.06    Driver Version: 520.56.06    CUDA Version: 11.8     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:3B:00.0 Off |                  N/A |
| N/A   46C    P0    N/A /  N/A |   1115MiB /  2048MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2021      G   /usr/lib/Xorg                     413MiB |
|    0   N/A  N/A      2073      G   /usr/bin/kwalletd5                  1MiB |
|    0   N/A  N/A      2129      G   /usr/bin/ksmserver                  1MiB |
|    0   N/A  N/A      2131      G   /usr/bin/kded5                      1MiB |
|    0   N/A  N/A      2132      G   /usr/bin/kwin_x11                 320MiB |
|    0   N/A  N/A      2167      G   /usr/bin/plasmashell              113MiB |
|    0   N/A  N/A      2194      G   ...de-authentication-agent-1        1MiB |
|    0   N/A  N/A      2197      G   ...ib/xdg-desktop-portal-kde        1MiB |
|    0   N/A  N/A      2273      G   /usr/lib/kdeconnectd                1MiB |
|    0   N/A  N/A      2274      G   /usr/bin/latte-dock                20MiB |
|    0   N/A  N/A      2296      G   /usr/bin/kaccess                    1MiB |
|    0   N/A  N/A      2313      G   /usr/lib/DiscoverNotifier           1MiB |
|    0   N/A  N/A      2316      G   /usr/bin/pamac-tray-plasma          1MiB |
|    0   N/A  N/A      2460      G   /usr/lib/kf5/kioslave5              1MiB |
|    0   N/A  N/A      2476      G   /usr/bin/konsole                    1MiB |
|    0   N/A  N/A      2479      G   /usr/lib/firefox/firefox          219MiB |
|    0   N/A  N/A      2493      G   /usr/bin/dolphin                    1MiB |
|    0   N/A  N/A      2538      G   /usr/bin/optimus-manager-qt         1MiB |
|    0   N/A  N/A      2643      G   /usr/lib/kf5/kioslave5              1MiB |
+-----------------------------------------------------------------------------+

it looks like it…
so do you want to make it permanent? so that you dont switch to nvidia every time you boot your pc…
open optimus settings via the tray, and locate the startup mode and switch it to nvidia, click ok;
then reboot, and see if you can boot normally with nvidia…
if you booted, check again with:
nvidia-smi

Ok made it permanent. Rebooted.

[demo@manjaro Downloads]$ nvidia-smi
Sun Oct 30 15:10:41 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.56.06    Driver Version: 520.56.06    CUDA Version: 11.8     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:3B:00.0 Off |                  N/A |
| N/A   51C    P0    N/A /  N/A |   1131MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       677      G   /usr/lib/Xorg                     437MiB |
|    0   N/A  N/A       762      G   /usr/bin/kwalletd5                  1MiB |
|    0   N/A  N/A       856      G   /usr/bin/ksmserver                  1MiB |
|    0   N/A  N/A       858      G   /usr/bin/kded5                      1MiB |
|    0   N/A  N/A       859      G   /usr/bin/kwin_x11                 321MiB |
|    0   N/A  N/A       893      G   /usr/bin/plasmashell              112MiB |
|    0   N/A  N/A       922      G   ...de-authentication-agent-1        1MiB |
|    0   N/A  N/A       924      G   ...ib/xdg-desktop-portal-kde        1MiB |
|    0   N/A  N/A      1013      G   /usr/lib/kdeconnectd                1MiB |
|    0   N/A  N/A      1015      G   /usr/bin/latte-dock                23MiB |
|    0   N/A  N/A      1030      G   /usr/bin/kaccess                    1MiB |
|    0   N/A  N/A      1032      G   /usr/lib/DiscoverNotifier           1MiB |
|    0   N/A  N/A      1044      G   /usr/bin/pamac-tray-plasma          1MiB |
|    0   N/A  N/A      1190      G   /usr/lib/kf5/kioslave5              1MiB |
|    0   N/A  N/A      1203      G   /usr/bin/konsole                    1MiB |
|    0   N/A  N/A      1206      G   /usr/lib/firefox/firefox          209MiB |
|    0   N/A  N/A      1220      G   /usr/bin/dolphin                    1MiB |
|    0   N/A  N/A      1260      G   /usr/bin/optimus-manager-qt         1MiB |
|    0   N/A  N/A      1350      G   /usr/lib/kf5/kioslave5              1MiB |
+-----------------------------------------------------------------------------+

So to summarize all of this.
I had multiple python issues which we think I might still have some.
After fixing those issues optimus was able to be installed and set and worked.

Sorry for all of that and I appreciate you sticking with me on this.
I am going to go back and look through all the steps we went through and see if there is anything else I want to check.

thats basically the summary…
and you are correct that more packages may be affected …


also you are running:
latte-dock
which is no longer supported, so it can cause issues down the road…
also you are having:
DiscoverNotifier
which is probably from the discover … why do you use discover… you have pamac and pacman for packages…

On latte-dock .
It was the preferred dock when I installed KDE.
I am using the latte-dock AUR package as it fixes some of the issues it has.

On Discover.
I have it and use it to reference items that need updated.
I believe it updates kde.org themes and such that pacman doesn’t update.
That is all I use it for.

ok, i see…
post also output from:
pamac list -qm

[demo@manjaro Downloads]$ pamac list -qm
anydesk-bin
asix-ax88179-dkms
aurutils
deadbeef
dunstify
electron12
etcher
hardinfo-gtk3
joplin-appimage
kde-servicemenus-rootactions
latte-dock-git
lightly-qt
manjaro-documentation-en
manjaro-firmware
myki
numix-circle-icon-theme-git
numix-icon-theme-git
ocs-url
pikaur
playonlinux
qt5ct-kde
thonny-git
ttf-ms-fonts
ulauncher
update-notifier
viber
xscreensaver-aerial
yay-git
zoom

Indeed. Someone had been installing /uninstalling Python packages with sudo pip :wink:

That someone was me.
I was following some instructions from people telling me to do that to run some python programs I was using to do some python programming with not knowing what damage it was going to cause.
I was listening to people that know more than I know so I thought they knew what they were doing.
I have learned since then but installed so much stuff and didn’t know all the packages I installed.
I wanted to play with the database programming and I am just beginning to learn python so I was ignorant on what packages to install.