settings - mouse&touchpad - scroll direction images empty

Bug #2077117 reported by corrado venturini
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-control-center
New
Unknown
gnome-control-center (Ubuntu)
Triaged
Medium
Nathan Teodosio
gst-plugins-good1.0 (Ubuntu)
New
Undecided
Unassigned
gtk4 (Ubuntu)
Invalid
Low
Nathan Teodosio

Bug Description

Settings - mouse&touchpad - scroll direction images empty
see attached screenshot

ProblemType: Bug
DistroRelease: Ubuntu 24.10
Package: gnome-control-center 1:47~beta-2ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.30.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Aug 15 20:39:33 2024
InstallationDate: Installed on 2024-08-10 (5 days ago)
InstallationMedia: Ubuntu 24.10 "Oracular Oriole" - Daily amd64 (20240810)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
corrado venturini (corradoventu) wrote :
Revision history for this message
Jeremy Bícha (jbicha) wrote :

There are several updates landing today or tomorrow. Please check again tomorrow after installing all updates and logging in and out.

One package in particular you need is xdg-desktop-portal-gnome >= 47~beta

Changed in gnome-control-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Bícha (jbicha) wrote :

If this problem still exists then, we need you to report what accent color you are using

Revision history for this message
corrado venturini (corradoventu) wrote (last edit ):

Problem remains with 1:47~beta-2ubuntu2
I was using accent color yaru-blue, if I change accent color with gnome-tweaks the images change also.
note still unable to change accent color with gnome-control-center... no more, now it works

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Was this fixed, like LP: #2077115 , when you installed xdg-desktop-portal-gnome >= 47~beta then logged out and logged back in?

Revision history for this message
corrado venturini (corradoventu) wrote :

No, The images change color with accent color but remains just a colored rectangle.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I was able to duplicate this issue with the August 16 .iso

It doesn't affect my existing Ubuntu 24.10 install. This may be a GTK/gstreamer issue.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
corrado venturini (corradoventu) wrote :

Was not affecting my 24.18 from ISO dated 20240801 with the following updates:

corrado@corrado-n14-oo-0801:~$ apt policy gnome-control-center
gnome-control-center:
  Installed: 1:46.3-0ubuntu1
  Candidate: 1:46.3-0ubuntu1
  Version table:
 *** 1:46.3-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu oracular/main amd64 Packages
        100 /var/lib/dpkg/status
corrado@corrado-n14-oo-0801:~$ apt policy xdg-desktop-portal-gnome
xdg-desktop-portal-gnome:
  Installed: 46.2-3
  Candidate: 46.2-3
  Version table:
 *** 46.2-3 500
        500 http://archive.ubuntu.com/ubuntu oracular/main amd64 Packages
        100 /var/lib/dpkg/status
corrado@corrado-n14-oo-0801:~$ cat /var/log/installer/media-info
Ubuntu 24.10 "Oracular Oriole" - Daily amd64 (20240801)corrado@corrado-n14-oo-0801:~$

but problem appears after today updates.
did you need the log of today updates?

I have also other partitions with installations from older ISO 0626, 0702, 0721

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Now that I can reproduce it, I don't think we need more information at this time. Thank you!

Changed in gnome-control-center (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Nathan Teodosio (nteodosio)
importance: Undecided → Low
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

FYI, I'm quite sure this due to gtk, and probably to the way we have a custom gstplayer implementation.

Weird enough that this doens't happen to me when installing such version of gtk in my development environment... So we may miss some other dependency?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

So, installing `gstreamer1.0-plugins-bad` fixes the issue, but we can't use it as it's not in main, so w probably need to backport something else to gtk itself

affects: gnome-control-center (Ubuntu) → gtk4 (Ubuntu)
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Feel free to take over the bug, you seem to have a better idea of what is going on.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

And.... The missing plugin is /usr/lib/*/gstreamer-1.0/libgstcodecalpha.so that is the one we're missing in good :(

Not sure if we can avoid it being loaded somehow

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

How does GTK choose the plug-in? Are we able to change it? VPX is in good and supports VP9 decoding too:

% gst-inspect-1.0 vpx
  vp8dec: On2 VP8 Decoder
  vp8enc: On2 VP8 Encoder
  vp9dec: On2 VP9 Decoder
  vp9enc: On2 VP9 Encoder

% gst-inspect-1.0 codecalpha
  alphacombine: Alpha Combiner
  codecalphademux: CODEC Alpha Demuxer
  vp8alphadecodebin: VP8 Alpha Decoder
  vp9alphadecodebin: VP9 Alpha Decoder

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

We do use `vpx` in fact it gets loaded if you use `GST_DEBUG=5` (see https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html?gi-language=c), but one is loaded on top of other I think, so the problem.

In the past without codecalpha being loaded we were getting just dark backgrounds, but now we've another class of issues it seems.

Revision history for this message
Nathan Teodosio (nteodosio) wrote (last edit ):

It's pretty mysterious how those are chosen. I found no control on the GTK side for it.

As a stop-gap we could just un-map those rectangles in case codecalpha is missing, if we think that the current behavior warrants it, but for all I know in a new release of <something> it could well start loading a different plug-in in gstreamer*good with which the animations would work.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

As mentioned in email:

> From what I can tell, codecalpha is not a native VP8/VP9 decoder but a wrapper
> that adds alpha blending support. Which is how it takes a colourless video and
> applies the accent colour to it. This is required to implement the Matroska
> 'AlphaMode' element used in the video files, which is implemented in GStreamer
> by only one plugin offering the 'codec-alpha' capability.

The main difficulty in dealing with these videos is that most VP9 decoders don't understand the alpha channel and will render them incorrectly. You'll usually only see them rendered correctly in web browsers, or if you have the "bad" gstreamer plugins installed then you can use:

  gst-launch-1.0 filesrc location=INFILE.webm ! matroskademux ! decodebin ! glimagesink

But I could not figure out how to get GStreamer to transcode, and eventually gave up on GStreamer.

FFmpeg is usually more reliable and easier to work with, but it too doesn't understand the alpha channel by default:

  ffplay INFILE.webm

But finally I figured out how to interpret the alpha channel and convert each file into greyscale (or any colour you choose):

  ffmpeg -c:v libvpx-vp9 -i INFILE.webm -vf alphaextract,colorize=hue=0:saturation=0:lightness=1:mix=0.5 OUTFILE.webm

Please find attached some new videos that are white on grey.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Here's white on darker grey, looks nicer.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Thanks for your help on this.

Those videos do play if gstreamer*bad is not installed, but if it is installed, then they do not play:

--->
% LC_ALL=C gst-play-1.0 edge-scroll.webm
Press 'k' to see a list of keyboard shortcuts.
Now playing /tmp/edge-scroll.webm
ERROR Internal data stream error. for file:///tmp/edge-scroll.webm
ERROR debug information: ../gst/matroska/matroska-demux.c(6115): gst_matroska_demux_loop (): /GstPlayBin3:playbin/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin0/GstParseBin:parsebin0/GstMatroskaDemux:matroskademux0:
streaming stopped, reason not-negotiated (-4)
Reached end of play list.
% sudo apt remove gstreamer*bad
  ...
% LC_ALL=C gst-play-1.0 edge-scroll.webm #Plays fine despite the error message
Press 'k' to see a list of keyboard shortcuts.
Now playing /tmp/edge-scroll.webm
Redistribute latency...
ERROR Output window was closed for file:///tmp/edge-scroll.webm
ERROR debug information: ../sys/xvimage/xvimagesink.c(586): gst_xv_image_sink_handle_xevents (): /GstPlayBin3:playbin/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink/GstXvImageSink:videosink-actual-sink-xvimage
Reached end of play list.
<---

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Eheh, well... They definitely should be accented :)

So maybe we can go back to the old way: https://salsa.debian.org/3v1n0-guest/gnome-control-center/-/commit/cf28c8bc9c83184cf98edba92de7754d253805db

While accented assets can be generated using this script I wrote initially:
 https://salsa.debian.org/3v1n0-guest/gnome-control-center/-/blob/cf28c8bc9c83184cf98edba92de7754d253805db/panels/mouse/yaru-assets-generator.py

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

> Eheh, well... They definitely should be accented :)

I think "definitely" is hard to defend.

Here's some new videos without the Matroska AlphaMode flag, which might solve the playback issue. Please test in gnome-control-center rather than gst-play-1.0, although they do play in every single player I've tried.

Edit: They play in every single player on Jammy, but not on Oracular where it matters :(

Changed in gtk4 (Ubuntu):
status: In Progress → Invalid
Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixed. These will play on Oracular.

ffmpeg -c:v libvpx-vp9 -i INFILE -vf alphaextract,colorize=hue=0:saturation=0:lightness=1:mix=0.8 -metadata:s:v:0 alpha_mode=0 -pix_fmt yuv420p OUTFILE

Changed in gnome-control-center (Ubuntu):
assignee: nobody → Nathan Teodosio (nteodosio)
status: Confirmed → Triaged
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I confirm they play in Oracular. In the Control Center however they are still just orange squares. Infuriating.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try tweaking .illustrated-row in shell/style.css ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Alternatively, sadly, try querying the validity of self->media_stream in panels/common/cc-illustrated-row.c and hide the widget when the media stream isn't working.

Changed in gnome-control-center:
status: Unknown → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also reported upstream (https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3173) in case they can find an alternate format that works.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> Try tweaking .illustrated-row in shell/style.css ?

That is only in force for picture-disabled, so nothing to do there.

> Alternatively, sadly, try querying the validity of self->media_stream in panels/common/cc-illustrated-row.c and hide the widget when the media stream isn't working.

I tried with gtk_media_stream_get_error() but it relays no error.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Do the old videos from comment #20 even play?

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

I'm going to call this a bug in gst-plugins-good1.0 too. Because it sounds like libvpx is failing to use transparency in libgstvpx.so, yet working in FFmpeg (ffmpeg -c:v libvpx-vp9).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.