Rebuild an aur package against python 3.8

I've installed optimus-manager and followed the instructions. However the daemon isn't starting. I searched repo issues and I found that a recent python update caused the problem the advised solution is to rebuild the package against python 3.8. However I have no experience in doing that before. I can't find a good resource to follow to do so.

Also should I use optimus-manager or optimus-manager-git ?

I think its just a case of removing the package and installing it again via pamac (or an AUR helper if you're using one).

When you install it again it'll check for dependencies and should pick up on the new Python version. For the sake of simplicity, in general I think it's better to stick with the AUR version and avoid the git, it just makes it easier to keep track of things and if the version is the same I don't see what benefit there would be to building from source.

Edit, I've just checked and optimus manager is in the official repo so you don't even need to use AUR. They all seem to be the same version. Looking at the python issue it seems it was filed on the 11th of November and optimus manager was updated on the 15th. Did you install before or after the Python update?

1 Like

I installed it from two days using pacman. I followed this guide Guide: Install and configure optimus-manager for hybrid GPU setups (Intel/NVIDIA) and the repos guide.

I followed the guide and rebooted expecting to find optimus-manager daemon active but it is not and here is the output of the sysctl status

image

I tried uninstall and install and same happened

Okay, have you tried installing the version from the official repository instead. Also when you're posting terminal outputs copy and paste them and then highlight it and click the icon that looks like this </> and it will format it nicely so we can read it more easily.

I'm afraid I don't have an optimus laptop laying around that I can trial and error this with, but for everybody else, could you also post the output of inxi -Fxxxza --no-host so we can see what kind of system you're working with. As a general rule its best to post this at the start when you're asking for help.

may you check if bumblebee is still active ? if so you have to disable it before activating optimus.

Here is the formatted output for sysctl status optimus-manager.service

● optimus-manager.service - Optimus Manager Commands Daemon
   Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2019-12-14 16:43:31 EET; 1min 49s ago
  Process: 840 ExecStartPre=/usr/bin/prime-switch-boot (code=exited, status=0/SUCCESS)
  Process: 934 ExecStart=/usr/bin/python3 -u /usr/bin/optimus-manager-daemon (code=exited, status=1/FAILURE)
 Main PID: 934 (code=exited, status=1/FAILURE)

Dec 14 16:43:31 moamen-pc python3[934]:     working_set = WorkingSet._build_master()
Dec 14 16:43:31 moamen-pc python3[934]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
Dec 14 16:43:31 moamen-pc python3[934]:     ws.require(__requires__)
Dec 14 16:43:31 moamen-pc python3[934]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
Dec 14 16:43:31 moamen-pc python3[934]:     needed = self.resolve(parse_requirements(requirements))
Dec 14 16:43:31 moamen-pc python3[934]:   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
Dec 14 16:43:31 moamen-pc python3[934]:     raise DistributionNotFound(req, requirers)
Dec 14 16:43:31 moamen-pc python3[934]: pkg_resources.DistributionNotFound: The 'optimus-manager==1.2.2' distribution was not found and is required by the application
Dec 14 16:43:31 moamen-pc systemd[1]: optimus-manager.service: Main process exited, code=exited, status=1/FAILURE
Dec 14 16:43:31 moamen-pc systemd[1]: optimus-manager.service: Failed with result 'exit-code'.

And the output for inxi -Fxxxza --no-host

System:    Kernel: 5.3.11-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.3-x86_64 root=UUID=01c7b10d-1aa2-4a32-b33d-18ca6ebcf010 rw quiet apparmor=1 
           security=apparmor resume=UUID=03b561dc-f276-4759-9f50-d77dd3aa9c2d udev.log_priority=3 
           Desktop: KDE Plasma 5.17.3 tk: Qt 5.13.2 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 20QV0007US v: ThinkPad X1 Extreme 2nd serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: LENOVO model: 20QV0007US v: SDK0R32862 WIN serial: <filter> UEFI: LENOVO v: N2OET40W (1.27 ) date: 10/17/2019 
Battery:   ID-1: BAT0 charge: 20.8 Wh condition: 78.7/80.4 Wh (98%) volts: 16.2/15.4 model: Celxpert 5B10V�� ��� 
           type: Li-poly serial: <filter> status: Charging cycles: 3 
CPU:       Topology: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) 
           stepping: A (10) microcode: C6 L2 cache: 12.0 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62431 
           Speed: 800 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 800 2: 801 3: 800 4: 801 5: 800 6: 800 7: 800 8: 800 
           9: 800 10: 800 11: 800 12: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           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: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
           Device-2: NVIDIA vendor: Lenovo driver: nvidia v: 418.113 bus ID: 01:00.0 chip ID: 10de:1f91 
           Display: x11 server: X.Org 1.20.5 driver: modesetting unloaded: intel alternate: fbdev,vesa compositor: kwin_x11 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.5 Mesa 19.2.4 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a348 
           Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:10fa 
           Sound Server: ALSA v: k5.3.11-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: 3.2.6-k port: efa0 bus ID: 00:1f.6 
           chip ID: 8086:15bc 
           IF: enp0s31f6 state: down mac: <filter> 
           Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: 3000 bus ID: 52:00.0 chip ID: 8086:2723 
           IF: wlp82s0 state: up mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 9.33 GiB (2.0%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L7 size: 476.94 GiB block size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 4M2QEXF7 scheme: GPT 
Partition: ID-1: / raw size: 20.00 GiB size: 19.56 GiB (97.81%) used: 8.77 GiB (44.8%) fs: ext4 dev: /dev/nvme0n1p5 
           ID-2: /home raw size: 360.69 GiB size: 354.03 GiB (98.15%) used: 540.3 MiB (0.1%) fs: ext4 dev: /dev/nvme0n1p7 
           ID-3: swap-1 size: 5.00 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) cache pressure: 100 (default) 
           dev: /dev/nvme0n1p6 
Sensors:   System Temperatures: cpu: 39.0 C mobo: 39.0 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 297 Uptime: 4m Memory: 15.36 GiB used: 1.25 GiB (8.1%) Init: systemd v: 242 Compilers: gcc: 9.2.0 
           Shell: bash v: 5.0.11 running in: konsole inxi: 3.0.36 

Yes I have disabled it before reboot and the output for sysctl status bumblebeed.service is

● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Looks like you need to rebuild the package:
trizen -S optimus-manager-git.

I have uninstalled pacman downloaded version and followed installation process for building aur package and it worked.

  1. cloned repo
  2. makepkg -sri

Great. In that case, mark the above post as the solution. Thanks :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by