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

Background isn't totally transparent anymore. #207

Closed
jersonlatorre opened this issue Apr 27, 2019 · 39 comments
Closed

Background isn't totally transparent anymore. #207

jersonlatorre opened this issue Apr 27, 2019 · 39 comments
Milestone

Comments

@jersonlatorre
Copy link

@jersonlatorre jersonlatorre commented Apr 27, 2019

When there is no window maximized, wingpanel background is not 100% transparent.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented Apr 27, 2019

Thanks for the report but please clarify. Did it used to? Could you include a screenshot? You do know the wingpanel background adapts to the wallpaper color?

@jersonlatorre
Copy link
Author

@jersonlatorre jersonlatorre commented Apr 27, 2019

DeepinScreenshot_Desktop_20190427111539

Before the last upgrade, only the font color adapted to the wallpaper. Now the background adapts too and creates that dark band behind. Is it a bug or a new feature?

Thanks for reply!

@romdef
Copy link

@romdef romdef commented Apr 27, 2019

Same problem since the last system update (same result from a fresh install after installing updates).
Capture d'écran du 2019-04-27 20 18 43

@janxkoci
Copy link

@janxkoci janxkoci commented Apr 28, 2019

It's not a feature, it's a bug. I have the same result as romdef, it's so ugly I had to change wallpaper.
wingpanel-bug

Top: before; bottom: after

@janxkoci
Copy link

@janxkoci janxkoci commented Apr 28, 2019

OK I tested it little bit further and it's only affected in the light variant - the darkish SpaceX wallpaper has fully transparent wingpanel. Well except the Freya wallpaper (in jensonlatorre's screenshot) shouldn't have a dark panel, it should also be transparent. 🤔

Snímek z 2019-04-28 13-51-37

@kr428
Copy link

@kr428 kr428 commented Apr 29, 2019

Adding myself to that. I always had transparency issues with wingpanel on my multi-monitor setup because of #184; but this time it seems even worse. Using a light custom wallpaper.

Screenshot von 2019-04-29 07 58 45

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented Apr 29, 2019

I'm assuming this started happening since Wingpanel 2.2.4 which was released 24 april?
More info on releases: https://github.com/elementary/wingpanel/releases

The weird thing is that there have been very few changes:
Changes between 2.2.3 and 2.2.4: 2.2.3...2.2.4
Changes between 2.2.2 and 2.2.3: 2.2.2...2.2.3

@kr428
Copy link

@kr428 kr428 commented Apr 29, 2019

Not really sure actually. wingpanel on my system is 2.2.3 it seems, see below. Unfortunately, it's not that easy to downgrade to an "older" version as they don't seem to be in the repos anymore. Likewise, as far as I see, wingpanel on my installation was upgraded on April 25, in the early morning, and I am almost completely sure this wasn't an issue until earlier today (April 29)...

wingpanel:
  Installiert:           2.2.3+r264+pkg41~ubuntu5.0.1
  Installationskandidat: 2.2.3+r264+pkg41~ubuntu5.0.1
  Versionstabelle:
 *** 2.2.3+r264+pkg41~ubuntu5.0.1 500
        500 http://ppa.launchpad.net/elementary-os/stable/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

@janxkoci
Copy link

@janxkoci janxkoci commented Apr 29, 2019

For me the change happened after I cold-booted on 28th of April. The day before I installed some updates, don't remember exactly which packages (is there a way to check?), everything was fine and I shut down the laptop in the end of the day. The next day, on Sunday, I was greeted with that ugly wingpanel.

Edit: I have version 2.2.3+r264+pkg41~ubuntu5.0.1

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented Apr 29, 2019

I've added some logs (how to: OS Dev > Debug logs) to https://github.com/elementary/wingpanel/blob/master/wingpanel-interface/BackgroundManager.vala#L164-L207
And I noticed it finds the following 3 wallpapers "busy" enough to use the TRANSLUCENT_... variant, which seems weird.
Screenshot from 2019-04-29 18-07-54@2x

Update: Even when reverting to a 2 months old commit of Gala and reverting the height change of Wingpanel this change persists.

Update 2:
Some debug logs:

bk_color_info.luminance_variance: 3157,448833
luminance_std: 56,191181
bk_color_info.mean_luminance: 204,062616
bk_color_info.mean_acutance: 18,081596
STD_THRESHOLD: 45,000000
LUMINANCE_THRESHOLD: 180,000000
ACUTANCE_THRESHOLD: 8,000000
luminance_std > STD_THRESHOLD
bk_color_info.mean_luminance + 1.645 * luminance_std > LUMINANCE_THRESHOLD
bk_color_info.mean_luminance + 1.645 * luminance_std: 296,497109
bk_color_info.mean_acutance > ACUTANCE_THRESHOLD

I wanted to add a few debug lines to an old vm running a stable iso from 2018-01-16, to compare values, but it looks like as soon as I install elementary-sdk and restart Gala the issue appears.
Can't think of a way to look into the original values without at least elementary-sdk.
When I create a fresh vm from that same iso and just update wingpanel or gala the issue doesn't appear...
This means it's one of the packages that are installed or updated when install elementary-sdk:

The following NEW packages will be installed:
  at autoconf automake autopoint autotools-dev dconf-editor dctrl-tools
  debhelper devscripts dh-autoreconf dh-strip-nondeterminism dput
  elementary-sdk equivs gdb gdbserver gir1.2-bamf-3 gir1.2-dbusmenu-glib-0.4
  gir1.2-dee-1.0 gir1.2-gdesktopenums-3.0 gir1.2-gee-0.8 gir1.2-granite-1.0
  gir1.2-harfbuzz-0.0 gir1.2-mutter-2 gir1.2-unity-5.0 git git-man
  gobject-introspection granite-demo gsettings-desktop-schemas-dev
  gtk-3-examples icu-devtools libarchive-cpio-perl libatk-bridge2.0-dev
  libatk1.0-dev libatspi2.0-dev libb-hooks-endofscope-perl
  libb-hooks-op-check-perl libbabeltrace1 libbamf3-dev libc6-dbg
  libcairo-script-interpreter2 libcairo2-dev libcdt5 libcgraph6
  libclass-method-modifiers-perl libclass-xsaccessor-perl
  libdata-optlist-perl libdbus-1-dev libdbus-glib-1-dev libdbusmenu-glib-dev
  libdee-dev libdevel-callchecker-perl libdevel-globaldestruction-perl
  libdistro-info-perl libdrm-dev libdw1 libdynaloader-functions-perl
  libegl1-mesa-dev libepoxy-dev liberror-perl libevdev-dev libexpat1-dev
  libffi-dev libfile-chdir-perl libfile-homedir-perl
  libfile-stripnondeterminism-perl libfile-which-perl libfontconfig1-dev
  libfreetype6-dev libgala-dev libgbm-dev libgdk-pixbuf2.0-dev libgee-0.8-dev
  libgetopt-long-descriptive-perl libgirepository1.0-dev libgit-wrapper-perl
  libgles1 libglib2.0-dev libglib2.0-dev-bin libglvnd-core-dev libglvnd-dev
  libgranite-dev libgraphite2-dev libgtk-3-dev libgts-0.7-5 libgts-bin
  libgvc6 libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev
  libicu-le-hb-dev libicu-le-hb0 libiculx60 libimport-into-perl libinput-dev
  libio-stringy-perl libjson-glib-dev liblist-compare-perl libltdl-dev
  libmail-sendmail-perl libmodule-implementation-perl libmodule-runtime-perl
  libmoo-perl libmtdev-dev libmutter-2-dev libnamespace-clean-perl
  libnumber-compare-perl libnumber-range-perl libopengl0
  libpackage-stash-perl libpackage-stash-xs-perl libpango1.0-dev
  libparams-classify-perl libparams-util-perl libparams-validate-perl
  libpath-iterator-rule-perl libpath-tiny-perl libpathplan4 libpcre16-3
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev libplank-dev
  libpng-dev libpng-tools libpod-constants-perl libpthread-stubs0-dev
  libregexp-pattern-license-perl librole-tiny-perl libsigsegv2 libsm-dev
  libsort-key-perl libsort-versions-perl libstrictures-perl
  libstring-copyright-perl libstring-escape-perl libsub-exporter-perl
  libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl
  libsub-quote-perl libswitchboard-2.0-dev libsys-hostname-long-perl
  libtext-glob-perl libtool libudev-dev libunicode-utf8-perl libunity-dev
  libvaladoc-0.40-0 libvaladoc-data libvariable-magic-perl libwacom-dev
  libwayland-bin libwayland-dev libwayland-egl1 libwingpanel-2.0-dev
  libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev
  libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev
  libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxcb1-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev
  libxinerama-dev libxkbcommon-dev libxml2-dev libxml2-utils libxrandr-dev
  libxrender-dev libxshmfence-dev libxtst-dev libxxf86vm-dev licensecheck m4
  mesa-common-dev meson ninja-build pkg-config po-debconf python3-debian
  python3-distutils python3-gpg python3-lib2to3 python3-magic python3-mako
  python3-markupsafe python3-unidiff valac valac-0.40-vapi valadoc
  wayland-protocols wdiff x11proto-composite-dev x11proto-core-dev
  x11proto-damage-dev x11proto-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-randr-dev x11proto-record-dev x11proto-xext-dev
  x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools
  xtrans-dev zlib1g-dev
The following packages will be upgraded:
  gir1.2-gtk-3.0 libcairo-gobject2 libcairo2 libdbusmenu-glib4 libdrm-amdgpu1
  libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2
  libegl-mesa0 libgbm1 libglib2.0-0 libglib2.0-bin libgranite-common
  libgranite5 libgtk-3-0 libgtk-3-common libmutter-2-0 libplank-common
  libplank1 libpng16-16 libpython3-stdlib libpython3.6 libpython3.6-minimal
  libpython3.6-stdlib libswitchboard-2.0-0 libudev1 libvala-0.40-0
  libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa
  libwayland-server0 libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shape0
  libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxkbcommon-x11-0
  libxkbcommon0 mutter-common plank python3 python3-minimal python3.6
  python3.6-minimal switchboard udev

@kr428
Copy link

@kr428 kr428 commented Apr 29, 2019

Thanks for pointing to the debugging tutorial, so far I actually missed this. :) Been reading through that bg_is_busy code before, actually, and wondered whether, for such cases, at least a hidden switch to make the user override this algorithm would generally be a viable workaround. ;)

Plus: I don't see changes to that algorithm in the given time frame, and I haven't changed my wallpaper in between. Maybe any of the dependencies (Gala.WM, CoglFixes) in Utils#get_background_color_information() has changed behaviour recently?

@janxkoci
Copy link

@janxkoci janxkoci commented Apr 29, 2019

My idea was some theme changes - could it be the culprit?

@es28vip
Copy link

@es28vip es28vip commented May 4, 2019

@jersonlatorre
I use this method to modify restore the original state.
#89 (comment)

@jersonlatorre
Copy link
Author

@jersonlatorre jersonlatorre commented May 5, 2019

@es28vip, thanks! trying a little bit more finally this worked for me:

.panel.translucent {
  background-color: transparent;
}

@es28vip
Copy link

@es28vip es28vip commented May 5, 2019

@jersonlatorre I'm glad I could help you.

@kgrubb
Copy link
Collaborator

@kgrubb kgrubb commented May 6, 2019

UPDATE: its not an elementary-sdk package either. Using a default iso and installing updates via sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y will trigger the transparency issue. I'm going to try and hunt down the package(s) that may be causing this.

A quick update, it looks like gala and wingpanel aren't the culprit here. Installing elementary-sdk seems to reliably replicate this issue, so the problem was most likely introduced via installing or upgrading one of the packages included in the elementary-sdk bundle (🎉 thanks @peteruithoven for the discovery! 🎉).

His comment (from slack):

In an vm started from an iso from 2018-01-16 when I specifically update wingpanel or gala the issue doesn't appear... (while when I install the elementary-sdk it did)

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented May 6, 2019

When I create a fresh vm from that 2018-01-16 iso and just update the issue also appears, meaning it's one of these packages:

The following NEW packages will be installed:
  bubblewrap htop libllvm7 libwayland-egl1 linux-headers-4.15.0-48
  linux-headers-4.15.0-48-generic linux-image-4.15.0-48-generic
  linux-modules-4.15.0-48-generic linux-modules-extra-4.15.0-48-generic
  python3-netifaces
The following packages will be upgraded:
  apache2-bin appcenter appcenter-casper appstream apt apt-config-icons
  apt-config-icons-hidpi apt-config-icons-large apt-config-icons-large-hidpi
  apt-utils audience avahi-autoipd avahi-daemon base-files bind9-host
  binutils binutils-common binutils-x86-64-linux-gnu browser-plugin-evince
  bsdutils busybox-initramfs busybox-static capnet-assist console-setup
  console-setup-linux cpp cpp-7 cups cups-bsd cups-client cups-common
  cups-core-drivers cups-daemon cups-ipp-utils cups-ppdc cups-server-common
  curl desktop-file-utils dirmngr disable-light-locker distro-info-data
  dnsutils dpkg dpkg-dev e2fsprogs elementary-artwork elementary-desktop
  elementary-icon-theme elementary-minimal elementary-standard
  elementary-theme evince evince-common fdisk file fonts-noto-color-emoji
  friendly-recovery g++ g++-7 gcc gcc-7 gcc-7-base gcc-8-base gettext
  gettext-base ghostscript ghostscript-x gir1.2-gtk-3.0
  gir1.2-javascriptcoregtk-4.0 gir1.2-nm-1.0 gir1.2-nma-1.0
  gir1.2-packagekitglib-1.0 gir1.2-webkit2-4.0 gkbd-capplet gnome-bluetooth
  gnome-control-center-faces gnome-desktop3-data gnome-settings-daemon
  gnome-settings-daemon-schemas gnupg gnupg-l10n gnupg-utils gparted gpg
  gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grub-common
  grub-pc grub-pc-bin grub2-common gstreamer1.0-alsa gstreamer1.0-gl
  gstreamer1.0-packagekit gstreamer1.0-plugins-base
  gstreamer1.0-plugins-base-apps gstreamer1.0-tools gstreamer1.0-x
  gtk-update-icon-cache gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons
  gvfs-fuse gvfs-libs im-config indicator-application initramfs-tools
  initramfs-tools-bin initramfs-tools-core io.elementary.camera
  io.elementary.code irqbalance keyboard-configuration kmod krb5-locales
  language-pack-de language-pack-fr language-pack-gnome-de
  language-pack-gnome-fr language-pack-gnome-nl language-pack-gnome-pl
  language-pack-gnome-sv language-pack-nl language-pack-pl language-pack-sv
  language-selector-common libappstream4 libapt-inst2.0 libapt-pkg5.0
  libarchive13 libasan4 libasound2 libasound2-data libatomic1
  libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7
  libavahi-glib1 libbind9-160 libbinutils libblkid1 libcaca0
  libcairo-gobject2 libcairo2 libcc1-0 libcilkrts5 libcodecore0
  libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcom-err2
  libcups2 libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1
  libcurl3-gnutls libcurl4 libdbusmenu-glib4 libdbusmenu-gtk3-4
  libdns-export1100 libdns1100 libdpkg-perl libdrm-amdgpu1 libdrm-common
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0
  libegl1-mesa libevdocument3-4 libevview3-3 libexiv2-14 libext2fs2 libfdisk1
  libgbm1 libgcc-7-dev libgcc1 libgd3 libgda-5.0-4 libgda-5.0-common
  libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-bin
  libglib2.0-data libglx-mesa0 libgnome-bluetooth13 libgnome-desktop-3-17
  libgnomekbd-common libgnomekbd8 libgomp1 libgranite-common libgranite5
  libgs9 libgs9-common libgssapi-krb5-2 libgstreamer-gl1.0-0
  libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libgtksourceview-3.0-1 libgtksourceview-3.0-common
  libgweather-3-15 libgweather-common libidn11 libirs160 libisc-export169
  libisc169 libisccc160 libisccfg160 libitm1 libjavascriptcoregtk-4.0-18
  libk5crypto3 libkmod2 libkrb5-3 libkrb5support0 libldap-2.4-2
  libldap-common libldb1 liblsan0 liblwres160 libmagic-mgc libmagic1
  libmaya-calendar0 libmount1 libmpx2 libmutter-2-0 libnautilus-extension1a
  libnm-glib4 libnm-util2 libnm0 libnma0 libnoise-core0 libnss-systemd
  libnss3 libntfs-3g88 libnuma1 libpackagekit-glib2-18 libpam-modules
  libpam-modules-bin libpam-runtime libpam-systemd libpam0g
  libpantheon-files-core0 libpantheon-files-widgets0 libparted-fs-resize0
  libparted2 libpci3 libperl5.26 libplank-common libplank1 libplymouth4
  libpng16-16 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0
  libpoppler-glib8 libpoppler73 libpulse-mainloop-glib0 libpulse0 libpulsedsp
  libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib
  libpython3.6 libpython3.6-minimal libpython3.6-stdlib libqt5core5a
  libqt5dbus5 libqt5gui5 libqt5network5 libqt5widgets5 libquadmath0 libraw16
  libseccomp2 libsmartcols1 libsmbclient libss2 libssh-gcrypt-4 libssl1.0.0
  libssl1.1 libstdc++-7-dev libstdc++6 libswitchboard-2.0-0 libsystemd0
  libtiff5 libtsan0 libu2f-udev libubsan0 libudev1 libunistring2
  libupower-glib3 libuuid1 libvala-0.40-0 libwavpack1 libwayland-client0
  libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwbclient0
  libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2 libx11-6 libx11-data
  libx11-xcb1 libxatracker2 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-res0 libxcb-shape0
  libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1
  libxcb1 libxkbcommon-x11-0 libxkbcommon0 libxslt1.1 libzmq5 linux-firmware
  linux-generic linux-headers-generic linux-image-generic linux-libc-dev
  linux-signed-generic linux-signed-image-generic login man-db maya-calendar
  maya-calendar-daemon maya-calendar-plugin-caldav
  maya-calendar-plugin-google mesa-va-drivers mesa-vdpau-drivers mount
  mutter-common nautilus-data netplan.io network-manager
  network-manager-config-connectivity-ubuntu network-manager-gnome
  networkd-dispatcher noise nplan ntfs-3g openssh-client openssl packagekit
  packagekit-tools pantheon pantheon-agent-geoclue2 pantheon-agent-polkit
  pantheon-calculator pantheon-files pantheon-greeter
  pantheon-online-accounts-plugin-fastmail
  pantheon-online-accounts-plugin-lastfm pantheon-online-accounts-plugin-mail
  pantheon-photos pantheon-shell pantheon-terminal parted passwd pciutils
  perl perl-base perl-modules-5.26 plank plymouth plymouth-label policykit-1
  poppler-utils ppp psmisc pulseaudio pulseaudio-module-bluetooth
  pulseaudio-utils python-apt-common python-ldb python-samba python2.7
  python2.7-minimal python3 python3-apport python3-apt python3-gdbm
  python3-gi python3-gi-cairo python3-httplib2 python3-minimal
  python3-problem-report python3.6 python3.6-minimal qt5-gtk-platformtheme
  rfkill samba-common samba-common-bin samba-libs screenshot-tool
  slingshot-launcher switchboard switchboard-plug-a11y switchboard-plug-about
  switchboard-plug-applications switchboard-plug-bluetooth
  switchboard-plug-datetime switchboard-plug-display
  switchboard-plug-keyboard switchboard-plug-locale
  switchboard-plug-mouse-touchpad switchboard-plug-networking
  switchboard-plug-online-accounts switchboard-plug-pantheon-shell
  switchboard-plug-power switchboard-plug-printers
  switchboard-plug-security-privacy switchboard-plug-sound
  switchboard-plug-useraccounts switchboard-plug-users systemd systemd-sysv
  tar thermald tzdata ubiquity ubiquity-frontend-gtk
  ubiquity-slideshow-elementary ubiquity-ubuntu-artwork ubuntu-drivers-common
  ubuntu-keyring ubuntu-minimal udev ufw upower ureadahead usbmuxd util-linux
  uuid-runtime wget wingpanel-indicator-bluetooth
  wingpanel-indicator-datetime wingpanel-indicator-keyboard
  wingpanel-indicator-network wingpanel-indicator-nightlight
  wingpanel-indicator-notifications wingpanel-indicator-power
  wingpanel-indicator-session wingpanel-indicator-sound wpasupplicant
  xdg-utils xserver-common xserver-xorg-core xserver-xorg-legacy

Note: Specifically upgrading wingpanel and gala doesn't give the issue.

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented May 6, 2019

This wallpaper (which should show a transparent wingpanel):
Screenshot from 2019-05-06 18-55-39@2x
Gives:

bk_color_info.luminance_variance: 3157,448833
luminance_std: 56,191181
bk_color_info.mean_luminance: 204,062616
bk_color_info.mean_acutance: 18,081596
STD_THRESHOLD: 45,000000
LUMINANCE_THRESHOLD: 180,000000
ACUTANCE_THRESHOLD: 8,000000
bk_color_info.mean_luminance + 1.645 * luminance_std: 296,497109
// These conditionals are triggered:
luminance_std > STD_THRESHOLD
bk_color_info.mean_luminance + 1.645 * luminance_std > LUMINANCE_THRESHOLD
bk_color_info.mean_acutance > ACUTANCE_THRESHOLD

This wallpaper (which should show a non transparent wingpanel):
Screenshot from 2019-05-06 18-55-32@2x
Gives:

bk_color_info.luminance_variance: 122,468332
luminance_std: 11,066541
bk_color_info.mean_luminance: 24,284012
bk_color_info.mean_acutance: 7,254785
STD_THRESHOLD: 45,000000
LUMINANCE_THRESHOLD: 180,000000
ACUTANCE_THRESHOLD: 8,000000
// These conditionals are triggered:
bk_color_info.mean_luminance < LUMINANCE_THRESHOLD

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented May 6, 2019

Looking at Utils.get_background_color_information:

CoglFixes.texture_get_data (texture, Cogl.PixelFormat.BGRA_8888_PRE, 0, pixels);

There is this CoglFixes.
I found 4 seemingly related packages that are upgraded:
libcogl-common libcogl-pango20 libcogl-path20 libcogl20
But upgrading just those (and restarting gala) also doesn't give the issue.

@peteruithoven
Copy link
Collaborator

@peteruithoven peteruithoven commented May 6, 2019

It also talks to the window manager:

var background = wm.background_group.get_child_at_index (monitor);

Which is and/or uses Mutter, so I updated just mutter-common, which didn't give the issue. Finally updating libmutter-2-0 gives the issue. So libmutter-2-0 is somehow the culprit here...

Update:
From apt show libmutter-2-0 :

APT-Sources: http://ppa.launchpad.net/elementary-os/os-patches/ubuntu bionic/main amd64 Packages

Which is, as far as I recently learned build from a branch of elementary/os-patches:
https://github.com/elementary/os-patches/tree/mutter-bionic
Which had a recent update in Apr 25, 2019, which is 2 days before this issue.

Update 2:
It seems to update mutter from:
version 3.28.3-2~ubuntu18.04.2
To:
3.28.3+git20190124-0ubuntu18.04.2

Sadly I only see 3.28 and 3.29.1 in the Mutter changelog:
https://gitlab.gnome.org/GNOME/mutter/blob/master/NEWS#L275-307
A possibly interesting change:

  • Fix swapped colors in screenshots (again) [Carlos; #72]

That issue: https://gitlab.gnome.org/GNOME/mutter/issues/72

Update 3:
I'm afraid we'll need to update the constants used to determine the color and transparency?
Anyone know how we arrived at the current ones?

@kr428
Copy link

@kr428 kr428 commented May 7, 2019

Seems you got a bit further than me digging into CoglFixes and friends. :) Well, not wanting to play devils advocate here, but given that, wouldn't it be better to either use a forked version of that mutter stuff for elementary - or give up on only automatically determining panel background/transparency and/or make this an option that can be overridden by the user (by explicitely stating or at least "correcting" the intended amount of transparency)? ;)

(off to try to get me an elementary VM to somehow get a debug environment that doesn't trash my day-to-day working system...)

@donadigo
Copy link
Collaborator

@donadigo donadigo commented May 7, 2019

@kr428 I've already brought up this point to the team, but it seems like they're not interested in that and their stance is that a fork has to be maintained by someone and that it is extra work which I don't agree with given the possibilities and freedom it gives us.

@kr428
Copy link

@kr428 kr428 commented May 7, 2019

@donadigo I actually to some degree can understand this - it's always a balance between wasting effort on maintaining forks of the same thing on one side and the risks and challenges of handling cross-team dependencies on the other. ;)

@quequotion
Copy link

@quequotion quequotion commented May 7, 2019

As a workaround, one may specify a static color and transparency; there are several ways to specify colors.

I have a forked wingpanel with the automatic colorization and transparency features patched out, for use with window managers other than Gala.

They are nifty features, but I don't find them all that useful. It's not just that I don't use Gala, but that I rarely change my background (most of the time default, black nothingness).

I set wingpanel's background to black and 50% transparent--rgba(0,0,0,0.5)--and have no complaints.

@krsambhav
Copy link

@krsambhav krsambhav commented Jan 26, 2020

Found a simple workaround:
create a gtk.css file inside ~/.config/gtk-3.0/ and write this inside:

/*********************
* wingpanel support *
********************/
.panel {
background-color: transparent;
transition: all 100ms ease-in-out;
}
.panel.maximized {
background-color: #000;
}

save this and run pkill wingpanel
enjoy

@janxkoci
Copy link

@janxkoci janxkoci commented Jan 27, 2020

@virtualracer this was already fixed months ago. Also note that wingpanel has adaptive transparency based on wallpaper, not just simple "always-on"..

@quequotion
Copy link

@quequotion quequotion commented Jan 27, 2020

wingpanel has adaptive transparency based on wallpaper, not just simple "always-on"

I'd just like to chime in to note that is a feature dependant on the Gala window manager. Not something most users of elementary OS need concern themselves with, but wingpanel's background is static with other window managers.

Also, if a static background is desired, CSS can be used to achieve that, even when using Gala (there are some additional selectors that may need to be overriden).

@kr428
Copy link

@kr428 kr428 commented Feb 21, 2020

Something I noticed that might be related to that: There is a bunch of images on my device (like photos off my digital camera) that, in file manager, appear with a "black" border on top and bottom in thumbnails, but when I open these in any image viewer, the black border is not actually there.

Whenever I try to set one of these pictures as wallpaper, I can be sure wingpanel transparency will be messed up, even in lates 5.1 releases. Opening one of these files in gimp, cropping it a bit and saving it again before setting it as a wallpaper will fix this issue. As it is reproducible, I think these things are somewhat related, but I so far have no clue why and how. :)

pics-border

@quequotion
Copy link

@quequotion quequotion commented Feb 21, 2020

when I open these in any image viewer, the black border is not actually there.
Whenever I try to set one of these pictures as wallpaper, I can be sure wingpanel transparency will be messed
cropping it a bit and saving it again before setting it as a wallpaper will fix this issue

Do those images have transparent borders? ie, there's nothing visible in viewing apps but gimp opens an editing window a little larger than the picture with the gaps filled in with a grey, checkered background?

Thumbnailers often render transparency as black, say if the thumbnail's image format does not support tranparency.

Just a theory, but maybe wingpanel & gala don't know what to do when wingpanel is drawn over a transparent background (note that the desktop can't really render an invisible hole either, so there will be a fill-in color such as black, blue, or another configured background color in the gaps).

@kr428
Copy link

@kr428 kr428 commented Feb 22, 2020

@quequotion
Copy link

@quequotion quequotion commented Feb 22, 2020

"flaky" data

I haven't checked the code, does it use any EXIF data?

@kr428
Copy link

@kr428 kr428 commented Feb 23, 2020

I haven't checked the code, does it use any EXIF data?

I don't think so, at least not by looking at the code. See this (#207 (comment)) a bit earlier in this thread; Peter also linked to the relevant code lines here. That seems to work by using this method (

public async ColorInformation get_background_color_information (Gala.WindowManager wm, int monitor,
) to gather information about the colors used in the background image/texture. Maybe I'll find ways to dive deeper into this at some point.

@fnune
Copy link

@fnune fnune commented Nov 22, 2020

I'm having a similar issue right now. It works just fine (full transparency) on backgrounds that are slightly darker:

screenshot

However, on lighter backgrounds, where there should be full transparency as well (with grey text), I see this:

screenshot_1

This has been the case only recenly. Maybe I can try to find out which packages were updated?

@janxkoci
Copy link

@janxkoci janxkoci commented Nov 23, 2020

I just set the same wallpaper as you @fnune and I don't see it:

Snímek z 2020-11-23 13-24-59

@fnune
Copy link

@fnune fnune commented Nov 23, 2020

Hey, thanks for testing that!

I made some changes that could have introduced my bug. I created a ~/.config/gtk-3.0/gtk.css and added some stuff, but later on removed the file.

I believe the file didn't exist before I created it and made those changes.

Edit: removing the gtk-3.0 directory (which was empty apart from a bookmarks file) produced no change (my bug above still happens).

@janxkoci
Copy link

@janxkoci janxkoci commented Nov 23, 2020

Well I don't have that file on my system. My system is quite new, I got it preinstalled on a new Slimbook last week ;)

Edit: However I do have the ~/.config/gtk-3.0/ directory, which contains one file - bookmarks. It's a plaintext list of locations shown in Files' sidebar (e.g. Documents, Music, Dropbox, etc.).

@fnune
Copy link

@fnune fnune commented Nov 26, 2020

Could having gnome-tweaks installed have anything to do with my problem?

@fnune
Copy link

@fnune fnune commented Nov 26, 2020

Nope, set everything back to defaults and removed gnome-tweaks, logged out and back in, and the problem persists:

image

Other things I've tried:

  • Using the "restore default settings" feature in "About".
  • Purging and reinstalling wingpanel, elementary-theme, elementary-desktop, pantheon-shell

@fnune
Copy link

@fnune fnune commented Nov 26, 2020

Found it!

It's only happening when I connect my external monitor and set it as a primary monitor. Filed a new issue:

#358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.