gnome-shell icon indicating copy to clipboard operation
gnome-shell copied to clipboard

Screencast only works once per session

Open BarbzYHOOL opened this issue 2 years ago • 21 comments
trafficstars

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

BarbzYHOOL avatar Aug 10 '23 23:08 BarbzYHOOL

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?

jacobgkau avatar Aug 11 '23 00:08 jacobgkau

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

BarbzYHOOL avatar Aug 11 '23 22:08 BarbzYHOOL

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.)

jacobgkau avatar Aug 11 '23 23:08 jacobgkau

/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

BarbzYHOOL avatar Aug 12 '23 22:08 BarbzYHOOL

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.

bruniss avatar Mar 04 '24 14:03 bruniss

Are there any workarounds to this issue?

montmejat avatar Mar 07 '24 14:03 montmejat

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.

rhrgrt avatar Mar 08 '24 10:03 rhrgrt

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.)

jacobgkau avatar Mar 08 '24 16:03 jacobgkau

(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.

perkrlsn avatar Apr 04 '24 06:04 perkrlsn

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

sommeeeer avatar May 02 '24 15:05 sommeeeer

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.

jacobgkau avatar May 09 '24 23:05 jacobgkau

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.

itsfaizankhan avatar May 18 '24 18:05 itsfaizankhan

This also happened to me today! ☝🏼

JOmarCuenca avatar Jun 19 '24 23:06 JOmarCuenca

-1 happening to me as well

kiwifellows avatar Jun 26 '24 20:06 kiwifellows

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

jacobgkau avatar Jun 26 '24 20:06 jacobgkau

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?

kiwifellows avatar Jun 26 '24 22:06 kiwifellows

I'm also having issues on this front. Running the gnome screen recorder for video starts it once, but doesn't record anything. end up with a 0 byte file. won't run again until I pkill gjs. Other apps won't work either. I've used peek in the past, and it's been great. Won't even start. Neither will gnome extensions for screen recording. It almost looks like every tool used for screen recording is broken for me on pop

         /////////////////////            ------- 
      ///////*767////////////////         OS: Pop!_OS 22.04 LTS x86_64 
    //////7676767676*//////////////       Host: 
   /////76767//7676767//////////////      Kernel: 6.9.3-76060903-generic 
  /////767676///*76767///////////////     Uptime:
 ///////767676///76767.///7676*///////    Packages: 
/////////767676//76767///767676////////   Shell: bash 5.1.16 
//////////76767676767////76767/////////   Resolution: 
///////////76767676//////7676//////////   DE: GNOME 42.9 
////////////,7676,///////767///////////   WM: Mutter 
/////////////*7676///////76////////////   WM Theme: Pop 
///////////////7676////////////////////   Theme: Pop-dark [GTK2/3] 
 ///////////////7676///767////////////    Icons: Yaru [GTK2/3] 
  //////////////////////'////////////     Terminal: gnome-terminal 
   //////.7676767676767676767,//////      CPU: AMD Ryzen 7 6800U with Radeon Gr 
    /////767676767676767676767/////       GPU: AMD ATI 76:00.0 Rembrandt 
      ///////////////////////////         GPU: AMD ATI Radeon RX 6700/6700 XT / 
         /////////////////////            Memory: 7921MiB / 28805MiB 

31337-4554551n avatar Jul 19 '24 07:07 31337-4554551n

I also liked Peek but ditched it also because it isn't maintained anymore. Right now I use SimpleScreenRecorder which works great for me.

dirkk0 avatar Jul 19 '24 13:07 dirkk0

Interestingly enough, simplescreenrecorder works. but peek, gnome screenshot tool, and the gnome extension for recording screens don't. So simplescreenrecorder must be doing something differently. Hopefully those that have the skills to investigate this can use these findings as a data point

31337-4554551n avatar Jul 20 '24 11:07 31337-4554551n

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.

This does indeed work, but the command is not correctly using the output of the ps command. Here is a small correction:

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

alexandrosmagos avatar Sep 18 '24 21:09 alexandrosmagos