Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freezing on record in Ubuntu 21.04 and derivatives #120

Closed
spxak1 opened this issue Sep 23, 2021 · 27 comments
Closed

Freezing on record in Ubuntu 21.04 and derivatives #120

spxak1 opened this issue Sep 23, 2021 · 27 comments
Labels
bug Something isn't working

Comments

@spxak1
Copy link

spxak1 commented Sep 23, 2021

The app completely freezes, creates the (empty) files, then (on multiple clicks) offers to wait or kill.

I've tried all possible combinations of file format, microphone/sounds/cursor, window, selection full screen.

NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os
Linux weywot 5.13.0-7614-generic #14~1631647151~21.04~930e87c-Ubuntu SMP Fri Sep 17 00:24:58 UTC  x86_64 x86_64 x86_64 GNU/Linux
otheos@weywot:/etc$ 

Visible output on journald is only this (excuse if irrelevant):

Sep 23 19:34:50 weywot systemd[4948]: Started Application launched by gnome-shell.
Sep 23 19:34:50 weywot systemd[4948]: Started app-flatpak-io.github.seadve.Kooha-108325.scope.
Sep 23 19:34:50 weywot systemd[4948]: app-gnome-io.github.seadve.Kooha-108325.scope: Succeeded.
Sep 23 19:34:56 weywot xdg-desktop-por[15456]: Failed to create foreign window for XID 2036930432
Sep 23 19:34:56 weywot xdg-desktop-por[15456]: Failed to associate portal window with parent window x11:79691780
...
Sep 23 19:35:01 weywot dbus-daemon[4970]: [session uid=1000 pid=4970] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.4' (uid=1000 pid=4963 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Sep 23 19:35:01 weywot systemd[4948]: Starting Tracker metadata database store and lookup manager...
Sep 23 19:35:01 weywot dbus-daemon[4970]: [session uid=1000 pid=4970] Successfully activated service 'org.freedesktop.Tracker1'
Sep 23 19:35:01 weywot systemd[4948]: Started Tracker metadata database store and lookup manager.
...
Sep 23 19:35:31 weywot tracker-store[108434]: OK
Sep 23 19:35:31 weywot systemd[4948]: tracker-store.service: Succeeded.
Sep 23 19:36:00 weywot systemd[4948]: app-flatpak-io.github.seadve.Kooha-108325.scope: Succeeded.

Last line at "wait or kill" output.

Open to suggestions. Thank you.

@SeaDve
Copy link
Owner

SeaDve commented Sep 23, 2021

you can enable logs through RUST_LOG=kooha=debug

@SeaDve
Copy link
Owner

SeaDve commented Sep 23, 2021

btw, does 1.2.1 works?

@SeaDve SeaDve added the Needs info Further information is requested label Sep 24, 2021
@spxak1
Copy link
Author

spxak1 commented Sep 24, 2021

btw, does 1.2.1 works?
Yes. it did. I will need to get back to it as I use Kooha daily (thank you very much by the way).

@spxak1
Copy link
Author

spxak1 commented Sep 24, 2021

you can enable logs through RUST_LOG=kooha=debug

otheos@weywot:~$ RUST_LOG=kooha=debug flatpak run io.github.seadve.Kooha
 INFO  kooha::application > Kooha (io.github.seadve.Kooha)
 INFO  kooha::application > Version: 2.0.0 ()
 INFO  kooha::application > Datadir: /app/share/kooha
 DEBUG kooha::backend::recorder > is_show_pointer: false
 DEBUG kooha::backend::recorder > is_selection_mode: false
 INFO  kooha::backend::screencast_portal > ScreenCastProxy created
 INFO  kooha::backend::screencast_portal > Session created
 INFO  kooha::backend::screencast_portal > Select sources window showed
 INFO  kooha::backend::screencast_portal > Screencast session started
 INFO  kooha::backend::screencast_portal > Ready for pipewire stream
 DEBUG kooha::backend::recorder          > pulse_server_version: pulseaudio version 14.2
 DEBUG kooha::backend::recorder          > PipelineBuilder { is_record_speaker: false, is_record_mic: false, framerate: 30, file_path: "/home/otheos/Videos/Kooha-09-24-2021-20-09-26.webm", fd: 19, streams: [Stream { pipewire_node_id: 36, position: Some((0, 0)), size: Some((2560, 1440)) }], speaker_source: Some("alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"), mic_source: Some("alsa_input.pci-0000_00_1f.3.analog-stereo"), coordinates: None, actual_screen: None }
 DEBUG kooha::backend::pipeline_builder  > is_use_vaapi: false
 DEBUG kooha::backend::pipeline_builder  > pipeline_string: queue name=queue0 ! videorate ! video/x-raw, framerate=30/1 ! videoconvert chroma-mode=GST_VIDEO_CHROMA_MODE_NONE dither=GST_VIDEO_DITHER_NONE matrix-mode=GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY n-threads=8 ! queue ! vp8enc max_quantizer=17 cpu-used=16 cq_level=13 deadline=1 static-threshold=100 keyframe-mode=disabled buffer-size=20000 threads=8 ! queue ! webmmux name=mux ! filesink name=filesink location="/home/otheos/Videos/Kooha-09-24-2021-20-09-26.webm" pipewiresrc fd=19 path=36 do-timestamp=true keepalive-time=1000 resend-last=true ! video/x-raw, max-framerate=30/1 ! queue0. 

At that point it offered to wait or exit and exited without further output.

@SeaDve SeaDve removed the Needs info Further information is requested label Sep 24, 2021
@SeaDve
Copy link
Owner

SeaDve commented Sep 24, 2021

Thanks! Currently, I'm not exactly sure what is causing it, but I'm suspecting pipewire. For the meanwhile, you can downgrade by running the following:

flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha

This should downgrade it to 1.2.1

@SeaDve SeaDve added the bug Something isn't working label Sep 24, 2021
@SeaDve SeaDve changed the title 2.0 not working (Pop 21.04) Freezing on Pop 21.04 Sep 24, 2021
@SeaDve SeaDve changed the title Freezing on Pop 21.04 Freezing on record Pop 21.04 Sep 25, 2021
@spxak1
Copy link
Author

spxak1 commented Sep 25, 2021

Thanks! Currently, I'm not exactly sure what is causing it, but I'm suspecting pipewire. For the meanwhile, you can downgrade by running the following:

flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha

This should downgrade it to 1.2.1

Thank you for your help. I downgraded successfully. Thanks for the method as I coulnd't find it. 1.2.1 works fine.

I tested Fedora 35, and 2.0 works great. Looking forward to 2.0 on Pop (maybe 21.10, once it's out along with Ubuntu).

I will do some testing on Ubuntu 21.04 and 21.10 beta later and report back.

Thanks again.

@spxak1
Copy link
Author

spxak1 commented Sep 25, 2021

I can confirm, the same issue exists in Ubuntu 21.04.

I can confirm, the same issue exists in Ubuntu 21.10 beta.

Everything works fine on latest Manjaro and Fedora 34.

@SeaDve
Copy link
Owner

SeaDve commented Sep 25, 2021

Thanks for testing! I think this may be an issue within Ubuntu, since it is also the upstream of Pop. I'm still suspecting pipewire

@SeaDve SeaDve changed the title Freezing on record Pop 21.04 Freezing on record in Ubuntu 21.04 and derivatives Sep 25, 2021
@Robertschv
Copy link
Contributor

Running Ubuntu 21.04, same issue here.
I thought the problem was my Graphics cards, I am using a Laptop with Nvidia Optimus, I tried using Intel only, and Nvidia Only but no luck.

@vijay-prema
Copy link

I have a similar issue in Ubuntu 21.10 final (wayland). It freezes for about 30 seconds, then shows
image

Downgrading to the older version with less functionality works.

@spxak1
Copy link
Author

spxak1 commented Oct 20, 2021

This is still not fixed in Pop 21.04 and 21.10 beta (and I guess the equivalent Ubuntu and derivatives). The old version still works.

Just to update for 2.0.1 (which admittedly did not claim to fix the issue).

@vijay-prema
Copy link

Oh WOW I got it to work! I suspect the problem is these newer versions of Ubuntu come with their own pipewire version which is out of date (0.3.32), so you need to install the latest pipewire from the ppa for kooha to work.

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt install pipewire

I already had the old pipewire installed (no need to uninstall it), I just ran the above 3 commands, reboot then it all works.

@spxak1
Copy link
Author

spxak1 commented Oct 20, 2021

Oh WOW I got it to work! I suspect the problem is these newer versions of Ubuntu come with their own pipewire version which is out of date (0.3.32), so you need to install the latest pipewire from the ppa for kooha to work.

sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt install pipewire

I already had the old pipewire installed (no need to uninstall it), I just ran the above 3 commands, reboot then it all works.

Thanks. I will try it on my test box as it asks to also upgrade a number of other packages and I'm not comfortable with mixing ubuntu, pop and debian packages at the same time.

Thanks again.

@mmstick
Copy link

mmstick commented Oct 21, 2021

I'd propose checking for the Pipewire version and giving a known compatible stream if the version is the one found in Ubuntu.

@SeaDve
Copy link
Owner

SeaDve commented Oct 21, 2021

I have a similar issue in Ubuntu 21.10 final (wayland). It freezes for about 30 seconds, then shows image

Downgrading to the older version with less functionality works.

Hi, can you show the full logs with this, reproducing the error. I have never seen that error message.

Including PIPEWIRE_DEBUG=3 would help on determining pipewire version too

@alexpk2808
Copy link

Big thanks to @SeaDve for solving this issue!

I had a bit of a hard time to find a screen recorder that works on Debian 11, and downgrading Kooha made it work.

👍 👍👍:-D

@spxak1
Copy link
Author

spxak1 commented Oct 30, 2021

Big thanks to @SeaDve for solving this issue!

I had a bit of a hard time to find a screen recorder that works on Debian 11, and downgrading Kooha made it work.

+1 +1+1:-D

Hi, could you please share the solution? Thanks.

@alexpk2808
Copy link

Hi @spxak1
Basically, I have installed Kooha a few days ago - the latest version - but the programme didn't work. I tried to downgrade it as @SeaDve wrote on 25 Sept

Thanks! Currently, I'm not exactly sure what is causing it, but I'm suspecting pipewire. For the meanwhile, you can downgrade by running the following:
flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha
This should downgrade it to 1.2.1

Kooha version 1.2.1 works fine on my Debian 11.

The only thing still remaining is that the software updates will reinstall the latest Kooha version, which will break the programme again until the the latest version is corrected.

Btw, can anyone help with a way to lock a programme installed with Flatpak in given version for the time being ? Maybe there is something similar to apt-mark hold on Flatpak but I didn't find this.

Many thanks!

@SeaDve
Copy link
Owner

SeaDve commented Oct 31, 2021

Btw, can anyone help with a way to lock a programme installed with Flatpak in given version for the time being ? Maybe there is something similar to apt-mark hold on Flatpak but I didn't find this.

Try flatpak mask io.github.seadve.Kooha. This should prevent Kooha from being included in the updates

@alexpk2808
Copy link

Hi @SeaDve, just read your reply, many thanks for the info, will try that!

@epidemian
Copy link

Hey, just found out about Kooha when looking for screen recorders supporting wayland. Thanks so much for the project! 💚 💚

I also got this issue when running Kooha in Ubuntu 21.10, and can confirm that it got fixed after reverting to an older version with flatpak update --commit=e52aeb30b4d9f97436de184b6703ae83c48468880d95f0b74916cd6fca3e7c2a io.github.seadve.Kooha

@Maher4Ever
Copy link

The same issue also happens on Ubuntu 21.10.

@maks
Copy link

maks commented Dec 16, 2021

Just wanted to confirm that moving to upstream version of pipewire on my Ubuntu 21.10 install per the earlier comment worked for me to.

@Trevoke
Copy link

Trevoke commented Dec 27, 2021

Just wanted to confirm that moving to upstream version of pipewire on my Ubuntu 21.10 install per the earlier comment worked for me to.

This also worked for me.

@Mayank-9018
Copy link

I have a similar issue in Ubuntu 21.10 final (wayland). It freezes for about 30 seconds, then shows image
Downgrading to the older version with less functionality works.

Hi, can you show the full logs with this, reproducing the error. I have never seen that error message.

Including PIPEWIRE_DEBUG=3 would help on determining pipewire version too

I have the same error message and here are the logs:

INFO  kooha::application > Kooha (io.github.seadve.Kooha)
 INFO  kooha::application > Version: 2.0.1 ()
 INFO  kooha::application > Datadir: /app/share/kooha
 DEBUG kooha::backend::recorder > is_show_pointer: true
 DEBUG kooha::backend::recorder > is_selection_mode: false
 INFO  kooha::backend::screencast_portal > ScreenCastProxy created
 DEBUG kooha::backend::screencast_portal > available_cursor_modes: BitFlags<CursorMode>(0b111, Hidden | Embedded | Metadata)
 DEBUG kooha::backend::screencast_portal > available_source_types: BitFlags<SourceType>(0b11, Monitor | Window)
 INFO  kooha::backend::screencast_portal > Session created
 INFO  kooha::backend::screencast_portal > Select sources window showed
 INFO  kooha::backend::screencast_portal > Screencast session started
 INFO  kooha::backend::screencast_portal > Ready for pipewire stream
 DEBUG kooha::backend::recorder          > pulse_server_version: pulseaudio version 15.0
 DEBUG kooha::backend::recorder          > PipelineBuilder { is_record_speaker: false, is_record_mic: false, framerate: 30, file_path: "/home/mayank-pop/Videos/kooha/Kooha-01-27-2022-16-34-49.mkv", fd: 20, streams: [Stream { pipewire_node_id: 35, position: Some((0, 0)), size: Some((1920, 1080)) }], speaker_source: Some("alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"), mic_source: Some("alsa_input.pci-0000_00_1f.3.analog-stereo"), coordinates: None, actual_screen: None }
 DEBUG kooha::backend::pipeline_builder  > is_use_vaapi: false
 DEBUG kooha::backend::pipeline_builder  > pipeline_string: queue name=queue0 ! videorate ! video/x-raw, framerate=30/1 ! videoconvert chroma-mode=GST_VIDEO_CHROMA_MODE_NONE dither=GST_VIDEO_DITHER_NONE matrix-mode=GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY n-threads=8 ! queue ! vp8enc max_quantizer=17 cpu-used=16 cq_level=13 deadline=1 static-threshold=100 keyframe-mode=disabled buffer-size=20000 threads=8 ! queue ! matroskamux name=mux ! filesink name=filesink location="/home/mayank-pop/Videos/kooha/Kooha-01-27-2022-16-34-49.mkv" pipewiresrc fd=20 path=35 do-timestamp=true keepalive-time=1000 resend-last=true ! video/x-raw, max-framerate=30/1 ! queue0. 
[I][07478.952467][      pipewire.c:  571 pw_init()] version 0.3.35
[I][07484.272248][          conf.c:  326 conf_load()] config 0x55f77fb34c60: loading config '/usr/share/pipewire/client.conf'
[I][07484.272366][       context.c:  384 pw_context_new()] context 0x55f77fb30730: parsed context.properties section
[I][07484.273207][       context.c:  478 pw_context_new()] context 0x55f77fb30730: parsed 2 context.spa-libs items
[I][07484.273637][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-protocol-native
[I][07484.274085][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-client-node
[I][07484.274325][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-client-device
[I][07484.274588][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-adapter
[I][07484.274833][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-metadata
[I][07484.275133][          conf.c:  419 load_module()] config 0x55f77fb30730: loaded module libpipewire-module-session-manager
[I][07484.275165][       context.c:  482 pw_context_new()] context 0x55f77fb30730: parsed 6 context.modules items
[I][07484.275185][       context.c:  487 pw_context_new()] context 0x55f77fb30730: parsed 0 context.objects items
[I][07484.275205][       context.c:  490 pw_context_new()] context 0x55f77fb30730: parsed 0 context.exec items
[I][07484.275268][       context.c:  244 context_set_freewheel()] context 0x55f77fb30730: exit freewheel
[I][07484.275296][       context.c:  248 context_set_freewheel()] context 0x55f77fb30730: freewheel error:Operation not supported
[I][07484.275323][ impl-metadata.c:  196 impl_set_property()] metadata 0x55f77fb790e0: add id:0 key:log.level type: value:0
[I][07484.275343][ impl-metadata.c:  196 impl_set_property()] metadata 0x55f77fb790e0: add id:0 key:clock.min-quantum type: value:32
[I][07484.275360][ impl-metadata.c:  196 impl_set_property()] metadata 0x55f77fb790e0: add id:0 key:clock.max-quantum type: value:8192
[I][07484.275377][ impl-metadata.c:  196 impl_set_property()] metadata 0x55f77fb790e0: add id:0 key:clock.force-quantum type: value:0
[I][07484.275394][ impl-metadata.c:  196 impl_set_property()] metadata 0x55f77fb790e0: add id:0 key:clock.force-rate type: value:0
0:00:25.567670422     2 0x7f5ad009dcc0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<pipewiresrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
[E][07484.277469][        stream.c:  365 stream_set_state()] stream 0x55f77fb8d3b0: error wrong resource type/version
0:00:25.569137323     2 0x55f77fa1cc10 WARN             pipewiresrc gstpipewiresrc.c:529:on_state_changed:<pipewiresrc0> error: stream error: wrong resource type/version
[W][07484.277562][gstpipewirecore.:   42 on_core_error()] error id:2 seq:2 res:-71 (Protocol error): wrong resource type/version
[W][07484.277591][     impl-node.c:  388 suspend_node()] node 0x7f5a8400a190: error unset format input: Input/output error
[I][07484.277608][     impl-node.c:  358 node_update_state()] (kooha-0) creating -> suspended
[W][07484.277627][gstpipewirecore.:   42 on_core_error()] error id:0 seq:3 res:-2 (No such file or directory): unknown resource 2 op:2
[W][07484.277644][gstpipewirecore.:   42 on_core_error()] error id:0 seq:4 res:-2 (No such file or directory): unknown resource 2 op:3
 ERROR kooha::backend::recorder::imp     > Failed to set pipeline state to Playing: StateChangeError
 INFO  kooha::backend::recorder          > Pipeline state set from Null -> Ready
0:00:55.568758532     2 0x55f77e6fae00 WARN               structure gststructure.c:2069:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
 ERROR kooha::backend::recorder          > Error from record bus: Error { domain: gst-resource-error-quark, code: 1, message: "stream error: wrong resource type/version" } (debug Error(Message { ptr: 0x7f5acc005040, type: "error", seqnum: 67, src: Some("pipewiresrc0"), structure: Some(GstMessageError, gerror=(GError)NULL, debug=(string)"../src/gst/gstpipewiresrc.c\(529\):\ on_state_changed\ \(\):\ /GstPipeline:pipeline0/GstPipeWireSrc:pipewiresrc0";) }))
[I][07514.278514][     impl-node.c: 1736 pw_impl_node_destroy()] (kooha-0) destroy
 INFO  kooha::backend::screencast_portal > Session closed

@JoakimLofgren
Copy link

Latest version of Kooha prompts for this:

Required runtime for io.github.seadve.Kooha/x86_64/stable (runtime/org.gnome.Platform/x86_64/41) found in remote flathub

But Ubuntu 21.10 has Gnome 40, maybe that also causes some issues?

❯ gnome-shell --version
GNOME Shell 40.5

The downgraded version seems to depend on Gnome 40 instead of 41:

Required runtime for io.github.seadve.Kooha/x86_64/stable (runtime/org.gnome.Platform/x86_64/40) found in remote flathub

Downgraded version works fine for me as well. 👍

@SeaDve
Copy link
Owner

SeaDve commented Aug 15, 2022

Closing this in favor of #129, and also see #129 (comment)

@SeaDve SeaDve closed this as completed Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests