pop-os / gnome-shell

Pop!_OS fork of https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-shell
GNU General Public License v2.0
25 stars 4 forks source link

Screencast only works once per session #134

Open BarbzYHOOL opened 11 months ago

BarbzYHOOL commented 11 months ago

Same specs as here https://github.com/pop-os/pop/issues/3087 or https://github.com/pop-os/pop/issues/3091#event-9952528522 (not gonna rewrite everything for it to be closed immediately while not fixed)

Screencast works ONCE, then after you click anywhere on the red bar (not on the big square, but anywhere), it stops and saves the file, fine. Then cannot relaunch screencast most likely because it's running forever and I have to kill the process manually

jacobgkau commented 11 months ago

I can replicate this issue, it's been happening since at least July 7th when I noted it during regression testing for https://github.com/pop-os/pipewire/pull/54.

Then cannot relaunch screencast most likely because it's running forever and I have to kill the process manually

What process are you referring to?

BarbzYHOOL commented 10 months ago

gnome-screencast if i recall (it's by default on popos)

jacobgkau commented 10 months ago

gnome-screencast if i recall

There is no gnome-screencast process while running a screen recording session (took a photo since I couldn't screenshot while it was already running):

MVIMG_20230811_165719

However, I do see that killing the gjs process (which is taking up CPU while the screen recording is running) allows me to start a second one without restarting the entire shell, as you described.

(it's by default on popos)

You may have been thinking of gnome-screenshot, which is not installed by default in Pop!_OS (since the functionality was moved to gnome-shell.)

BarbzYHOOL commented 10 months ago

/usr/bin/gjs right

in stacer it says /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Screencast

i never installed this, i know it because i wanted to install a better one then i discovered this thing already existed by default

bruniss commented 4 months ago

this doesnt affect just the built-in screencast. you can't record using any application while this is happening. is there a plan in place to fix this? It's pretty limiting to not be able to record any video without restarting your pc every single time.

happy with everything else in pop_os so far, but being unable to screencast more than once per restart is honestly going to drive me away from this os.

oralian commented 4 months ago

Are there any workarounds to this issue?

rhrgrt commented 4 months ago

to respond to @aurelien-m and @bruniss:

being unable to screencast more than once per restart is honestly going to drive me away from this os.

and

Are there any workarounds to this issue?

using sudo killall gjs works. I haven't used other screencast software but I ran into this issue tonight and killing the gjs process worked to get the capture working appropriately again without a system restart.

jacobgkau commented 3 months ago

this doesnt affect just the built-in screencast. you can't record using any application while this is happening.

This is also incorrect in general. I just replicated the GNOME Shell recording issue, and after doing that, both SimpleScreenRecorder and OBS Studio can still record the screen just fine. OBS can still pick it up both via XSHM and PipeWire.

is there a plan in place to fix this?

Almost all internal development effort is currently on COSMIC Epoch, which will obviously not be affected by a GNOME Shell bug (if this is the first you're hearing of it, it's going to replace GNOME as the default desktop environment in Pop!_OS). When 24.04 comes out later this year, it will be shipping with that.

(At this time, COSMIC Epoch does not include a built-in screencasting tool, only screenshots, so you will still need to use a third-party application like OBS or Kooha.)

perkrlsn commented 3 months ago

(At this time, COSMIC Epoch does not include a built-in screencasting tool, only screenshots, so you will still need to use a third-party application like OBS or Kooha.)

That's unfortunate since the simplicity of the built in one is far superior to that of Kooha. OBS is obviously the "correct" choice for more advanced users / use cases.

However, sometimes you just want to do a quicks screen recording of a feature you're building or what not.

Please consider adding a simple, fast screen recorder to Cosmic DE.

sommeeeer commented 2 months ago

same for me today, any work arounds? i have to manually kill the process to be able to screencast again.

jacobgkau commented 1 month ago

That's unfortunate since the simplicity of the built in one is far superior to that of Kooha. OBS is obviously the "correct" choice for more advanced users / use cases.

Please consider adding a simple, fast screen recorder to Cosmic DE.

I would agree that OBS is too complex for most beginners who just want a quick screencast.

With regards to implementation, COSMIC Epoch uses the standard XDG portals to facilitate screen sharing/recording. That means anyone can write up an app with as simple of an interface as they'd like (e.g. with a hard-coded set of video quality/format parameters that can't be changed). If you bind that to a hotkey, then it's not like it would be very distinguishable from a built-in utility, anyway. Someone could probably do this as an applet so it has start/stop controls in the panel if they wanted to, as well.

Good places for COSMIC Epoch feature requests would be the main repo at https://github.com/pop-os/cosmic-epoch or the screenshot utility repo at https://github.com/pop-os/cosmic-screenshot. The UX team may want to chime in on anything that's going to be built-in, but I can't imagine too much resistance to simply having the functionality.

same for me today, any work arounds? i have to manually kill the process to be able to screencast again.

The workarounds are to either kill the process or to use a different app. SimpleScreenRecorder, Kooha, OBS, and many other options exist for GNOME on X11; I know at least SimpleScreenRecorder allows starting/stopping with a key combination.

ATOMICMAN007 commented 1 month ago

While this issue still persists, I have found on the internet that killing the screen-cast process is a workaround. People say killing gjs works for them but gjs is also responsible for Notifications and Screensaver and I have no idea what the effects would be if I stop those gjs processes. So I've written a line of shell command which kills the ScreenCast process specifically.

kill (ps aux | grep gjs | grep Screencast | grep -v 'grep' | awk '{print $2}')

In the above command, ps aux gives a list of processes running which is further filtered using grep and filters out lines where the grep word appears (using grep -v 'grep'). Finally, we use awk to specifically print out the ID of the process and end it using kill. I've written a command in fish shell's config for this which makes the workaround a bit more convenient for me.

Don't copy paste any code unless and until you fully understand what it does and what are the possible outcomes. I hope it helps others and saves a little bit of their time trying to find an actual fix for this since I spent hours trying to find one.

JOmarCuenca commented 2 weeks ago

This also happened to me today! ☝🏼

kiwifellows commented 1 week ago

-1 happening to me as well

jacobgkau commented 1 week ago

While the participation is appreciated, this is a known issue. +1 comments are not useful at this stage.

kiwifellows commented 1 week ago

While the participation is appreciated, this is a known issue. +1 comments are not useful at this stage.

Let us know how we can help with this issue being resolved... e.g. development wise are there any areas already been identified in the source code that can be looked at? Or external libraries that can be investigated?