Sorry, I can't deal with the randomness. Let's simplify -

$ sudo snap disable firefox
firefox disabled

$ cat ~/.local/share/applications/firefox2.desktop 
[Desktop Entry]
Version=1.0
Name=Firefox Web Browser 2
Exec=/bin/bash -c "/home/alan/firefox-104.0.2/firefox/firefox"
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;video/webm;application/x-xpinstall;
StartupNotify=true
StartupWMClass=firefox
$

With the above, if I log in and click firefox, I get stuck at the black
window. If I quit firefox and try again, I get a *temporary* black
window, and then a working firefox.

If I edit the file and change it to "MOZ_ENABLE_WAYLAND=1
/home/alan/firefox-104.0.2/firefox/firefox", then two things change:

1. When I log in and click firefox, firefox works the first time. I don't have 
to quit it and click it again before I can use firefox.
2. When firefox starts, there is no *temporary* black screen either.

---

When I *was* trying to launch firefox from the terminal, I also noticed
a difference in debug messages:

$ /bin/bash -c "/home/alan/firefox-104.0.2/firefox/firefox"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[2022-09-19T12:44:36Z ERROR viaduct::backend::ffi] Missing HTTP status
[2022-09-19T12:44:36Z ERROR viaduct::backend::ffi] Missing HTTP status
$

$ /bin/bash -c "MOZ_ENABLE_WAYLAND=1 /home/alan/firefox-104.0.2/firefox/firefox"
Unsupported modifier, resource creation failed.
XXX: resource creation failed
Unsupported modifier, resource creation failed.
XXX: resource creation failed
Unsupported modifier, resource creation failed.
XXX: resource creation failed
[2022-09-19T12:44:43Z ERROR viaduct::backend::ffi] Missing HTTP status
[2022-09-19T12:44:43Z ERROR viaduct::backend::ffi] Missing HTTP status
$

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/1987976

Title:
  firefox black window

Status in Mozilla Firefox:
  New
Status in firefox package in Ubuntu:
  Confirmed

Bug description:
  nicolas@nicolas-fixe:~$ lsb_release -rd
  Description:  Ubuntu 22.04.1 LTS
  Release:      22.04

  nicolas@nicolas-fixe:~$ apt-cache policy firefox
  firefox:
    Installé : 1:1snap1-0ubuntu2
    Candidat : 1:1snap1-0ubuntu2
   Table de version :
   *** 1:1snap1-0ubuntu2 500
          500 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
          100 /var/lib/dpkg/status

  When I boot Ubuntu and start Firefox, the Firefox's window is totally
  black. See attachment.

  I am at your disposal to answer any question you have.

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: firefox 1:1snap1-0ubuntu2
  ProcVersionSignature: Ubuntu 5.15.0-46.49-generic 5.15.39
  Uname: Linux 5.15.0-46-generic x86_64
  ApportVersion: 2.20.11-0ubuntu82.1
  Architecture: amd64
  CasperMD5CheckResult: pass
  CurrentDesktop: ubuntu:GNOME
  Date: Sun Aug 28 12:42:29 2022
  InstallationDate: Installed on 2022-08-25 (2 days ago)
  InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 
(20220809.1)
  ProcEnviron:
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=fr_FR.UTF-8
   SHELL=/bin/bash
  Snap.Changes: aucun changement trouvé
  SourcePackage: firefox
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/1987976/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to