White screen in the clock example inside a VM with X forwarding
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
I don't trust developers (including myself), so on my personal PC I do programming inside a VM. As a benefit, I get a clean system without tons of library pollution, as a drawback, things sometimes just don't work, the same happens to iced inside a vagrant box with GUI forwarded through ssh. The window appears, but the whole canvas is just white.
Unfortunately, I can't provide viable steps, I tried to make them up, but probably I need to install more libraries or something, cuz now it's even worse, the screen is black and the app terminates immediately with a message Segmentation fault (core dumped).
Steps to (try to) reproduce:
- Create a box
vagrant init ubuntu/focal64
- Enable X forwarding
vim Vagrantfile
Add these lines before the last end:
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
You can also optionally uncomment the config.vm.provider "virtualbox" do |vb| and ask for more CPU and memory to make compilation faster
vb.memory = "6144"
vb.cpus = "12"
- Start the VM
vagrant up
vagrant ssh
- Inside the VM, install necessary software and run the example
sudo apt update && sudo apt upgrade && sudo apt install -y build-essential x11-apps mesa-utils libxrandr2 libxi6
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1<Enter>
source $HOME/.cargo/env
git clone --depth 1 https://github.com/iced-rs/iced.git
cd iced/
cargo run --package clock
- Observe the white screen and these errors in the logs (or the seg fault)
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
The host system is Ubuntu
> lsb_release -a 1 ms
No LSB modules are available.
Distributor ID: Neon
Description: KDE neon User - 5.24
Release: 20.04
Codename: focal
Running everything in Gnome with X11. Feel free to ask for more info/logs/anything.
What is the expected behavior?
Clock
Version
master
Operative System
Linux
Do you have any log output?
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
@DevAlone What does your Cargo.toml file look like?
Using X11 forwarding with my machines works (contents of the canvas get drawn) as simply as
ssh -X remote
cargo run
The warnings appear as well, but it didn't cause any issues.
My Cargo.toml:
[dependencies.iced]
version = "0.4.2"
default-features = false
features = ["wgpu", "canvas", "tokio", "debug"]