mkiol/dsnote

CUDA graphics card is not detected (v4.5.0)

mkiol opened this issue · 14 comments

Relevant logs:

[D] 18:45:31.582684769.582 0x72ab2e18cd00 () - trying features availability update: false
/app/extensions/nvidia/lib/python3.11/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0

[D] 18:45:34.436945512.436 0x72ab2e18cd00 add_cuda_dev_devices:407 - scanning for cuda devices
[W] 18:45:34.438195691.438 0x72ab2e18cd00 operator():417 - cuInit error: CUDA_ERROR_UNKNOWN (999)
[W] 18:45:34.438210449.438 0x72ab2e18cd00 add_cuda_devices:510 - cuda init error
[D] 18:45:34.438215409.438 0x72ab2e18cd00 add_cuda_runtime_devices:368 - scanning for cuda runtime devices
[D] 18:45:34.438245766.438 0x72ab2e18cd00 add_cuda_runtime_devices:377 - cuda version: driver=12040, runtime=12040
[W] 18:45:34.438251297.438 0x72ab2e18cd00 add_cuda_runtime_devices:380 - cudaInitDevice error: 999
[W] 18:45:34.438255114.438 0x72ab2e18cd00 add_cuda_runtime_devices:386 - cudaGetDeviceCount error: 999
[W] 18:45:34.438402122.438 0x72ab2e18cd00 add_cuda_devices:515 - cuda runtime get device count error

Cause:

  • no /dev/nvidia-uvm file

Workaround:

  • run nvidia-modprobe -c 0 -u before starting Speech Note

Hello,

It seems nvidia-modprobe -c 0 -u workaround does not work if the computer resumes from sleep.

On v4.5.0, if computer is put to sleep then resumes from suspension, the please run nvidia-modprobe -c 0 -u warning keeps showing on the top and CUDA acceleration is not available.

If this happens, must reboot to use CUDA again :(

Same problem here since updating to v4.5.0

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=dsnote --file-forwarding net.mkiol.SpeechNote

Gtk-Message: 21:12:01.618: Failed to load module "xapp-gtk3-module"
Qt: Session management error: Could not open network socket
/app/extensions/nvidia/lib/python3.11/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0

This results in a Warning being displayed in the GUI:

Most likely, NVIDIA kernel module has not been fully initialized. Try executing "nvidia-modprobe -c 0 -u" before running Speech Note

Running the command before starting Speech Note has no effect.

Screenshot from 2024-05-29 21-15-29

Many thanks for reporting.

This problem started to occur after upgrading Flatpak runtime to 5.15-23.08 version. I still have not found out what the cause is. I'm testing Speech Note on two systems: Arch and Ubuntu 24.04 (both with NV cards) and I'm observing this issue only on Arch.

@h9j6k @jameshibbard On what system do you run the app? Could you please start with --verbose option to see more logs? Thanks!

flatpak run net.mkiol.SpeechNote --verbose

Hi,

Rebooting the PC after upgrading Speech Note seems to have solved the problem for me. After a reboot, I now no longer get the warning and performance has improved considerably.

I'm running Linux Mint 21.3 Cinnamon. Would you still like me to post the output of running with --verbose?

@jameshibbard I'm super glad the problem is gone :) If there is no issue additional logs will not be needed.

Could the issue be related to power saving? Just saw this from the latest nvidia driver release note,

**Unified Memory Support**
CUDA and unified memory is not supported when used with Linux power management states S3/S4.

https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-535-183-01/index.html

Hi, I am facing the same issue:

/app/extensions/nvidia/lib/python3.11/site-packages/torch/cuda/init.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0

Running nvidia-modprobe -c 0 -u didn't solve anything.

Here is a verbose log:

flatpak run net.mkiol.SpeechNote --verbose
[I] 21:45:54.426282295.426 0x7f7a54920d00 init:49 - logging to stderr enabled
[D] 21:45:54.426394041.426 0x7f7a54920d00 () - version: 4.5.0
[D] 21:45:54.427027781.427 0x7f7a54920d00 parse_cpuinfo:117 - cpu flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap
[D] 21:45:54.427600200.427 0x7f7a54920d00 parse_cpuinfo:125 - cpuinfo: processor-count=16, flags=[avx, avx2, fma, f16c, ]
[D] 21:45:54.427820619.427 0x7f7a54920d00 () - translation: "fr_FR"
[D] 21:45:54.427846391.427 0x7f7a54920d00 () - starting standalone app
[D] 21:45:54.429309565.429 0x7f7a54920d00 () - app: net.mkiol dsnote
[D] 21:45:54.429329680.429 0x7f7a54920d00 () - config location: "/home/rm/.var/app/net.mkiol.SpeechNote/config"
[D] 21:45:54.429340645.429 0x7f7a54920d00 () - data location: "/home/rm/.var/app/net.mkiol.SpeechNote/data/net.mkiol/dsnote"
[D] 21:45:54.429350003.429 0x7f7a54920d00 () - cache location: "/home/rm/.var/app/net.mkiol.SpeechNote/cache/net.mkiol/dsnote"
[D] 21:45:54.429361388.429 0x7f7a54920d00 () - settings file: "/home/rm/.var/app/net.mkiol.SpeechNote/config/net.mkiol/dsnote/settings.conf"
[D] 21:45:54.429369978.429 0x7f7a54920d00 () - platform: "xcb"
[D] 21:45:54.429388765.429 0x7f7a54920d00 () - nvidia addon exists
[D] 21:45:54.429418378.429 0x7f7a54920d00 () - enforcing num threads: 0
[D] 21:45:54.467185329.467 0x7f7a54920d00 () - starting service: app-standalone
[D] 21:45:54.470350955.470 0x7f7a54920d00 () - mbrola dir: "/app/bin"
[D] 21:45:54.470392510.470 0x7f7a54920d00 () - espeak dir: "/app/bin"
[D] 21:45:54.470607133.470 0x7f7a4a000680 loop:88 - py executor loop started
[D] 21:45:54.470654834.470 0x7f7a4a000680 set_env:84 - set env: PYTHONIOENCODING = utf-8
[D] 21:45:54.470671526.470 0x7f7a4a000680 set_env:84 - set env: HF_HUB_DISABLE_TELEMETRY = 1
[D] 21:45:54.470681164.470 0x7f7a4a000680 set_env:84 - set env: HF_HUB_OFFLINE = 1
[D] 21:45:54.470692967.470 0x7f7a4a000680 set_env:84 - set env: HF_HUB_LOCAL_DIR_AUTO_SYMLINK_THRESHOLD = 100000000000
[D] 21:45:54.470754009.470 0x7f7a4a000680 set_env:84 - set env: HF_HUB_CACHE = /home/rm/.var/app/net.mkiol.SpeechNote/cache/net.mkiol/dsnote
[D] 21:45:54.475602320.475 0x7f7a54920d00 () - module already unpacked: "rhvoicedata"
[D] 21:45:54.475661895.475 0x7f7a54920d00 () - module already unpacked: "rhvoiceconfig"
[D] 21:45:54.481438188.481 0x7f7a54920d00 () - module already unpacked: "espeakdata"
[D] 21:45:54.481947051.481 0x7f7a54920d00 () - default stt model not found: "fr_whisper_large"
[D] 21:45:54.481965490.481 0x7f7a54920d00 () - default tts model not found: "en"
[D] 21:45:54.481974709.481 0x7f7a54920d00 () - default mnt lang not found: "en"
[D] 21:45:54.481982740.481 0x7f7a54920d00 () - new default mnt lang: "en"
[D] 21:45:54.481994124.481 0x7f7a54920d00 () - service refresh status, new state: busy
[D] 21:45:54.482003763.482 0x7f7a54920d00 () - service state changed: unknown => busy
[D] 21:45:54.482012772.482 0x7f7a54920d00 () - delaying features availability
[D] 21:45:54.484953509.484 0x7f7a54920d00 () - runtime prefix: "/app"
[D] 21:45:54.485432271.485 0x7f7a54920d00 () - available styles: ("Default", "Fusion", "Imagine", "Material", "org.kde.breeze", "org.kde.desktop", "Plasma", "Universal")
[D] 21:45:54.485432271.485 0x7f7a4aa00680 () - config version: 81 81
[D] 21:45:54.485614417.485 0x7f7a54920d00 () - style paths: ("/usr/lib/qml/QtQuick/Controls.2")
[D] 21:45:54.485636417.485 0x7f7a54920d00 () - import paths: ("/usr/lib/qml", "/app/bin", "qrc:/qt-project.org/imports")
[D] 21:45:54.485646334.485 0x7f7a54920d00 () - library paths: ("/usr/share/runtime/lib/plugins", "/usr/lib/plugins", "/app/bin")
[D] 21:45:54.485655553.485 0x7f7a54920d00 () - using auto qt style
[D] 21:45:54.485665052.485 0x7f7a54920d00 () - XDG_CURRENT_DESKTOP: LXQt
[D] 21:45:54.485674969.485 0x7f7a54920d00 () - switching to style: "org.kde.breeze"
[D] 21:45:54.486005179.486 0x7f7a54920d00 () - desktop file: "net.mkiol.SpeechNote"
[D] 21:45:54.488390259.488 0x7f7a4a000680 libs_availability:62 - checking: torch cuda
[D] 21:45:54.535298455.535 0x7f7a4aa00680 () - models changed
[D] 21:45:55.773838130.773 0x7f7a54920d00 state_pa_callback:30 - pa authorizing
[D] 21:45:55.774146758.774 0x7f7a54920d00 state_pa_callback:33 - pa setting name
[D] 21:45:55.778651381.778 0x7f7a54920d00 state_pa_callback:36 - pa ready
[D] 21:45:55.779406784.779 0x7f793b400680 source_info_pa_callback:200 - pa source: alsa_output.pci-0000_06_00.6.analog-stereo.monitor Monitor of Family 17h/19h HD Audio Controller Stéréo analogique
[D] 21:45:55.779485635.779 0x7f793b400680 source_info_pa_callback:200 - pa source: alsa_input.pci-0000_06_00.6.analog-stereo Family 17h/19h HD Audio Controller Stéréo analogique
[D] 21:45:55.779545280.779 0x7f793b400680 source_info_pa_callback:200 - pa source: alsa_input.usb-LGE_AN-VC300-00.analog-stereo AN-VC300 Stéréo analogique
[D] 21:45:55.805910921.805 0x7f7a54920d00 () - starting app: app-standalone
[D] 21:45:55.806739308.806 0x7f7a54920d00 () - app service state: unknown => busy
[D] 21:45:55.806761658.806 0x7f7a54920d00 () - app busy: false => true
[D] 21:45:55.806774159.806 0x7f7a54920d00 () - app connected: false = > true
[W] 21:45:55.867300916.867 0x7f7a54920d00 ():36 - file:///usr/lib/qml/QtQuick/Controls.2/org.kde.breeze/ScrollView.qml:36:25: QML ScrollBar: Binding loop detected for property "x"
[W] 21:45:55.889205655.889 0x7f7a54920d00 ():36 - file:///usr/lib/qml/QtQuick/Controls.2/org.kde.breeze/ScrollView.qml:36:25: QML ScrollBar: Binding loop detected for property "x"
[W] 21:45:55.906185537.906 0x7f7a54920d00 ():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:372: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:363:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... }
[W] 21:45:55.946448545.946 0x7f7a54920d00 virtual QVariant ModelSource::item(int) const:81 - ModelSource: Invalid role -1 "color"
[W] 21:45:55.946582431.946 0x7f7a54920d00 virtual QVariant ModelSource::item(int) const:81 - ModelSource: Invalid role -1 "color"
[W] 21:45:55.961007798.961 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:55.961053614.961 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
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() { ... }
[W] 21:45:55.984905109.984 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:55.984944709.984 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:56.006349524.6 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:56.006395829.6 0x7f7a54920d00 ():154 - qrc:/qml/ScrollTextArea.qml:154:17: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
logger error: invalid format string
qrc:/qml/Translator.qml:30:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo() { ... }
[W] 21:45:56.049606419.49 0x7f7a54920d00 ():116 - qrc:/qml/MainToolBar.qml:116:29: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:56.049654190.49 0x7f7a54920d00 ():116 - qrc:/qml/MainToolBar.qml:116:29: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:56.052540241.52 0x7f7a54920d00 ():58 - qrc:/qml/MainToolBar.qml:58:29: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[W] 21:45:56.052570762.52 0x7f7a54920d00 ():58 - qrc:/qml/MainToolBar.qml:58:29: QML MenuItem: Binding loop detected for property "__reserveSpaceForIcon"
[D] 21:45:56.065493284.65 0x7f7a54920d00 onCompleted:168 - default font pixel size: 18
[D] 21:45:56.074143057.74 0x7f7a54920d00 () - default tts model not found: "en"
[D] 21:45:56.074182587.74 0x7f7a54920d00 () - default mnt lang not found: "en"
[D] 21:45:56.074191107.74 0x7f7a54920d00 () - new default mnt lang: "en"
[D] 21:45:56.074204587.74 0x7f7a54920d00 () - service refresh status, new state: busy
[D] 21:45:56.074219253.74 0x7f7a54920d00 () - service refresh status, new state: busy
[D] 21:45:56.558526686.558 0x7f7a54920d00 () - trying features availability update: false
/app/extensions/nvidia/lib/python3.11/site-packages/torch/cuda/init.py:141: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0
[D] 21:45:56.747167352.747 0x7f7a4a000680 libs_availability:70 - checking: coqui tts
[D] 21:45:56.747771409.747 0x7f7a4a000680 libs_availability:78 - checking: whisperspeech tts
[D] 21:45:56.748097568.748 0x7f7a4a000680 libs_availability:86 - checking: faster-whisper
[W] 21:45:56.864672439.864 0x7f7a54920d00 ():228 - qrc:/qml/Translator.qml:228:9: QML ColumnLayout (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "preferredWidth"
[D] 21:45:56.865761824.865 0x7f7a54920d00 () - stt models changed
[D] 21:45:56.907306350.907 0x7f7a54920d00 () - update listen
[D] 21:45:56.907336870.907 0x7f7a54920d00 () - app stt configured: false => true
[D] 21:45:56.910026528.910 0x7f7a54920d00 () - app active stt model: "" => "fr_whisper_large"
[D] 21:45:56.940791192.940 0x7f7a54920d00 () - update listen
[D] 21:45:56.940826322.940 0x7f7a54920d00 () - tts models changed
[D] 21:45:56.941202836.941 0x7f7a54920d00 () - update listen
[W] 21:45:56.941272538.941 0x7f7a54920d00 () - no available tts models for in mnt
[W] 21:45:56.941284271.941 0x7f7a54920d00 () - no available tts models for out mnt
[D] 21:45:56.941302570.941 0x7f7a54920d00 () - ttt models changed
[D] 21:45:56.941318563.941 0x7f7a54920d00 () - app ttt punctuation configured: false => true
[D] 21:45:56.947271415.947 0x7f7a54920d00 () - mnt langs changed
[D] 21:45:56.947331898.947 0x7f7a54920d00 () - update listen
[W] 21:45:56.947344399.947 0x7f7a54920d00 () - no available mnt langs
[W] 21:45:56.947351663.947 0x7f7a54920d00 () - no available mnt out langs
[D] 21:45:57.399495441.399 0x7f7a4a000680 libs_availability:94 - checking: transformers
[D] 21:45:57.399532107.399 0x7f7a4a000680 libs_availability:96 - checking: accelerate
[D] 21:45:57.465977005.465 0x7f7a54920d00 () - trying features availability update: false
[D] 21:45:58.465953608.465 0x7f7a54920d00 () - trying features availability update: false
[D] 21:45:58.747007345.747 0x7f7a4a000680 libs_availability:104 - checking: unikud
[D] 21:45:58.747573269.747 0x7f7a4a000680 libs_availability:115 - checking: mimic3 tts
[D] 21:45:59.465863652.465 0x7f7a54920d00 () - trying features availability update: false
[D] 21:45:59.695250208.695 0x7f7a4a000680 libs_availability:123 - checking: gruut
[D] 21:45:59.695291764.695 0x7f7a4a000680 libs_availability:127 - checking: gruut-de
[D] 21:45:59.695678195.695 0x7f7a4a000680 libs_availability:135 - checking: gruut-es
[D] 21:45:59.696052195.696 0x7f7a4a000680 libs_availability:143 - checking: gruut-fr
[D] 21:45:59.696540945.696 0x7f7a4a000680 libs_availability:151 - checking: gruut-it
[D] 21:45:59.696969840.696 0x7f7a4a000680 libs_availability:159 - checking: gruut-ru
[D] 21:45:59.697369402.697 0x7f7a4a000680 libs_availability:167 - checking: gruut-fa
[D] 21:45:59.697805351.697 0x7f7a4a000680 libs_availability:175 - checking: gruut-sw
[D] 21:45:59.698166640.698 0x7f7a4a000680 libs_availability:183 - checking: gruut-nl
[D] 21:45:59.698689193.698 0x7f7a4a000680 libs_availability:194 - checking: mecab
[D] 21:45:59.702043809.702 0x7f7a4a000680 libs_availability:196 - checking: unidic-lite
[D] 21:45:59.702903695.702 0x7f7a4a000680 libs_availability:203 - py libs availability: [coqui-tts=true, faster-whisper=true, mimic3-tts=true, whisperspeech-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] 21:46:00.466343042.466 0x7f7a54920d00 () - trying features availability update: true
[D] 21:46:00.466396541.466 0x7f7a54920d00 () - features availability ready
[W] 21:46:00.508077606.508 0x7f7a54920d00 has_hip:80 - failed to open whisper-hipblas lib: libwhisper-hipblas.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
[D] 21:46:00.539628614.539 0x7f7a54920d00 () - updating models using availability: tts_coqui, tts_mimic3, tts_mimic3_de, tts_mimic3_es, tts_mimic3_fr, tts_mimic3_it, tts_mimic3_ru, tts_mimic3_sw, tts_mimic3_fa, tts_mimic3_nl, tts_rhvoice, tts_whisperspeech, stt_fasterwhisper, stt_ds, stt_vosk, mnt_bergamot, ttt_hftc option_r,
[D] 21:46:00.539948207.539 0x7f7a54920d00 () - updating model using availability internal
[D] 21:46:00.542360874.542 0x7f7a54920d00 () - default tts model not found: "en"
[D] 21:46:00.542590303.542 0x7f7a54920d00 () - default mnt lang not found: "en"
[D] 21:46:00.542787116.542 0x7f7a54920d00 () - new default mnt lang: "en"
[D] 21:46:00.543046157.543 0x7f7a54920d00 () - service refresh status, new state: idle
[D] 21:46:00.543252259.543 0x7f7a54920d00 () - service state changed: busy => idle
[D] 21:46:00.543477916.543 0x7f7a54920d00 () - scan cuda: true
[D] 21:46:00.543672144.543 0x7f7a54920d00 () - scan hip: true
[D] 21:46:00.543860716.543 0x7f7a54920d00 () - scan opencl: true
[D] 21:46:00.544056621.544 0x7f7a54920d00 () - scan opencl legacy: false
[D] 21:46:00.544250570.544 0x7f7a54920d00 () - gpu feature flags: stt-whispercpp-cuda, stt-whispercpp-opencl, stt-fasterwhisper-cuda,
[D] 21:46:00.544446125.544 0x7f7a54920d00 add_hip_devices:523 - scanning for hip devices
[W] 21:46:00.544801967.544 0x7f7a54920d00 hip_api:314 - failed to open hip lib: libamdhip64.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
[D] 21:46:00.545060100.545 0x7f7a54920d00 add_cuda_devices:500 - scanning for cuda devices
[D] 21:46:00.545258729.545 0x7f7a54920d00 add_cuda_dev_devices:403 - scanning for cuda devices
[W] 21:46:00.603897955.603 0x7f7a54920d00 operator():413 - cuInit error: CUDA_ERROR_UNKNOWN (999)
[W] 21:46:00.603946006.603 0x7f7a54920d00 add_cuda_devices:507 - cuda init error
[D] 21:46:00.603959555.603 0x7f7a54920d00 add_cuda_runtime_devices:366 - scanning for cuda runtime devices
[D] 21:46:00.604048882.604 0x7f7a54920d00 add_cuda_runtime_devices:375 - cuda version: driver=12050, runtime=12040
[W] 21:46:00.604058450.604 0x7f7a54920d00 add_cuda_runtime_devices:380 - cudaGetDeviceCount error: 999
[D] 21:46:00.604227955.604 0x7f7a54920d00 add_opencl_devices:563 - scanning for opencl devices
[D] 21:46:00.665345430.665 0x7f7a54920d00 add_opencl_devices:580 - opencl number of platforms: 1
[D] 21:46:00.665378814.665 0x7f7a54920d00 add_opencl_devices:605 - opencl platform: 0, name=Clover, vendor=Mesa
[D] 21:46:00.665393480.665 0x7f7a54920d00 add_opencl_devices:619 - opencl number of devices: 0
[W] 21:46:00.665564312.665 0x7f7a54920d00 () - *********************************************
[W] 21:46:00.665576465.665 0x7f7a54920d00 () - Most likely, NVIDIA kernel module has not been fully initialized. Try executing 'nvidia-modprobe -c 0 -u' before running Speech Note
[W] 21:46:00.665584077.665 0x7f7a54920d00 () - *********************************************
[D] 21:46:00.665815531.665 0x7f7a54920d00 () - service refresh status, new state: idle
[D] 21:46:00.666835284.666 0x7f7a54920d00 () - app service state: busy => idle
[W] 21:46:00.674023069.674 0x7f7a54920d00 () - no available mnt langs
[W] 21:46:00.674041297.674 0x7f7a54920d00 () - no available mnt out langs
[W] 21:46:00.674050796.674 0x7f7a54920d00 () - no available tts models for in mnt
[W] 21:46:00.674058339.674 0x7f7a54920d00 () - no available tts models for out mnt
[W] 21:46:00.674065462.674 0x7f7a54920d00 () - invalid task, reseting task state
[D] 21:46:00.674492542.674 0x7f7a54920d00 () - app busy: true => false
[D] 21:46:00.675313736.675 0x7f7a54920d00 () - stt models changed
[D] 21:46:00.675525494.675 0x7f7a54920d00 () - update listen
[D] 21:46:00.675601202.675 0x7f7a54920d00 () - tts models changed
[D] 21:46:00.675845507.675 0x7f7a54920d00 () - update listen
[W] 21:46:00.676103640.676 0x7f7a54920d00 () - no available tts models for in mnt
[W] 21:46:00.676122917.676 0x7f7a54920d00 () - no available tts models for out mnt
[D] 21:46:00.676136955.676 0x7f7a54920d00 () - ttt models changed
[D] 21:46:00.682460803.682 0x7f7a54920d00 () - mnt langs changed
[D] 21:46:00.682502987.682 0x7f7a54920d00 () - update listen
[W] 21:46:00.682527851.682 0x7f7a54920d00 () - no available mnt langs
[W] 21:46:00.682536371.682 0x7f7a54920d00 () - no available mnt out langs

Could you please help me to fix it?

@hista

Can you check if you have the /dev/nvidia-uvm device file in your system? It is used by CUDA to communicate with the kernel driver. This "CUDA_ERROR_UNKNOWN (999)" problem occurs because /dev/nvidia-uvm is missing. Normally, CUDA runtime calls nvidia-modprobe to create that device file automatically. For unknown to me reason, this doesn't work always with Flatpak apps, but you should also be able to create this device file by calling nvidia-modprobe -c 0 -u manually.

Here is more details about it and different method how to handle this problem: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile-verifications

From my system where nvidia cuda driver has been initialized properly:

$ ls /dev | grep nvidia
nvidia0
nvidiactl
nvidia-modeset
nvidia-uvm
nvidia-uvm-tools