mkiol / dsnote

Speech Note Linux app. Note taking, reading and translating with offline Speech to Text, Text to Speech and Machine translation.
Mozilla Public License 2.0
519 stars 20 forks source link

App crashes when using dedicated AMD GPU #85

Closed Kentoseth closed 8 months ago

Kentoseth commented 9 months ago

I ran the app in debug mode by doing:

flatpak install flathub org.kde.Sdk/x86_64/5.15-22.08
flatpak run --command=sh --devel net.mkiol.SpeechNote

gdb /app/bin/dsnote
run

Here is the output of the error (when GPU acceleration is enabled and the dedicated GPU is selected):

ggml_opencl: selecting platform: 'Clover' ggml_opencl: selecting device: 'AMD Radeon RX 5500M (radeonsi, navi14, LLVM 15.0.7, DRM 3.54, ...)' ggml_opencl: device FP16 support: false [New Thread 0x7ffe929ff600 (LWP 152)] ggml_opencl: kernel compile error:

fatal error: cannot open file '/usr/lib/x86_64-linux-gnu/GL/default/share/clc/gfx1012-amdgcn-mesa-mesa3d.bc': No such file or directory

[Thread 0x7ffeb57fa600 (LWP 145) exited] [Thread 0x7ffeb4ff9600 (LWP 146) exited] [Thread 0x7ffeb67fc600 (LWP 143) exited] [Thread 0x7ffeb5ffb600 (LWP 144) exited] [Thread 0x7ffeb6ffd600 (LWP 142) exited] [Thread 0x7ffe929ff600 (LWP 152) exited] [Thread 0x7ffeb77fe600 (LWP 141) exited] [Thread 0x7ffeb7fff600 (LWP 140) exited] [Thread 0x7ffec4dfc600 (LWP 139) exited] [Thread 0x7ffec55fd600 (LWP 138) exited] [Thread 0x7ffec5dfe600 (LWP 137) exited] [E] 16:38:26.796 0x7ffff3153d00 ():141 - ASSERT failure in Q_GLOBAL_STATIC: "The global static was used after being destroyed", file /usr/include/QtCore/qglobalstatic.h, line 141

Thread 1 "dsnote" received signal SIGABRT, Aborted. 0x00007ffff4091204 in __pthread_kill_implementation () from /usr/lib/x86_64-linux-gnu/libc.so.6

The GPU options are:

  1. OpenCL, AMD Accelerated Parallel Processing
  2. OpenCL, Clover, AMD Radeon RX 5500M
mkiol commented 9 months ago

Thanks for the report.

What GPU is selected?

It looks that you have selected "Clover, AMD Radeon RX 5500M" and your GPU is not supported in mesa OpenCL driver (Clover). Do you observe that same problem when "AMD Accelerated Parallel Processing" is selected?

Could you please run the app with --verbose option to see more logs?

flatpak run net.mkiol.SpeechNote --verbose
pnka commented 8 months ago

Same issue with RX6600. Default Debian 12 live CD install.

Only graphic card option in the menu is: "OpenCL, Clover, AMD Radeon RX 6600"

Do I need to install additional driver?

QSocketNotifier: Can only be used with threads started with QThread qt.qpa.qgnomeplatform: Could not find color scheme "" [I] 16:25:11.193 0x7f9fcb84cd00 init:49 - logging to stderr enabled [D] 16:25:11.194 0x7f9fcb84cd00 () - version: 4.3.0 [D] 16:25:11.194 0x7f9fcb84cd00 () - translation: "en_US" [W] 16:25:11.194 0x7f9fcb84cd00 () - failed to install translation [D] 16:25:11.194 0x7f9fcb84cd00 () - starting standalone app [D] 16:25:11.194 0x7f9fcb84cd00 () - app: net.mkiol dsnote [D] 16:25:11.194 0x7f9fcb84cd00 () - config location: "/home/user1/.var/app/net.mkiol.SpeechNote/config" [D] 16:25:11.194 0x7f9fcb84cd00 () - data location: "/home/user1/.var/app/net.mkiol.SpeechNote/data/net.mkiol/dsnote" [D] 16:25:11.194 0x7f9fcb84cd00 () - cache location: "/home/user1/.var/app/net.mkiol.SpeechNote/cache/net.mkiol/dsnote" [D] 16:25:11.194 0x7f9fcb84cd00 () - settings file: "/home/user1/.var/app/net.mkiol.SpeechNote/config/net.mkiol/dsnote/settings.conf" [D] 16:25:11.194 0x7f9fcb84cd00 () - platform: "wayland" [D] 16:25:11.292 0x7f9fcb84cd00 () - supported audio input devices: ALSA lib ../../oss/pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp [D] 16:25:11.298 0x7f9fcb84cd00 () - "pulse" [D] 16:25:11.498 0x7f9fcb84cd00 () - "upmix" [D] 16:25:11.525 0x7f9fcb84cd00 () - "default" ALSA lib ../../../src/pcm/pcm_direct.c:2045:(snd1_pcm_direct_parse_open_conf) The field ipc_gid must be a valid group (create group audio) ALSA lib ../../../src/pcm/pcm_direct.c:2045:(snd1_pcm_direct_parse_open_conf) The field ipc_gid must be a valid group (create group audio) [D] 16:25:11.533 0x7f9fcb84cd00 () - "front:CARD=Loopback,DEV=0" [D] 16:25:11.533 0x7f9fcb84cd00 () - "alsa_input.platform-snd_aloop.0.analog-stereo" [D] 16:25:11.533 0x7f9fcb84cd00 () - "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" [D] 16:25:11.533 0x7f9fcb84cd00 () - "alsa_input.pci-0000_00_1f.3.analog-stereo" [D] 16:25:11.533 0x7f9fcb84cd00 () - "alsa_output.platform-snd_aloop.0.analog-stereo.monitor" [D] 16:25:11.533 0x7f9fcb84cd00 () - "alsa_output.pci-0000_03_00.1.hdmi-stereo-extra4.monitor" [D] 16:25:11.533 0x7f9fcb84cd00 () - "bluez_output.E8_EC_A3_0F_05_89.1.monitor" [D] 16:25:11.544 0x7f9fcb84cd00 () - starting service: app-standalone [D] 16:25:11.545 0x7f9fcb84cd00 () - mbrola dir: "/app/bin" [D] 16:25:11.545 0x7f9fcb84cd00 () - espeak dir: "/app/bin" [D] 16:25:11.545 0x7f9fb548e600 loop:56 - py executor loop started [D] 16:25:11.547 0x7f9fcb84cd00 () - module already unpacked: "rhvoicedata" [D] 16:25:11.547 0x7f9fcb84cd00 () - module already unpacked: "rhvoiceconfig" [D] 16:25:11.549 0x7f9fb5c8f600 () - config version: 51 51 [D] 16:25:11.550 0x7f9fcb84cd00 () - module already unpacked: "espeakdata" [D] 16:25:11.550 0x7f9fcb84cd00 () - default stt model not found: "tr_whisper_large" [D] 16:25:11.550 0x7f9fcb84cd00 () - default tts model not found: "tr_piper_dfki_medium" [D] 16:25:11.550 0x7f9fcb84cd00 () - default mnt lang not found: "en" [D] 16:25:11.550 0x7f9fcb84cd00 () - new default mnt lang: "en" [D] 16:25:11.550 0x7f9fcb84cd00 () - service refresh status, new state: busy [D] 16:25:11.550 0x7f9fcb84cd00 () - service state changed: unknown => busy [D] 16:25:11.550 0x7f9fcb84cd00 () - delaying features availability [D] 16:25:11.551 0x7f9fcb84cd00 () - available styles: ("Default", "Fusion", "Imagine", "Material", "org.kde.breeze", "org.kde.desktop", "Plasma", "Universal") [D] 16:25:11.551 0x7f9fcb84cd00 () - style paths: ("/usr/lib/qml/QtQuick/Controls.2") [D] 16:25:11.551 0x7f9fcb84cd00 () - import paths: ("/usr/lib/qml", "/app/bin", "qrc:/qt-project.org/imports") [D] 16:25:11.551 0x7f9fcb84cd00 () - library paths: ("/usr/share/runtime/lib/plugins", "/usr/lib/plugins", "/app/bin") [D] 16:25:11.551 0x7f9fcb84cd00 () - using auto qt style [D] 16:25:11.551 0x7f9fcb84cd00 () - XDG_CURRENT_DESKTOP: GNOME [D] 16:25:11.551 0x7f9fcb84cd00 () - switching to style: "org.kde.breeze" [D] 16:25:11.561 0x7f9fb5c8f600 () - models changed [D] 16:25:12.5 0x7f9fcb84cd00 () - starting app: app-standalone [D] 16:25:12.6 0x7f9fcb84cd00 () - app service state: unknown => busy [W] 16:25:12.6 0x7f9fcb84cd00 () - hot keys are supported only under x11 [W] 16:25:12.22 0x7f9fcb84cd00 ():36 - file:///usr/lib/qml/QtQuick/Controls.2/org.kde.breeze/ScrollView.qml:36:25: QML ScrollBar: Binding loop detected for property "x" [W] 16:25:12.26 0x7f9fcb84cd00 ():36 - file:///usr/lib/qml/QtQuick/Controls.2/org.kde.breeze/ScrollView.qml:36:25: QML ScrollBar: Binding loop detected for property "x" [W] 16:25:12.28 0x7f9fcb84cd00 ():36 - file:///usr/lib/qml/QtQuick/Controls.2/org.kde.breeze/ScrollView.qml:36:25: QML ScrollBar: Binding loop detected for property "x" logger error: invalid format string qrc:/qml/main.qml:269:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } logger error: invalid format string qrc:/qml/main.qml:260:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } [W] 16:25:12.45 0x7f9fcb84cd00 virtual QVariant ModelSource::item(int) const:81 - ModelSource: Invalid role -1 "color" [W] 16:25:12.45 0x7f9fcb84cd00 virtual QVariant ModelSource::item(int) const:81 - ModelSource: Invalid role -1 "color" logger error: invalid format string qrc:/qml/Notepad.qml:24:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } logger error: invalid format string qrc:/qml/Translator.qml:29:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } logger error: invalid format string qrc:/qml/MainToolBar.qml:221:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... } [W] 16:25:12.80 0x7f9fcb84cd00 ():144 - qrc:/qml/MainToolBar.qml:144:21: QML MenuItem: Binding loop detected for property "reserveSpaceForIcon" [W] 16:25:12.80 0x7f9fcb84cd00 ():144 - qrc:/qml/MainToolBar.qml:144:21: QML MenuItem: Binding loop detected for property "reserveSpaceForIcon" [W] 16:25:12.83 0x7f9fcb84cd00 ():46 - qrc:/qml/MainToolBar.qml:46:21: QML MenuItem: Binding loop detected for property "reserveSpaceForIcon" [W] 16:25:12.83 0x7f9fcb84cd00 ():46 - qrc:/qml/MainToolBar.qml:46:21: QML MenuItem: Binding loop detected for property "reserveSpaceForIcon" [D] 16:25:12.86 0x7f9fcb84cd00 onCompleted:155 - default font pixel size: 14 [D] 16:25:12.94 0x7f9fcb84cd00 () - service refresh status, new state: busy [D] 16:25:12.94 0x7f9fcb84cd00 () - service refresh status, new state: busy [D] 16:25:12.219 0x7f9fcb84cd00 () - stt models changed [D] 16:25:12.220 0x7f9fcb84cd00 () - update listen [D] 16:25:12.220 0x7f9fcb84cd00 () - app stt configured: false => true [D] 16:25:12.220 0x7f9fcb84cd00 () - app active stt model: "" => "tr_whisper_large" [D] 16:25:12.221 0x7f9fcb84cd00 () - update listen [D] 16:25:12.221 0x7f9fcb84cd00 () - tts models changed [D] 16:25:12.221 0x7f9fcb84cd00 () - update listen [D] 16:25:12.221 0x7f9fcb84cd00 () - app tts configured: false => true [D] 16:25:12.221 0x7f9fcb84cd00 () - app active tts model: "" => "tr_piper_dfki_medium" [D] 16:25:12.221 0x7f9fcb84cd00 () - update listen [W] 16:25:12.221 0x7f9fcb84cd00 () - no available tts models for in mnt [W] 16:25:12.221 0x7f9fcb84cd00 () - no available tts models for out mnt [D] 16:25:12.221 0x7f9fcb84cd00 () - ttt models changed [D] 16:25:12.223 0x7f9fcb84cd00 () - mnt langs changed [D] 16:25:12.224 0x7f9fcb84cd00 () - update listen [D] 16:25:12.224 0x7f9fcb84cd00 () - app mnt configured: false => true [D] 16:25:12.224 0x7f9fcb84cd00 () - app active mnt lang: "" => "en" [D] 16:25:12.224 0x7f9fcb84cd00 () - app mnt available out langs: 0 => 1 [W] 16:25:12.225 0x7f9fcb84cd00 () - no available tts models for in mnt [D] 16:25:12.225 0x7f9fcb84cd00 () - app active mnt out lang: "" => "ru" [D] 16:25:12.225 0x7f9fcb84cd00 () - app tts available models for out mnt: 0 => 1 [D] 16:25:12.226 0x7f9fcb84cd00 () - app active tts model for out mnt: "" => "ru_piper_denis_medium" [D] 16:25:12.342 0x7f9fcb84cd00 () - trying features availability update: false [D] 16:25:13.184 0x7f9fb548e600 libs_availability:171 - py libs availability: [coqui-tts=true, faster-whisper=true, mimic3-tts=true, transformers=true, unikud=true, gruut_de=true, gruut_es=true, gruut_fa=true, gruut_fr=true, gruut_nl=true, gruut_it=true, gruut_ru=true, gruut_sw=true, mecab=true, torch-cuda=false] [D] 16:25:13.281 0x7f9fcb84cd00 () - trying features availability update: true [D] 16:25:13.282 0x7f9fcb84cd00 () - features availability ready [W] 16:25:13.282 0x7f9fcb84cd00 has_lib:423 - failed to open libcudnn.so: libcudnn.so: cannot open shared object file: No such file or directory [W] 16:25:13.298 0x7f9fcb84cd00 has_hip:79 - failed to open whisper-hipblas lib: libwhisper-hipblas.so: cannot open shared object file: No such file or directory [D] 16:25:13.309 0x7f9fcb84cd00 () - updating model using availability [D] 16:25:13.309 0x7f9fcb84cd00 () - updating model using availability internal [D] 16:25:13.311 0x7f9fcb84cd00 () - service refresh status, new state: idle [D] 16:25:13.311 0x7f9fcb84cd00 () - service state changed: busy => idle [D] 16:25:13.311 0x7f9fcb84cd00 () - scan cuda: true [D] 16:25:13.311 0x7f9fcb84cd00 () - scan hip: true [D] 16:25:13.311 0x7f9fcb84cd00 () - scan opencl: true false [D] 16:25:13.311 0x7f9fcb84cd00 add_cuda_devices:229 - scanning for cuda devices [D] 16:25:13.311 0x7f9fcb84cd00 add_cuda_devices:238 - cuda version: driver=0, runtime=0 [W] 16:25:13.311 0x7f9fcb84cd00 add_cuda_devices:243 - cudaGetDeviceCount returned: 35 [D] 16:25:13.311 0x7f9fcb84cd00 add_hip_devices:266 - scanning for hip devices [W] 16:25:13.311 0x7f9fcb84cd00 hip_api:170 - failed to open hip lib: libamdhip64.so: cannot open shared object file: No such file or directory [D] 16:25:13.311 0x7f9fcb84cd00 add_opencl_devices:303 - scanning for opencl devices [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:320 - opencl number of platforms: 2 [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:345 - opencl platform: 0, name=Clover, vendor=Mesa [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:359 - opencl number of devices: 1 [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:383 - opencl device: 0, platform name=Clover, device name=AMD Radeon RX 6600 (radeonsi, navi23, LLVM 15.0.7, DRM 3.49, 6.1.0-17-amd64), types=[GPU, ] [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:345 - opencl platform: 1, name=AMD Accelerated Parallel Processing, vendor=Advanced Micro Devices, Inc. [D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:359 - opencl number of devices: 0 [D] 16:25:13.342 0x7f9fcb84cd00 () - service refresh status, new state: idle [D] 16:25:13.347 0x7f9fcb84cd00 () - app service state: busy => idle [W] 16:25:13.350 0x7f9fcb84cd00 () - no available tts models for in mnt [W] 16:25:13.350 0x7f9fcb84cd00 () - invalid task, reseting task state [D] 16:25:13.350 0x7f9fcb84cd00 () - app busy: true => false [D] 16:25:13.351 0x7f9fcb84cd00 () - stt models changed [D] 16:25:13.351 0x7f9fcb84cd00 () - update listen [D] 16:25:13.351 0x7f9fcb84cd00 () - tts models changed [D] 16:25:13.351 0x7f9fcb84cd00 () - update listen [W] 16:25:13.351 0x7f9fcb84cd00 () - no available tts models for in mnt [D] 16:25:13.351 0x7f9fcb84cd00 () - ttt models changed [D] 16:25:13.353 0x7f9fcb84cd00 () - mnt langs changed [D] 16:25:13.353 0x7f9fcb84cd00 () - update listen

After I click "Listen":

D] 16:31:24.258 0x7f9e89ffb600 create_whisper_model:216 - creating whisper model whisper_init_from_file_with_params_no_state: loading model from '/home/user1/.var/app/net.mkiol.SpeechNote/cache/net.mkiol/dsnote/speech-models/multilang_whisper_large.ggml' whisper_model_load: loading model whisper_model_load: n_vocab = 51866 whisper_model_load: n_audio_ctx = 1500 whisper_model_load: n_audio_state = 1280 whisper_model_load: n_audio_head = 20 whisper_model_load: n_audio_layer = 32 whisper_model_load: n_text_ctx = 448 whisper_model_load: n_text_state = 1280 whisper_model_load: n_text_head = 20 whisper_model_load: n_text_layer = 32 whisper_model_load: n_mels = 128 whisper_model_load: ftype = 8 whisper_model_load: qntvr = 2 whisper_model_load: type = 5 (large v3) whisper_model_load: adding 1609 extra tokens whisper_model_load: n_langs = 100 ggml_opencl: selecting platform: 'Clover' ggml_opencl: selecting device: 'AMD Radeon RX 6600 (radeonsi, navi23, LLVM 15.0.7, DRM 3.49, 6.1.0-17-amd64)' ggml_opencl: device FP16 support: false ggml_opencl: kernel compile error:

fatal error: cannot open file '/usr/lib/x86_64-linux-gnu/GL/default/share/clc/gfx1032-amdgcn-mesa-mesa3d.bc': No such file or directory

[D] 16:31:24.504 0x7f9fcb84cd00 () - using audio input: "bluez_output.E8_EC_A3_0F_05_89.1.monitor" [D] 16:31:24.565 0x7f9fcb84cd00 () - audio state: IdleState [D] 16:31:24.565 0x7f9fcb84cd00 set_speech_started:486 - speech started: false => true [D] 16:31:24.565 0x7f9fcb84cd00 set_speech_detection_status:508 - speech detection status: initializing => initializing (speech-detected) [D] 16:31:24.565 0x7f9fcb84cd00 () - service refresh status, new state: listening-single-sentence [D] 16:31:24.565 0x7f9fcb84cd00 () - service state changed: idle => listening-single-sentence

mkiol commented 8 months ago

Thanks for the update.

The crash with Clover OpenCL is kinda expected. This driver works only for old AMD cards.

The actual problem is here:

[D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:345 - opencl platform: 1, name=AMD Accelerated Parallel Processing, vendor=Advanced Micro Devices, Inc.
[D] 16:25:13.341 0x7f9fcb84cd00 add_opencl_devices:359 - opencl number of devices: 0

For some reason, ROCm OpenCL driver (aka "AMD Accelerated Parallel Processing") can't find your graphic card 🤔.

Did you manually override the permissions of the app?

Could you please paste the output of:

flatpak info --show-permissions net.mkiol.SpeechNote

and

flatpak override --show net.mkiol.SpeechNote
flatpak override --user --show net.mkiol.SpeechNote

?

pnka commented 8 months ago

Hey. Thanks for the response.

I enabled GPU Acceleration via Flatseal. No other permission or modifications.

flatpak info --show-permissions net.mkiol.SpeechNote [Context] shared=network;ipc; sockets=x11;wayland;pulseaudio;fallback-x11; devices=dri;all; filesystems=xdg-music;xdg-videos;~/.icons;xdg-download;/root/.icons;xdg-documents;/root/.themes;xdg-desktop;xdg-config/kdeglobals:ro;~/.themes;

[Session Bus Policy] com.canonical.AppMenu.Registrar=talk org.kde.kconfig.notify=talk org.kde.KGlobalSettings=talk org.freedesktop.Notifications=talk

[Environment] PERL5LIB=/app/lib/perl5/site_perl PYTORCH_TENSOREXPR=0 LD_LIBRARY_PATH=/app/opt/cuda/lib64 OPENCL_VENDOR_PATH=/app/opt/opencl/vendors ICON_THEME=Bibata-Modern-Ice

flatpak override --show net.mkiol.SpeechNote """this command gave no output"

flatpak override --user --show net.mkiol.SpeechNote [Context] devices=dri

mkiol commented 8 months ago

flatpak override --user --show net.mkiol.SpeechNote [Context] devices=dri

This is a problem! The permissions have been altered. You need to reset them with:

flatpak override --user --reset net.mkiol.SpeechNote

To make OpenCL working, app needs "device=all" but it looks that you have overridden them to "devices=dri".

pnka commented 8 months ago

Unfortunately crashed again...

ggml_opencl: selecting platform: 'Clover' ggml_opencl: selecting device: 'AMD Radeon RX 6600 (radeonsi, navi23, LLVM 15.0.7, DRM 3.49, 6.1.0-17-amd64)' ggml_opencl: device FP16 support: false ggml_opencl: kernel compile error:

fatal error: cannot open file '/usr/lib/x86_64-linux-gnu/GL/default/share/clc/gfx1032-amdgcn-mesa-mesa3d.bc': No such file or directory

[D] 17:13:33.966 0x7f7258a0ed00 () - using audio input: "bluez_output.E8_EC_A3_0F_05_89.1.monitor" [D] 17:13:34.20 0x7f7258a0ed00 () - audio state: IdleState [D] 17:13:34.20 0x7f7258a0ed00 set_speech_started:486 - speech started: false => true [D] 17:13:34.20 0x7f7258a0ed00 set_speech_detection_status:508 - speech detection status: initializing => initializing (speech-detected) [D] 17:13:34.20 0x7f7258a0ed00 () - service refresh status, new state: listening-single-sentence [D] 17:13:34.20 0x7f7258a0ed00 () - service state changed: idle => listening-single-sentence

flatpak override --user --show net.mkiol.SpeechNote ""no output""

flatpak override --show net.mkiol.SpeechNote ""no output""

flatpak info --show-permissions net.mkiol.SpeechNote [Context] shared=network;ipc; sockets=x11;wayland;pulseaudio;fallback-x11; devices=all; filesystems=xdg-music;xdg-videos;~/.icons;xdg-download;/root/.icons;xdg-documents;/root/.themes;xdg-desktop;xdg-config/kdeglobals:ro;~/.themes;

[Session Bus Policy] com.canonical.AppMenu.Registrar=talk org.kde.kconfig.notify=talk org.kde.KGlobalSettings=talk org.freedesktop.Notifications=talk

[Environment] PERL5LIB=/app/lib/perl5/site_perl PYTORCH_TENSOREXPR=0 LD_LIBRARY_PATH=/app/opt/cuda/lib64 OPENCL_VENDOR_PATH=/app/opt/opencl/vendors ICON_THEME=Bibata-Modern-Ice

mkiol commented 8 months ago

Just want to make sure. Did you see additional "AMD Accelerated Parallel Processing" device in the settings tab? If so, you have to select it.

Could you please paste the log when the app starts?

pnka commented 8 months ago

Nope. unlike OP, i don't have any other option. No "AMD Accelerated Parallel Processing" in the list.

sudo lshw -numeric -C display *-display
description: VGA compatible controller product: Navi 23 [Radeon RX 6600/6600 XT/6600M] [1002:73FF] vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002] physical id: 0 bus info: pci@0000:03:00.0 logical name: /dev/fb0 version: c7 width: 64 bits clock: 33MHz capabilities: pm pciexpress msi vga_controller bus_master cap_list rom fb configuration: depth=32 driver=amdgpu latency=0 mode=1920x1080 resolution=1920,1080 visual=truecolor xres=1920 yres=1080 resources: iomemory:400-3ff iomemory:420-41f irq:42 memory:4000000000-41ffffffff memory:4200000000-420fffffff ioport:5000(size=256) memory:40a00000-40afffff memory:40b00000-40b1ffff

image

mkiol commented 8 months ago

Thanks for checking.

Could you please once again check the permissions and run with --verbose. What is in "add_opencl_devices" log lines?

flatpak override --user --show net.mkiol.SpeechNote
flatpak run net.mkiol.SpeechNote --verbose
pnka commented 8 months ago

Sure thing:

[D] 17:46:56.304 0x7ff298180d00 add_opencl_devices:303 - scanning for opencl devices [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:320 - opencl number of platforms: 2 [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:345 - opencl platform: 0, name=Clover, vendor=Mesa [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:359 - opencl number of devices: 1 [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:383 - opencl device: 0, platform name=Clover, device name=AMD Radeon RX 6600 (radeonsi, navi23, LLVM 15.0.7, DRM 3.49, 6.1.0-17-amd64), types=[GPU, ] [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:345 - opencl platform: 1, name=AMD Accelerated Parallel Processing, vendor=Advanced Micro Devices, Inc. [D] 17:46:56.332 0x7ff298180d00 add_opencl_devices:359 - opencl number of devices: 0

flatpak override --user --show net.mkiol.SpeechNote ""command gives no output""

mkiol commented 8 months ago

Thanks.

Honestly I don't know what is wrong. Maybe your graphics card is not supported in OpenCL ROCm runtime. Flatpak package is shipped with ROCm 5.4.3, so not the newest one.

In upcoming Speech Note v4.4.0, GPU acceleration for AMD will be significantly improved. Instead OpenCL you will be able to use direct ROCm acceleration which is 3x faster comparing to OpenCL. Moreover, acceleration for TTS will be possible for AMD cards. This should work with you graphic card.

pnka commented 8 months ago

Thank you so much for your help! I will try when v4.4.0 will be released.

Kentoseth commented 8 months ago

Do you observe that same problem when "AMD Accelerated Parallel Processing" is selected?

Hello. thanks for the speedy reply.

I will answer this question first as I just tested it out.

So firstly, I see these options:

  1. OpenCL, AMD Accelerated Parallel Processing, gfx1012:xnack-
  2. OpenCL, AMD Accelerated Parallel Processing, gfx90:xnack-
  3. OpenCL, Clover, AMD Radeon RX 5500M (radeonsi, navi14, LLVM 15.0.7, DRM 3.54, ...)
  4. OpenCL, Clover, AMD Radeon RX 5500M (radeonsi, renoir, LLVM 15.0.7, DRM 3.54, ...)

I tested on the first option. It works and appears to be faster at processing. Can I assume the solution for me was to choose option 1 or 2?

mkiol commented 8 months ago

@Kentoseth Thanks for checking. The "gfx1012" is the right graphic card. This "gfx90" is most likely GPU integrated in to your CPU and for sure it is much worse than "gfx1012".