linuxserver / docker-webtop

Ubuntu, Alpine, Arch, and Fedora based Webtop images, Linux in a web browser supporting popular desktop environments.
GNU General Public License v3.0
1.68k stars 164 forks source link

[BUG] Unable to load Firefox and VS-Code when running on Raspberry Pi4 #222

Closed TetsujinXLIV closed 4 months ago

TetsujinXLIV commented 4 months ago

Is there an existing issue for this?

Current Behavior

When trying to set this up on my raspberry pi 4 Firefox and VS-Code I haven't tried anything else won't render properly. I found an old issue with something similar and it was commented to not use portainer which I was using but I have since tried it with docker-compose and have the same issue both with and without /dev/dri mounted. I have also checked for the config that was mentioned I found it on rdesktop not on webtop I assume because it my be standard now since I didn't have to change the setting it was already set properly. I will attached my compose layout

image

Expected Behavior

No response

Steps To Reproduce

Use the config I provided above. Open Kasmvnc in another browser and then once on the ubuntu desktop open Firefox.

Environment

- OS:
Operating System: Debian GNU/Linux 12 (bookworm)  
          Kernel: Linux 6.1.0-rpi8-rpi-v8
    Architecture: arm64

- How docker service was installed:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Install Docker
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose

# Create docker group
sudo groupadd docker

# Add the user to the group
sudo usermod -aG docker $USER

CPU architecture

arm64

Docker creation

version: "2.1"
    services:
      webtop:
        image: ghcr.io/linuxserver/webtop:ubuntu-xfce
        container_name: webtop
        privileged: true
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=America/Los_Angeles
          - START_DOCKER=false
          - CUSTOM_USER=user
          - PASSWORD=password
          - TITLE=ubuntu
        volumes:
          - /home//docker_files/webtop/config:/config
        ports:
          - 3000:3000
        shm_size: "3gb"
        restart: unless-stopped
        devices:
          - /dev/dri:/dev/dri

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

**** adding /dev/dri/renderD128 to video group ssl-cert with id 105 ****
**** adding /dev/dri/card1 to video group video with id 44 ****
**** permissions for /dev/dri/card0 are good ****
[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.2.0 - built Mar  2 2024 18:57:46
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

[ls.io-init] done.
 2024-03-09 23:47:41,026 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-03-09 23:47:41,088 [PRIO] Connections: accepted: @192.168.2.246_1710056861.27993::websocket
xvnc_get_formats
xvnc_get_formats
(EE) 
(EE) Backtrace:
(EE) 0: /usr/local/bin/Xvnc (OsSigHandler+0x38) [0x5556506d78]
(EE) unw_get_proc_info failed: no unwind info found [-10]
(EE) 
(EE) Segmentation fault at address 0x7fa5f7a000
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

Xvnc KasmVNC 1.2.0 - built Mar  2 2024 18:57:46
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

 2024-03-09 23:47:52,657 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-03-09 23:47:52,728 [PRIO] Connections: accepted: @192.168.2.246_1710056872.666150::websocket
xvnc_get_formats
xvnc_get_formats
xvnc_get_formats
 2024-03-09 23:48:59,882 [PRIO] Connections: closed: @192.168.2.246_1710056872.666150::websocket (Clean disconnection)
github-actions[bot] commented 4 months ago

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

thelamer commented 4 months ago

Don't mount in /dev/dri If you discover the package needed in the alpine repos for this gpu feel free to post it, I don't have any broadcom stuff.

TetsujinXLIV commented 4 months ago

Thank you for commenting back. I have tried both with and without /dev/dri. I will remove it again. I'm not sure how to find that. Is there something I can look for to identify what's needed?

thelamer commented 4 months ago

I don't have a pi, but I remember the boot config needs to enable the GPU as it is disabled by default. https://wiki.alpinelinux.org/wiki/Raspberry_Pi#Traditional_disk-based_(sys)_installation

The vc4 stuff, this is outside the container, but in general without dri you should be good from a rendering standpoint as it is pure cpu like other systems.

Also drop privileged that mounts in the video card as well.

TetsujinXLIV commented 4 months ago

I checked and those settings were already set so that part is good. YES! Turning off privileged mode has fixed it! However, what I am trying to do is have this be a desktop that I can do some coding on and to do that I need vs-code and 1password installed. vs-code needs privileged mode I believe. I just checked and I can't launch vs-code in the desktop now with privileged mode disabled.

thelamer commented 4 months ago

vs-code needs seccomp unconfined unless you launch it with --no-sandbox The privileged flag will just enable docker in the container. https://github.com/linuxserver/docker-vscodium/blob/master/root/usr/bin/codium

In general though this makes me realize I need a flag to disable DRI3 acceleration as it might not work all the time.

TetsujinXLIV commented 4 months ago

Thank you this did fix it!