So I just had a bit of an adventure here today with GNOME3 and trying to get screen recording to work. I run Debian 12 on all of my systems, and the screen recording works fine on my desktop but not on my laptop – the option to record the screen would not show up when pressing the ‘Print Screen’ button.
TLDR: Make sure that:
* You’re running Wayland(may not be needed?)
* The gstreamer element vp8enc
exists(check with gst-inspect-1.0)
* Pipewire is being used(may not be needed?)
Anyway, the important post that I found was this: https://discourse.gnome.org/t/screen-recording-does-not-work/12829/6
The relevant part:
Yes, it’s by design; and, no: the button is hidden if the shell cannot create the following GStreamer pipeline:
static canScreencast() { const elements = [ 'pipewiresrc', 'filesink', ...DEFAULT_PIPELINE.split('!').map(e => e.trim().split(' ').at(0)), ]; return Gst.init_check(null) && elements.every(e => Gst.ElementFactory.find(e) != null); }with the
DEFAULT_PIPELINE
being:const DEFAULT_PIPELINE = 'videoconvert chroma-mode=GST_VIDEO_CHROMA_MODE_NONE dither=GST_VIDEO_DITHER_NONE matrix-mode=GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY n-threads=%T ! queue ! vp8enc cpu-used=16 max-quantizer=17 deadline=1 keyframe-mode=disabled threads=%T static-threshold=1000 buffer-size=20000 ! queue ! webmmux';I would recommend asking on a postmarketOS forum how to ensure that pipewire is running and can be used by GStreamer.
On my desktop(which was working), I found this plugin to be in the /lib/x86_64-linux-gnu/gstreamer-1.0/libgstvpx.so
file, but inspecting on my laptop did not find the plugin at all. This was due to the blacklist of the gstreamer module for some reason. In order to fix the blacklist, I had to delete my ~/.cache/gstreamer-1.0/registry.x86_64.bin
file. Running gst-inspect-1.0 rebuilds the cache, so that fixed at least one part of it.
Now that the screen recording works, the next thing is to make sure that Totem(the default GNOME video player) can play it – trying to play results in it throwing up an error about the vaapipostproc
element not being found. I haven’t figured out why this doesn’t work at the moment, but it seems to have something to do with the drivers – VLC will play the video, but it doesn’t seem to have sound at the moment.
Conclusion
WHY CAN’T YOU FIGURE THIS OUT EASILY??
I appreciate the fact that the ‘Screen Record’ button doesn’t show up if you can’t record the screen, but giving precisely zero hints to the user as to why the screen recording is unavailable is not good for the user experience.
This is why Mac OS is so easy and nice to use: things just work(for the most part), there’s no need to fiddle around with knowing what packages need to be installed or not. If screen recording can’t happen, then some sort of GNOME troubleshooting would be super useful.
Linux is not good as a desktop environment when there’s stuff like this going on – a poor user experience where it works on one machine and not the other, and in order to fix it requires a good amount of research in order to know what file(s) to delete, package(s) to install/update, etc.
Leave a Reply