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

Error: Visual 0xb3 does not use softbuffer's pixel format and is unsupported #215

Open
wiiznokes opened this issue Apr 30, 2024 · 5 comments

Comments

@wiiznokes
Copy link

I have two users who reported this error in my not so used app. I see it is expected to not work but what the story about this ? Is it going to be supported at some point ?

thread 'main' panicked at /run/build/fan-control/cargo/vendor/iced_tiny_skia/src/window/compositor.rs:56:10:
Create softbuffer surface for window: PlatformError(Some("Visual 0xb3 does not use softbuffer's pixel format and is unsupported"), None)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@notgull
Copy link
Member

notgull commented May 7, 2024

@wiiznokes Can you please share the output of xdpyinfo on the affected system?

@wiiznokes
Copy link
Author

xdpyinfooutput.txt

@notgull
Copy link
Member

notgull commented May 8, 2024

I asked a question to the user on the linked issue: wiiznokes/fan-control#98 (comment)

@orsinium
Copy link

orsinium commented May 8, 2024

I faced the same issue when running the hello world for winit.

Reproduce:

git clone git@github.com:rust-windowing/winit.git
cd winit
cargo run --example window

Output:

2024-05-08T06:29:53.282877Z  INFO window: Starting to send user event every second
2024-05-08T06:29:53.283745Z  INFO window: Loading cursor assets
2024-05-08T06:29:53.284421Z  INFO window: Resumed the event loop
2024-05-08T06:29:53.284437Z  INFO window: Monitors information
2024-05-08T06:29:53.295810Z  INFO window: Primary monitor: HDMI-2
2024-05-08T06:29:53.295828Z  INFO window:   Current mode: 3424x1926 @ 59.950 Hz
2024-05-08T06:29:53.295838Z  INFO window:   Position: 0,0
2024-05-08T06:29:53.295844Z  INFO window:   Scale factor: 2
2024-05-08T06:29:53.295851Z  INFO window:   Available modes (width x height x bit-depth):
2024-05-08T06:29:53.295864Z  INFO window:     2560x1440x24 @ 59.950 Hz
2024-05-08T06:29:53.295873Z  INFO window:     2560x1440x24 @ 74.968 Hz
2024-05-08T06:29:53.295880Z  INFO window:     1920x1080x24 @ 119.982 Hz
2024-05-08T06:29:53.295893Z  INFO window:     1920x1080x24 @ 99.930 Hz
2024-05-08T06:29:53.295900Z  INFO window:     1920x1080x24 @ 60.0 Hz
2024-05-08T06:29:53.295907Z  INFO window:     1920x1080x24 @ 60.0 Hz
2024-05-08T06:29:53.295915Z  INFO window:     1920x1080x24 @ 50.0 Hz
2024-05-08T06:29:53.295922Z  INFO window:     1920x1080x24 @ 59.940 Hz
2024-05-08T06:29:53.295929Z  INFO window:     1280x1440x24 @ 59.912 Hz
2024-05-08T06:29:53.295936Z  INFO window:     1280x1024x24 @ 75.24 Hz
2024-05-08T06:29:53.295943Z  INFO window:     1280x1024x24 @ 60.19 Hz
2024-05-08T06:29:53.295950Z  INFO window:     1440x900x24 @ 59.901 Hz
2024-05-08T06:29:53.295957Z  INFO window:     1280x720x24 @ 60.0 Hz
2024-05-08T06:29:53.295965Z  INFO window:     1280x720x24 @ 50.0 Hz
2024-05-08T06:29:53.295972Z  INFO window:     1280x720x24 @ 59.940 Hz
2024-05-08T06:29:53.295979Z  INFO window:     1024x768x24 @ 119.988 Hz
2024-05-08T06:29:53.295986Z  INFO window:     1024x768x24 @ 75.28 Hz
2024-05-08T06:29:53.295994Z  INFO window:     1024x768x24 @ 70.69 Hz
2024-05-08T06:29:53.296001Z  INFO window:     1024x768x24 @ 60.3 Hz
2024-05-08T06:29:53.296009Z  INFO window:     832x624x24 @ 74.551 Hz
2024-05-08T06:29:53.296016Z  INFO window:     800x600x24 @ 119.971 Hz
2024-05-08T06:29:53.296023Z  INFO window:     800x600x24 @ 72.187 Hz
2024-05-08T06:29:53.296030Z  INFO window:     800x600x24 @ 75.0 Hz
2024-05-08T06:29:53.296038Z  INFO window:     800x600x24 @ 60.316 Hz
2024-05-08T06:29:53.296045Z  INFO window:     800x600x24 @ 56.250 Hz
2024-05-08T06:29:53.296052Z  INFO window:     720x576x24 @ 50.0 Hz
2024-05-08T06:29:53.296059Z  INFO window:     720x480x24 @ 60.0 Hz
2024-05-08T06:29:53.296066Z  INFO window:     720x480x24 @ 59.940 Hz
2024-05-08T06:29:53.296073Z  INFO window:     640x480x24 @ 75.0 Hz
2024-05-08T06:29:53.296081Z  INFO window:     640x480x24 @ 72.808 Hz
2024-05-08T06:29:53.296088Z  INFO window:     640x480x24 @ 66.666 Hz
2024-05-08T06:29:53.296095Z  INFO window:     640x480x24 @ 60.0 Hz
2024-05-08T06:29:53.296102Z  INFO window:     640x480x24 @ 59.940 Hz
2024-05-08T06:29:53.296109Z  INFO window:     720x400x24 @ 70.81 Hz
2024-05-08T06:29:53.296293Z  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 2
thread 'main' panicked at examples/window.rs:467:46:
failed to create initial window: PlatformError(Some("Visual 0x79 does not use softbuffer's pixel format and is unsupported"), None)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

uname -a:

Linux monolith 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

xdpyinfo for visual 0x79:

  visual:
    visual id:    0x79
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits

@psychon
Copy link
Contributor

psychon commented Jun 1, 2024

For the winit part, see: rust-windowing/winit#3646

(I'll leave it to someone else to decide whether this issue can be closed as "winit bug")

The problem is this part of the visual information:

depth: 32 planes

softbuffer used to "trust you" that you used it directly. Since commit 09b8126 it actually checks that the visual is correct. Softbuffer never supported (nor claimed to support) transparency, but winit tries to use ARGB visuals anyway.

A work around is to not use with_transparent(true) with winit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants