Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White screen in the clock example inside a VM with X forwarding #1343

Open
2 tasks done
DevAlone opened this issue May 15, 2022 · 2 comments
Open
2 tasks done

White screen in the clock example inside a VM with X forwarding #1343

DevAlone opened this issue May 15, 2022 · 2 comments
Labels
bug Something isn't working compatibility rendering

Comments

@DevAlone
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • 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:

  1. Create a box
vagrant init ubuntu/focal64
  1. 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"
  1. Start the VM
vagrant up
vagrant ssh
  1. 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
  1. 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 DevAlone added the bug Something isn't working label May 15, 2022
@DevAlone DevAlone changed the title Clock example doesn't work with X forwarding White screen in the clock example inside a VM with X forwarding May 15, 2022
@xTekC
Copy link
Contributor

xTekC commented Jun 19, 2022

@DevAlone
What does your Cargo.toml file look like?

@torkleyy
Copy link

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility rendering
Projects
None yet
Development

No branches or pull requests

4 participants