linuxserver / docker-firefox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] White screen with a black dot / circle - GUI not loading correctly ?

nodecentral opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi

I have just installed Firefox and when i access the port on my QNAP NAS it just gives me a black dot / circle which I can move around the screen. This seems like it’s related to another linuxserver post I found elsewhere for Calibre linuxserver/docker-calibre#104 .

I assume the black dot, is meant to be the mouse pointer, and I can bring up the Keyboard as an overlay, but the background always remains white.

Expected Behavior

I expect to see a Firefox browser screen, with a search field come up..

Steps To Reproduce

Here is my compose

firefox:
    image: lscr.io/linuxserver/firefox:latest
    container_name: firefox
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1005
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /share/Container/firefox/config:/config
    network_mode: "service:gluetun"
    shm_size: "1gb"
    restart: unless-stopped

Environment

- OS: QNAP Linux
- How docker service was installed:

CPU architecture

x86-64

Docker creation

firefox:
    image: lscr.io/linuxserver/firefox:latest
    container_name: firefox
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1005
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /share/Container/firefox/config:/config
    network_mode: "service:gluetun"
    shm_size: "1gb"
    restart: unless-stopped

Container logs

03/04/2023 9:21:13
[migrations] started
03/04/2023 9:21:13
[migrations] no migrations found
03/04/2023 9:21:17
03/04/2023 9:21:17
-------------------------------------
03/04/2023 9:21:17
          _         ()
03/04/2023 9:21:17
         | |  ___   _    __
03/04/2023 9:21:17
         | | / __| | |  /  \
03/04/2023 9:21:17
         | | \__ \ | | | () |
03/04/2023 9:21:17
         |_| |___/ |_|  \__/
03/04/2023 9:21:17
03/04/2023 9:21:17
03/04/2023 9:21:17
Brought to you by linuxserver.io
03/04/2023 9:21:17
-------------------------------------
03/04/2023 9:21:17
03/04/2023 9:21:17
To support LSIO projects visit:
03/04/2023 9:21:17
https://www.linuxserver.io/donate/
03/04/2023 9:21:17
-------------------------------------
03/04/2023 9:21:17
GID/UID
03/04/2023 9:21:17
-------------------------------------
03/04/2023 9:21:17
03/04/2023 9:21:17
User uid:    1005
03/04/2023 9:21:17
User gid:    1000
03/04/2023 9:21:17
-------------------------------------
03/04/2023 9:21:17
03/04/2023 9:21:18
03/04/2023 9:21:18
Generating 2048 bit rsa key...
03/04/2023 9:21:18
03/04/2023 9:21:18
ssl_gen_key_xrdp1 ok
03/04/2023 9:21:18
03/04/2023 9:21:18
saving to rsakeys.ini
03/04/2023 9:21:18
03/04/2023 9:21:18
Generating a RSA private key
03/04/2023 9:21:18
..............+++++
03/04/2023 9:21:18
................+++++
03/04/2023 9:21:18
writing new private key to '/etc/xrdp/key.pem'
03/04/2023 9:21:18
-----
03/04/2023 9:21:24
[custom-init] No custom files found, skipping...
03/04/2023 9:21:31
guacd[185]: INFO:	Guacamole proxy daemon (guacd) version 1.1.0 started
03/04/2023 9:21:31
guacd[185]: INFO:	Listening on host 0.0.0.0, port 4822
03/04/2023 9:21:32
guacd[185]: INFO:	Guacamole connection closed during handshake
03/04/2023 9:21:45
Starting guacamole-lite websocket server
03/04/2023 9:21:45
listening on *:3000
03/04/2023 9:21:46
[guac-init] Auto start not set, application start on login
03/04/2023 9:21:47
[ls.io-init] done.
03/04/2023 9:40:03
[2023-04-03 09:40:03] [Connection 1]  Client connection open
03/04/2023 9:40:03
[2023-04-03 09:40:03] [Connection 1]  Opening guacd connection
03/04/2023 9:40:03
[2023-04-03 09:40:03] [Connection 1]  guacd connection open
03/04/2023 9:40:03
[2023-04-03 09:40:03] [Connection 1]  Selecting connection type: rdp
03/04/2023 9:40:03
[2023-04-03 09:40:03] [Connection 1]  Sending opCode: 6.select,3.rdp;
03/04/2023 9:40:03
guacd[185]: INFO:	Creating new client for protocol "rdp"
03/04/2023 9:40:03
guacd[185]: INFO:	Connection ID is "$fb23e609-64de-41a4-a4b9-c92a2e0f9639"
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Sending opCode: 4.size,4.1366,13.981?undefined,2.96;
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Sending opCode: 5.audio,9.audio/L16;
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Sending opCode: 5.video;
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Sending opCode: 5.image;
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Server sent handshake: 4.args,13.VERSION_1_1_0,8.hostname,4.port,6.domain,8.username,8.password,5.width,6.height,3.dpi,15.initial-program,11.color-depth,13.disable-audio,15.enable-printing,12.printer-name,12.enable-drive,10.drive-name,10.drive-path,17.create-drive-path,7.console,13.console-audio,13.server-layout,8.security,11.ignore-cert,12.disable-auth,10.remote-app,14.remote-app-dir,15.remote-app-args,15.static-channels,11.client-name,16.enable-wallpaper,14.enable-theming,21.enable-font-smoothing,23.enable-full-window-drag,26.enable-desktop-composition,22.enable-menu-animations,22.disable-bitmap-caching,25.disable-offscreen-caching,21.disable-glyph-caching,16.preconnection-id,18.preconnection-blob,8.timezone,11.enable-sftp,13.sftp-hostname,13.sftp-host-key,9.sftp-port,13.sftp-username,13.sftp-password,16.sftp-private-key,15.sftp-passphrase,14.sftp-directory,19.sftp-root-directory,26.sftp-server-alive-interval,14.recording-path,14.recording-name,24.recording-exclude-output,23.recording-exclude-mouse,22.recording-include-keys,21.create-recording-path,13.resize-method,18.enable-audio-input,9.read-only,16.gateway-hostname,12.gateway-port,14.gateway-domain,16.gateway-username,16.gateway-password,17.load-balance-info
03/04/2023 9:40:05
guacd[249]: INFO:	Security mode: Negotiate (ANY)
03/04/2023 9:40:05
guacd[249]: INFO:	Resize method: display-update
03/04/2023 9:40:05
[2023-04-03 09:40:05] [Connection 1]  Sending opCode: 7.connect,0.,9.127.0.0.1,4.3389,0.,3.abc,3.abc,4.1366,13.981?undefined,2.96,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,12.en-us-qwerty,3.any,4.true,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,14.display-update,0.,0.,0.,0.,0.,0.,0.,0.;
03/04/2023 9:40:05
guacd[249]: INFO:	User "@5efd2be8-3c1d-41de-8fef-2452b721892a" joined connection "$fb23e609-64de-41a4-a4b9-c92a2e0f9639" (1 users now present)
03/04/2023 9:40:05
guacd[249]: INFO:	Loading keymap "base"
03/04/2023 9:40:05
guacd[249]: INFO:	Loading keymap "en-us-qwerty"
03/04/2023 9:40:16
[2023-04-03 09:40:16] [Connection 1]  Closing connection with error:  Error: guacd was inactive for too long
03/04/2023 9:40:16
    at GuacdClient.checkActivity (/gclient/node_modules/guacamole-lite/lib/GuacdClient.js:35:41)
03/04/2023 9:40:16
[2023-04-03 09:40:16] [Connection 1]  Closing guacd connection
03/04/2023 9:40:16
[2023-04-03 09:40:16] [Connection 1]  Client connection closed
03/04/2023 9:40:16
    at listOnTimeout (node:internal/timers:559:17)
03/04/2023 9:40:16
    at processTimers (node:internal/timers:502:7)
03/04/2023 9:40:21
xauth:  file .Xauthority does not exist
03/04/2023 9:40:23
03/04/2023 9:40:23
X.Org X Server 1.21.1.4
03/04/2023 9:40:23
X Protocol Version 11, Revision 0
03/04/2023 9:40:23
Current Operating System: Linux ab5c620b69ec 5.10.60-qnap #1 SMP Wed Mar 22 18:12:13 CST 2023 x86_64
03/04/2023 9:40:23
Kernel command line: consoleblank=0 console=ttyS0,115200n8 intel_iommu=on,igfx_off i915.enable_hd_vgaarb=1 iommu=pt i915.disable_power_well=0 i915.enable_rc6=0 i915.enable_guc=2 memmap=2M$0x8000000 ramoops.mem_address=0x8000000 ramoops.mem_size=0x200000 ramoops.console_size=0x100000 usbcore.autosuspend=-1 zswap.enabled=1 zswap.compressor=lz4 BOOT_IMAGE=/boot/bzImage root=/dev/ram0 rw
03/04/2023 9:40:23
 
03/04/2023 9:40:23
Current version of pixman: 0.40.0
03/04/2023 9:40:23
	Before reporting problems, check http://wiki.x.org
03/04/2023 9:40:23
	to make sure that you have the latest version.
03/04/2023 9:40:23
Markers: (--) probed, (**) from config file, (==) default setting,
03/04/2023 9:40:23
	(++) from command line, (!!) notice, (II) informational,
03/04/2023 9:40:23
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
03/04/2023 9:40:23
(++) Log file: ".xorgxrdp.10.log", Time: Mon Apr  3 08:40:23 2023
03/04/2023 9:40:23
(++) Using config file: "/etc/X11/xrdp/xorg.conf"
03/04/2023 9:40:23
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
03/04/2023 9:40:26
Global configuration:
03/04/2023 9:40:28
xorgxrdpSetup:
03/04/2023 9:40:29
xrdpdevSetup:
03/04/2023 9:40:29
rdpmousePlug:
03/04/2023 9:40:29
rdpkeybPlug:
03/04/2023 9:40:29
rdpIdentify:
03/04/2023 9:40:29
rdpDriverFunc: op 10
03/04/2023 9:40:29
rdpProbe:
03/04/2023 9:40:30
rdpPreInit:
03/04/2023 9:40:30
rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
03/04/2023 9:40:30
rdpScreenInit: pfbMemory bytes 1920000
03/04/2023 9:40:30
rdpScreenInit: pfbMemory 0x7f55b77ab380
03/04/2023 9:40:30
rdpSimdInit: assigning yuv functions
03/04/2023 9:40:30
rdpSimdInit: cpuid ax 1 cx 0 return ax 0x000706a8 bx 0x02400800 cx 0x4ff8ebbf dx 0xbfebfbff
03/04/2023 9:40:30
rdpSimdInit: sse2 amd64 yuv functions assigned
03/04/2023 9:40:30
rdpClientConInit: disconnect idle session after [0] sec
03/04/2023 9:40:30
rdpClientConInit: kill disconnected [0] timeout [0] sec
03/04/2023 9:40:30
rdpXvInit: depth 24
03/04/2023 9:40:30
rdpScreenInit: out
03/04/2023 9:40:31
guacd[249]: ERROR:	User is not responding.
03/04/2023 9:40:31
guacd[249]: INFO:	User "@5efd2be8-3c1d-41de-8fef-2452b721892a" disconnected (0 users remain)
03/04/2023 9:40:31
guacd[249]: INFO:	Last user of connection "$fb23e609-64de-41a4-a4b9-c92a2e0f9639" disconnected
03/04/2023 9:40:31
guacd[249]: INFO:	Internal RDP client disconnected
03/04/2023 9:40:31
guacd[185]: INFO:	Connection "$fb23e609-64de-41a4-a4b9-c92a2e0f9639" removed.
03/04/2023 9:40:31
rdpCreateScreenResources:
03/04/2023 9:40:32
fuse: device not found, try 'modprobe fuse' first
03/04/2023 9:40:33
rdpmousePreInit: drv 0x7f55b7ecc9d0 info 0x7f55af4c4b50, flags 0x0
03/04/2023 9:40:33
rdpmouseControl: what 0
03/04/2023 9:40:33
rdpmouseDeviceInit:
03/04/2023 9:40:33
rdpmouseCtrl:
03/04/2023 9:40:33
rdpRegisterInputCallback: type 1 proc 0x7f55b79863b1
03/04/2023 9:40:33
rdpmouseControl: what 1
03/04/2023 9:40:33
rdpmouseDeviceOn:
03/04/2023 9:40:33
rdpkeybPreInit: drv 0x7f55b7ecca70 info 0x7f55af4c4c90, flags 0x0
03/04/2023 9:40:33
rdpkeybControl: what 0
03/04/2023 9:40:33
rdpkeybDeviceInit:
03/04/2023 9:40:33
rdpkeybChangeKeyboardControl:
03/04/2023 9:40:33
rdpkeybChangeKeyboardControl: autoRepeat on
03/04/2023 9:40:34
rdpRegisterInputCallback: type 0 proc 0x7f55b79818ad
03/04/2023 9:40:34
rdpkeybControl: what 1
03/04/2023 9:40:34
rdpkeybDeviceOn:
03/04/2023 9:40:34
rdpDeferredRandR:
03/04/2023 9:40:34
rdpResizeSession: width 1024 height 768
03/04/2023 9:40:34
  calling RRScreenSizeSet
03/04/2023 9:40:34
rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
03/04/2023 9:40:34
rdpRRGetInfo:
03/04/2023 9:40:34
  screen resized to 1024x768
03/04/2023 9:40:34
  RRScreenSizeSet ok 1
03/04/2023 9:40:34
rdpResizeSession: width 1364 height 981
03/04/2023 9:40:34
  calling RRScreenSizeSet
03/04/2023 9:40:34
rdpRRScreenSetSize: width 1364 height 981 mmWidth 361 mmHeight 260
03/04/2023 9:40:34
rdpRRGetInfo:
03/04/2023 9:40:34
  screen resized to 1364x981
03/04/2023 9:40:34
  RRScreenSizeSet ok 1
03/04/2023 9:40:35
rdpInDeferredRepeatCallback:
03/04/2023 9:40:35
rdpkeybChangeKeyboardControl:
03/04/2023 9:40:35
rdpkeybChangeKeyboardControl: autoRepeat off
03/04/2023 9:40:35
rdpClientConGotConnection:
03/04/2023 9:40:35
rdpClientConGotConnection: g_sck_accept ok new_sck 16
03/04/2023 9:40:35
rdpClientConGetConnection: idle_disconnect_timeout set to non-positive value, idle timer turned off
03/04/2023 9:40:35
rdpAddClientConToDev: adding first clientCon 0x7f55b7967110
03/04/2023 9:40:35
rdpClientConProcessMsgVersion: version 0 0 0 1
03/04/2023 9:40:35
rdpClientConSend: g_tcp_send failed(returned -1)
03/04/2023 9:40:35
rdpClientConSendCaps: rdpup_send failed
03/04/2023 9:40:35
rdpClientConDisconnect:
03/04/2023 9:40:35
rdpRemoveClientConFromDev: removing clientCon 0x7f55b7967110
03/04/2023 9:40:35
rdpRRGetInfo:
03/04/2023 9:40:35
fuse: device not found, try 'modprobe fuse' first
03/04/2023 9:40:35
fuse: device not found, try 'modprobe fuse' first

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Have you waited a while to see if firefox comes up? I have a very similar issue. If I wait for 5-10 minutes, then firefox comes up and works fine for the rest of the time the container is up. But if it gets restarted, then I have the issue again and have to wait 5-10 minutes AFTER my first connection attempt for it to be usable again.

Also, spinning my wheel mouse in the session after 10 minutes also flips around the virtual desktop and helps me find the session some times.

It would be awesome to figure out why it takes so long to come up.

This image has been rebased, can you please pull the latest image to test?

I have IPv6 disabled and it looks like it is failing to start without it:

``firefox-old | nginx: [emerg] socket() [::]:3000 failed (97: Address family not supported by protocol)`

I jumped the gun a bit, ipv6 is news to me I was concentrating on a bug for pulseaudio on older hosts.
The new image is now pushed.

Pulled the new image, but the v6 issue is still there.

Looks like the default.conf file for nginx needs to be adjusted if it is not running v6: https://techglimpse.com/nginx-error-address-family-solution/

I ran this:

sed -i 's/listen [::]:300/#listen [::]:300' /etc/nginx/http.d/default.conf

As a custom-cont-init.d/ script and it allows the container to come up. It still has the ~10 minute delay before it is usable though for me.

The startup time is concerning it might be an ipv6 fallback thing in KasmVNC, I will look at making ipv6 something that can be flagged off in the baseimages but I cannot promise a timeline on that.

@m-theredhead You can use the -e DISABLE_IPV6=true environment variable to achieve this now:

https://github.com/linuxserver/docker-baseimage-kasmvnc#options

@m-theredhead You can use the -e DISABLE_IPV6=true environment variable to achieve this now:

Thanks,

I added that variable to my docker-compose, removed my custom script to disable v6, and built a brand new firefox instance for testing.

It still takes about 10 minutes before firefox comes up. The screen is black, but you can use the wheel mouse to flip between 2 of the 4 virtual desktops.

If I docker exec into the container, I can see firefox running, but it just isn't on the screen.

Have you tried not mounting in the /config directory to be in a clean state?

Yes, that was what I meant when I build a brand new instance. I started it with an empty config directory.

This is incredibly hard to debug, what is firefox hanging on? With the desktop up you can right click launch xterm and run firefox from there to get the console output.

While the screen is black, I have access to the window manager and can start an xterm. The xterm comes up immediately.

In that X session, the firefox process is running but nothing on the screen. I kill it and make sure all firefox processes are gone.

Then starting firefox ( even with --safe-mode) yields the roughly 10 minute delay. It is however, eating 100% of the CPU during that time. Then it just pops up, and runs normally.

Here is the output on the console when it finally starts. It was typed by hang so hopefully no typos:
'Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Unrecognized feature ACCELERATED_CANVAS2D (t=515,181) [GFX1-]: Unrecognized feature ACCELERATED_CANVAS2D'

I also found this in the firefox error.log
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL initialize failed (t=0.367478) |[1][GFX1-]: glxtest: GLX extension missing (t=0.367514) [GFX1-]: glxtest: GLX extension missing

This image has LLVMpipe so even without a GPU it emulates all that stuff in CPU.
The only things you can really try are to run it seccomp unconfined.
What is the host OS arch/kernel version
output of runc --version

I am running on Fedora 37 x86_64 with kernel 6.2.9, KDE w/ Xorg.

root@firefox-old:/# runc --version
runc version 1.1.5
commit: f19387a6bec4944c770f7668ab51c4348d9c2f38
spec: 1.0.2-dev
go: go1.19.7
libseccomp: 2.5.4

Just for clarity, I have been seeing this issue for many months. I don't remember exactly when it started, but I would guess at least 6 months. I had basically just accepted it until I saw someone raise this ticket and thought I would chime in.

I wonder if it's selinux getting in the way, any difference if you disable it temporarily?

sudo setenforce 0

getenforce

Disabled

Its already disabled.

@m-theredhead you are fighting a firefox bug it looks like, I installed a Fedora 37 VM and updated it to latest.
Quick answer use the chromium image it works fine.
https://github.com/linuxserver/docker-chromium

Long answer is that in my testing (and I am pretty confident you will be able to replicate this) even the host level firefox can lock up the system.

Run the chromium container and open it in a browser on your host (not firefox) docker run --rm -it -p 3000:3000 --shm-size="1gb" linuxserver/chromium bash http://localhost:3000

Now open it in firefox (make sure you have 111.0.1-1.fc37 firefox installed) It must be some kind of host level incompatibility with the kernel.

I am closing this issue though as it is referring to an image problem pre-rebase and consolidating down to #23

It must be a firefox bug. The chromium image comes up right away.

Does this mean the linuxserver image/offering should be discontinued / pulled - if it’s not able to work ?

Does this mean the linuxserver image/offering should be discontinued / pulled - if it’s not able to work ?

This issue seems to be specific to the current latest Firefox inside of docker or other pseudo virtualization layers (snap, etc) on a host running Kernel version 6.
That is the only one I have been able to confirm.
The symptoms are the container comes up and Firefox is pegged at 100% cpu for many minutes before killing the zombie thread and eventually coming up.
I do not believe there is anything I can do to remedy this outside of recommending Kernel 5.19 or using Chromium until this can be resolved.
If anyone can get any useful output from a debug build of Firefox somehow that might be useful to present upstream.

changing shm_size: "1gb" to shm_size: "5gb" fixed it for me.

changing shm_size: "1gb" to shm_size: "5gb" fixed it for me.

I tried changing it from 1gb, to 5gb, and even 10gb and had the same result of the 10 minute delay