The module is there but the wrapper is broken :-( Can you try this hack: $ sudo sed -i 's|/linux-tools-|/linux-realtime-tools-|' /usr/lib/python3/dist-packages/perf/__init__.py
And check if it works now: $ python3 -c 'import perf; [print(c) for c in perf.cpu_map()]' 0 1 2 3 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/2089411 Title: python perf module missing in realtime kernel Status in linux package in Ubuntu: New Bug description: Issue is related to Bug #2051560 In using tuned profile realtime-virtual-host under the realtime kernel, the operating system would lose network connection. Further viewing of the tuned logs pointed to the following error: ERROR tuned.units.manager: WARNING: python perf module not found for kernel 6.8.1-1011-realtime Researching online Bug #2051560 was discovered. However, it looks as if the realtime kernel was not listed as fixed to include the perf Python module that affects tuned. Server info: uname -a: Linux 6.8.1-1011-realtime #11-Ubuntu SMP PREEMPT_RT Tue Oct 8 17:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ----------------------- lsb_release -crid: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 Codename: noble ----------------------- apt policy linux-image-6.8.1-1011-realtime: linux-image-6.8.1-1011-realtime: Installed: 6.8.1-1011.11 Candidate: 6.8.1-1011.11 Version table: *** 6.8.1-1011.11 500 500 https://esm.ubuntu.com/realtime/ubuntu noble/main amd64 Packages 100 /var/lib/dpkg/status ----------------------- Realtime kernel was installed via Ubuntu Pro subscription. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2089411/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp