Skip to content

Transparency does not work on Linux (black background instead) #15947

@doom-fr

Description

@doom-fr
  • Output of node_modules/.bin/electron --version:
    in first bad version : 1.5.0
    in latest beta : v4.0.0-beta.8
    in lastest nightly : v4.0.0-nightly.20181010

  • Operating System (Platform and Version):
    Linux Debian Jessie : Linux version 3.16.0-7-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10+deb8u1) ) Get Atom running from atom-shell #1 SMP Debian 3.16.59-1 (2018-10-03)
    and also in
    Linux Debian Buster : Linux version 4.18.0-2-amd64 (debian-kernel@lists.debian.org) (gcc version 7.3.0 (Debian 7.3.0-29)) Get Atom running from atom-shell #1 SMP Debian 4.18.10-2 (2018-10-07)

  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable):
    v1.4.16

Expected Behavior
having a transparent background for the window

Actual behavior
having a black background for the window

To Reproduce
see https://gitlab.com/doom-fr/electron-transparency-bug.git

Screenshots

1.4.16
image

1.5.0
image

4.0.0.beta.8
image

Additional Information

Activity

welcome

welcome commented on Dec 4, 2018

@welcome

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

codebytere

codebytere commented on Dec 4, 2018

@codebytere
Member

We are no longer implementing bugfixes for versions of Electron < 1.8.x; does this occur on new versions?

doom-fr

doom-fr commented on Dec 4, 2018

@doom-fr
Author
doom-fr

doom-fr commented on Dec 5, 2018

@doom-fr
Author

Have also tried it on a Debian Buster machine (ssh -X).
The result is the same :

  • there's a break between 1.4.16 and 1.5.0
  • it doesn't work with latest electron version 4.0.0-beta.7

Seems to work under Ubuntu with 3.0.10;

But it does not work with 3.0.10 in Debian Buster (ssh -X)

image

changed the title [-]Transparency on Linux is broken between 1.4.16 and 1.5.0[/-] [+]Transparency does not work on Linux Debian[/+] on Dec 7, 2018
doom-fr

doom-fr commented on Dec 7, 2018

@doom-fr
Author

Has someone succeed in reproducing the problem (or not reproducing!) on a Debian machine ?

Debian is a main distribution. If it doesn't work with it, it is a big problem. No ?

changed the title [-]Transparency does not work on Linux Debian[/-] [+]Transparency does not work on Linux Debian (black background instead)[/+] on Dec 10, 2018
doom-fr

doom-fr commented on Dec 12, 2018

@doom-fr
Author

Sorry for close re-open
Just click bad button

doom-fr

doom-fr commented on Jan 10, 2019

@doom-fr
Author

Just tested and it works in 2.0.16
But not in 3.1.0 nor in 4.0.1

doom-fr

doom-fr commented on Jan 15, 2019

@doom-fr
Author

After some other tests, it seems that it works in electron 4.0.1, but we have to wait for at least 300ms before opening a window !!!
@codebytere why should we need this ? Couldn't it be integrated into the ready event or another one, to wait just what is needed ?

aistrych

aistrych commented on Jan 15, 2019

@aistrych

@doom-fr Setting 300ms delay and that's it? Do you have enabled hardware acceleration? If yes: does your machine support hardware acceleration? In my case delay is enough for virtual machine without hardware acceleration but for normal machines I need to add:

app.disableHardwareAcceleration();
doom-fr

doom-fr commented on Jan 15, 2019

@doom-fr
Author

@Astrych,

setting 300ms and that's it ?

Not really. Rather, make a lot of tests, lost a lot of days, tried 10ms as said here, tried 10 times what is needed (100 ms) but does not tried more, make a lot of tests, realize that it works sometimes and make a lot of tests again to found just that !

I have now hardware acceleration enabled but it works with or without --disable-gpu.
I use it with paper.js and it needs hardware acceleration. If not, it is very slow.

So now I have this in my package.json : "start": "electron --enable-transparent-visuals ."

17 remaining items

ckerr

ckerr commented on Sep 30, 2020

@ckerr
Member

For what it's worth, the workaround mentioned by @doom-fr at #16809 works for me.

zduronshawn

zduronshawn commented on Feb 8, 2021

@zduronshawn

if you're on win7, and the theme is windows basic theme, you should change your theme to windows aero theme, then , transparent will work .but i wonder is there a better way to fix it

Pevernow

Pevernow commented on Feb 12, 2021

@Pevernow

"--disable-gpu" and latency do make it work.

But I need to use webgl, which is not a good solution.

Is there any way to make transparency and webgl work on Linux at the same time?

shubham-root

shubham-root commented on Feb 24, 2021

@shubham-root
if(process.platform === "linux") {
  app.commandLine.appendSwitch('enable-transparent-visuals');
  app.disableHardwareAcceleration();
}

before your

app.on('ready', () => {..})
seems to do the trick for me on Ubuntu 18.04/Electron 11.2.3

electron-triage

electron-triage commented on Mar 9, 2021

@electron-triage

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

doom-fr

doom-fr commented on Mar 10, 2021

@doom-fr
Author

Easy to wait more than two years without doing anything and tell that the version is not supported any more ...

In the last month users seems to encounter the problem.
@shubham-root & @Pevernow, can you confirm this is still an issue in the last release ?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ckerr@codebytere@doom-fr@aistrych@shubham-root

        Issue actions

          Transparency does not work on Linux (black background instead) · Issue #15947 · electron/electron