easyeffects icon indicating copy to clipboard operation
easyeffects copied to clipboard

High CPU usage even without plugins or global bypass.

Open dmichalskii opened this issue 3 years ago • 7 comments

EasyEffects Version

6.2.4

What package are you using?

Flatpak (Flathub)

Distribution

Ubuntu 21.10

Describe the bug

Hello.

I am very happy to use EasyEffects, because I use it for my headphones with convolver (or equalizer) but I have problem with high CPU usage even with global bypass or when I remove all plugins. My sound card is Focusrite Scarlett 2i4. Maybe someone has simmilar issue. I know that it rarelly working without issue with low cpu usage. I am attaching console log and screen of the top program. Thanks. image

Expected Behavior

Normal (low) CPU usage.

Debug Log

❯ G_MESSAGES_DEBUG=easyeffects flatpak run com.github.wwmm.easyeffects
You have PipeWire 0.3.50 installed
This is newer or the same as PipeWire 0.3.41 required to run EasyEffects
(process:2): easyeffects-DEBUG: 20:43:45.174: easyeffects version: 6.2.4
(process:2): easyeffects-DEBUG: 20:43:45.175: main: locale directory: /app/share/locale
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system input presets directory: "/app/etc/xdg/easyeffects/input"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system input presets directory: "/etc/easyeffects/input"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system input presets directory: "/etc/xdg/easyeffects/input"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system output presets directory: "/app/etc/xdg/easyeffects/output"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system output presets directory: "/etc/easyeffects/output"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: system output presets directory: "/etc/xdg/easyeffects/output"; 
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: user presets directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: user presets directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/input
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: user presets directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/output
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: user presets directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/autoload/input
(easyeffects:2): easyeffects-DEBUG: 20:43:45.180: presets_manager: user presets directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/autoload/output
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: Screen seems not DRI3 capable
libEGL warning: DRI2: failed to authenticate
(easyeffects:2): easyeffects-DEBUG: 20:43:45.300: pipe_manager: compiled with PipeWire: 0.3.41
(easyeffects:2): easyeffects-DEBUG: 20:43:45.300: pipe_manager: linked to PipeWire: 0.3.41
(easyeffects:2): easyeffects-DEBUG: 20:43:45.301: pipe_manager: core version: 0.3.50
(easyeffects:2): easyeffects-DEBUG: 20:43:45.301: pipe_manager: core name: pipewire-0
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: found metadata: settings
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: found metadata: default
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: found metadata: route-settings
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: Audio/Sink 67 alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.pro-output-0 with timestamp 1650825825303592787 was added
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: Audio/Source 68 alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.pro-input-0 with timestamp 1650825825303610100 was added
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: Stream/Output/Audio 138 spotify with timestamp 1650825825303645396 was added
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: spotify port 137 is connected to alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.pro-output-0 port 38
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: spotify port 139 is connected to alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.pro-output-0 port 64
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: Audio/Sink 129 easyeffects_sink with timestamp 1650825825303682086 was added
(easyeffects:2): easyeffects-DEBUG: 20:43:45.303: pipe_manager: Audio/Source/Virtual 77 easyeffects_source with timestamp 1650825825303690952 was added
(easyeffects:2): easyeffects-DEBUG: 20:43:45.304: pipe_manager: easyeffects_sink node successfully retrieved with id 129 and timestamp 1650825825303682086
(easyeffects:2): easyeffects-DEBUG: 20:43:45.304: pipe_manager: easyeffects_source node successfully retrieved with id 77 and timestamp 1650825825303690952
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 0, default.configured.audio.sink, Spa:String:JSON, {"name":"alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.analog-surround-40"}
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 0, default.configured.audio.source, Spa:String:JSON, {"name":"alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.analog-stereo"}
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 0, default.audio.sink, Spa:String:JSON, {"name":"alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.pro-output-0"}
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 0, default.audio.source, Spa:String:JSON, {"name":"alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.pro-input-0"}
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 0, default.video.source, Spa:String:JSON, {"name":"v4l2_input.pci-0000_05_00.3-usb-0_4_1.0"}
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 138, target.node, Spa:Id, 82
(easyeffects:2): easyeffects-DEBUG: 20:43:45.305: pipe_manager: new metadata property: 138, target.object, Spa:Id, 314

(easyeffects:2): easyeffects-WARNING **: 20:43:45.327: lv2_wrapper: Could not find the plugin: http://drobilla.net/plugins/mda/Loudness
(easyeffects:2): easyeffects-DEBUG: 20:43:45.327: soe: http://drobilla.net/plugins/mda/Loudness is not installed

(easyeffects:2): easyeffects-WARNING **: 20:43:45.327: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:2): easyeffects-WARNING **: 20:43:45.327: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:2): easyeffects-WARNING **: 20:43:45.327: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: link
(easyeffects:2): easyeffects-DEBUG: 20:43:45.339: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:45.362: lv2_wrapper: http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:45.399: lv2_wrapper: http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.290: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.302: lv2_wrapper: http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.313: lv2_wrapper: urn:zamaudio:ZaMaximX2 requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.313: lv2_wrapper: urn:zamaudio:ZaMaximX2 requires feature: http://lv2plug.in/ns/ext/options#options
(easyeffects:2): easyeffects-DEBUG: 20:43:46.333: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.358: soe: rnnoise using the default model
(easyeffects:2): easyeffects-DEBUG: 20:43:46.373: soe: output_level successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:46.375: soe: spectrum successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:46.379: soe: convolver successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:46.382: soe: equalizer successfully connected to PipeWire graph

(easyeffects:2): easyeffects-WARNING **: 20:43:46.407: lv2_wrapper: Could not find the plugin: http://drobilla.net/plugins/mda/Loudness
(easyeffects:2): easyeffects-DEBUG: 20:43:46.407: sie: http://drobilla.net/plugins/mda/Loudness is not installed

(easyeffects:2): easyeffects-WARNING **: 20:43:46.407: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness

(easyeffects:2): easyeffects-WARNING **: 20:43:46.407: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: output

(easyeffects:2): easyeffects-WARNING **: 20:43:46.407: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: link
(easyeffects:2): easyeffects-DEBUG: 20:43:46.419: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.421: soe: output_level: new PipeWire blocksize: 2048
(easyeffects:2): easyeffects-DEBUG: 20:43:46.443: lv2_wrapper: http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:46.479: lv2_wrapper: http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:47.396: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:47.407: lv2_wrapper: http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:47.418: lv2_wrapper: urn:zamaudio:ZaMaximX2 requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:47.418: lv2_wrapper: urn:zamaudio:ZaMaximX2 requires feature: http://lv2plug.in/ns/ext/options#options
(easyeffects:2): easyeffects-DEBUG: 20:43:47.438: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map
(easyeffects:2): easyeffects-DEBUG: 20:43:47.464: sie: rnnoise using the default model
(easyeffects:2): easyeffects-DEBUG: 20:43:47.477: sie: output_level successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:47.479: sie: spectrum successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:47.484: sie: rnnoise successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:47.488: soe: disconnecting the convolver filter from PipeWire
(easyeffects:2): easyeffects-DEBUG: 20:43:47.489: soe: disconnecting the equalizer filter from PipeWire
(easyeffects:2): easyeffects-DEBUG: 20:43:47.493: sie: disconnecting the rnnoise filter from PipeWire
easyeffects-INFO: 20:43:47.497: application: enabling global bypass
(easyeffects:2): easyeffects-DEBUG: 20:43:47.519: application_ui: Icon Theme Yaru detected
(easyeffects:2): easyeffects-DEBUG: 20:43:47.635: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:47.635: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:47.635: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:47.638: convolver_box: irs directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/irs
(easyeffects:2): easyeffects-DEBUG: 20:43:47.686: rnnoise_box: model directory already exists: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/rnnoise
(easyeffects:2): easyeffects-DEBUG: 20:43:49.480: new default output device: alsa_output.usb-Focusrite_Scarlett_2i4_USB-00.pro-output-0
(easyeffects:2): easyeffects-DEBUG: 20:43:49.483: pipe_manager: new metadata property: 138, target.node, Spa:Id, 129
(easyeffects:2): easyeffects-DEBUG: 20:43:49.483: pipe_manager: new metadata property: 138, target.object, Spa:Id, 460
(easyeffects:2): easyeffects-DEBUG: 20:43:49.484: pipe_manager: spotify port 137 is connected to easyeffects_sink port 79
(easyeffects:2): easyeffects-DEBUG: 20:43:49.484: pipe_manager: spotify port 139 is connected to easyeffects_sink port 78
(easyeffects:2): easyeffects-DEBUG: 20:43:49.493: soe: convolver successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:49.496: soe: equalizer successfully connected to PipeWire graph
(easyeffects:2): easyeffects-DEBUG: 20:43:49.503: sie: rnnoise successfully connected to PipeWire graph
easyeffects-INFO: 20:43:49.507: application: disabling global bypass
(easyeffects:2): easyeffects-DEBUG: 20:43:49.513: new default input device: alsa_input.usb-Focusrite_Scarlett_2i4_USB-00.pro-input-0
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: convolver: irs file: /home/dmichalski/.var/app/com.github.wwmm.easyeffects/config/easyeffects/irs/results_oratory1990_harman_over-ear_2018_Beyerdynamic DT 880 250 Ohm (worn earpads)_Beyerdynamic DT 880 250 Ohm (worn earpads) minimum phase 48000Hz.irs
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: convolver: irs rate: 48000 Hz
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: convolver: irs channels: 2
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: convolver: irs frames: 4800
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: convolver: kernel initialized
(easyeffects:2): easyeffects-DEBUG: 20:43:49.524: soe: autogain factor: 0.838925
(easyeffects:2): easyeffects-DEBUG: 20:43:49.526: soe: convolver: zita is ready
(easyeffects:2): easyeffects-DEBUG: 20:43:49.530: soe: convolver latency: 0.000000 s
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: cannot lookup application icon spotify in /usr/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: cannot lookup application icon spotify in /usr/local/share/pixmaps
(easyeffects:2): easyeffects-DEBUG: 20:43:49.554: app_info: spotify icon name not installed in the Yaru icon theme in use. The application icon has been hidden.
(easyeffects:2): easyeffects-DEBUG: 20:43:49.555: soe: pipeline latency: 0.000000 ms

Additional Information

No response

dmichalskii avatar Apr 24 '22 18:04 dmichalskii

That is weird. What is your CPU? When no plugins are enabled EasyEffects just passthrough data and measures signal levels. Nothing that is heavy on resources. In any case you have something in your logs I have never seen

libEGL warning: DRI3: Screen seems not DRI3 capable

Maybe GTK4 is the one eating the CPU because something is not right in your GPU drivers.

wwmm avatar Apr 26 '22 14:04 wwmm

lscpu: Model name: AMD Ryzen 7 3700X 8-Core Processor

One time I when I disabled Spectrum was better but not the best. Then I need to search for solution on my own hand because this software is must to have for me and my headphones.

Despite of GTK4 the problem is only when is something is playing.

dmichalskii avatar Apr 26 '22 15:04 dmichalskii

Model name: AMD Ryzen 7 3700X 8-Core Processor

I have the same CPU. But not the libEGL warnings.

wwmm avatar Apr 26 '22 15:04 wwmm

@vchernin are the libEGL warnings something common when using Flatpak?

wwmm avatar Apr 26 '22 15:04 wwmm

Thanks for catching this abnormality with libEGL because it made me think and do this:

❯ flatpak update --app com.github.wwmm.easyeffects                    
Looking for updates…
        ID                                                       Branch             Op            Remote             Download
 1. [✓] org.freedesktop.Platform.GL.nvidia-495-44                1.4                u             flathub            282,3 MB / 283,1 MB
 2. [✓] org.freedesktop.Platform.GL.nvidia-495-46                1.4                u             flathub            280,9 MB / 281,7 MB
 3. [✓] org.freedesktop.Platform.GL.nvidia-510-47-03             1.4                u             flathub            328,8 MB / 329,6 MB
 4. [✓] org.freedesktop.Platform.GL.nvidia-510-54                1.4                u             flathub            328,9 MB / 329,7 MB
 5. [✓] org.freedesktop.Platform.GL.nvidia-510-60-02             1.4                i             flathub            328,7 MB / 329,1 MB
 6. [✓] org.gtk.Gtk3theme.Yaru                                   3.22               u             flathub             86,2 kB / 191,5 kB

Changes complete.

and now CPU usage is ok. image

Then I need to remember this and check will it happen again in future.

dmichalskii avatar Apr 26 '22 16:04 dmichalskii

IIRC this is indeed an (unfixable) Flatpak + Nvidia issue.

Flatpak needs to use its own set of libraries for its runtime and the Nvidia gpu, in addition to the actual driver running in the host.

If they don't match, things might break.

vchernin avatar Apr 26 '22 18:04 vchernin

I can +1 on this behavior.


My setup:

Intel+Nvidia, Kubuntu 20.04LTS, Nvidia only mode. EE installed via Flatpak Installed Driver: 510.85.02 Flatpak Nvidia GL thing: 510.73.05

Usage:

With audio playing and EE window maximized, CPU usage is around 40% With audio and EE minimized, CPU usage is down to 5%

After flatpak update

CPU usage when maximized and minimized is around 5%

Fix for high CPU usage on Flatpak+Nvidia setups :

flatpak update

kphanipavan avatar Aug 24 '22 05:08 kphanipavan