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

v0.41.0 fails DMABUF on FreeBSD #6408

Closed
jbeich opened this issue Jun 10, 2024 · 12 comments · Fixed by #6471
Closed

v0.41.0 fails DMABUF on FreeBSD #6408

jbeich opened this issue Jun 10, 2024 · 12 comments · Fixed by #6471
Labels
bug Something isn't working

Comments

@jbeich
Copy link
Contributor

jbeich commented Jun 10, 2024

Bug or Regression?

Regression

System Info and Version

System/Version info
$ hyprctl systeminfo -c
Hyprland, built from branch main at commit ea2501d4556f84d3de86a4ae2f4b22a474555b9f portbld (?).
Date: Mon Jun 10 14:23:06 UTC 2024
Tag: v0.41.0, commits: ?

flags: (if any)


System Information:
System name: FreeBSD
Node name: foo.bar
Release: 15.0-CURRENT
Version: FreeBSD 15.0-CURRENT #0 main-n270588-480ad4055314: Tue Jun  4 21:21:33 UTC 2024     test@foo.bar:/usr/obj/usr/src/amd64.amd64/sys/MYKERNEL


GPU information: 
vgapci1@pci0:0:2:0:	class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x1912 subvendor=0x1462 subdevice=0x7968
    vendor     = 'Intel Corporation'
    device     = 'HD Graphics 530'
    class      = display
    subclass   = VGA

os-release: NAME=FreeBSD
VERSION="15.0-CURRENT"
VERSION_ID="15.0"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 15.0-CURRENT"
CPE_NAME="cpe:/o:freebsd:freebsd:15.0"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"


plugins:

======Config-Start======


Config File: /tmp/hyprland.conf: Read Succeeded
bind = SUPER, BackSpace, exit
bind = SUPER, Return, exec, vkcube-wayland

debug {
      enable_stdout_logs = true
      disable_logs = false
}

======Config-End========

Description

Regressed by #6268

# Error out if GPU rendering fails instead of falling back
$ sudo rm /usr/lib/dri/{swrast,zink}_dri.so

$ mpv --no-config --vo=gpu-next --gpu-context=wayland /path/to/foo.mp4
[...]
libEGL warning: wayland-egl: we could not map the format table so we won't be able to use this batch of dma-buf feedback events.
libEGL warning: MESA-LOADER: failed to open swrast: Cannot open "/usr/lib/dri/swrast_dri.so" (search paths /usr/local/lib/dri, suffix _dri)

[vo/gpu-next] Failed initializing any suitable GPU context!
Error opening/initializing the selected video_out (--vo) device.

$ vkcube-wayland
Selected GPU 0: Intel(R) HD Graphics 530 (SKL GT2), type: IntegratedGpu
Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.

$ Hyprland
[...]
[ERR] [LinuxDMABUF] FIXME: surface feedback stub
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 20: size [Vector2D: x: 500, y: 500], fmt 0, planes 1
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927935 fd 41 stride 512 offset 0
[EGL] command: eglCreateImageKHR, error: EGL_BAD_MATCH (0x3009), message: "unknown drm fourcc format"
[ERR] EGL: EGLCreateImageKHR failed: 12297
[ERR] [LinuxDMABUF] Possibly compositor bug: buffer failed to create
[...]

How to reproduce

Unknown. I can't test on Linux or with an AMD GPU.

Crash reports, logs, images, videos

hyprland.log

@jbeich jbeich added the bug Something isn't working label Jun 10, 2024
@jbeich jbeich changed the title v0.41.0 fails DMABUF on Intel iGPU v0.41.0 fails DMABUF on FreeBSD Jun 10, 2024
@vaxerski
Copy link
Member

hm, looks like the format table got fucked.

@vaxerski
Copy link
Member

#pragma pack(push, 1)
struct SDMABUFFeedbackTableEntry {
uint32_t fmt = 0;
char pad[4];
uint64_t modifier = 0;
};
#pragma pack(pop)

Is there something wrong here? I remember wlroots having some comment complaining about BSD.

I'm guessing this is some bsd issue.

@vaxerski
Copy link
Member

generally from the log hyprland seems to collect the dmabuf formats correctly, but the table in linux-dmabuf is malformed.

Most of the logic is here: https://github.com/hyprwm/Hyprland/blob/811429bfd4a46f33c7788580f72038b0c3c1c2b1/src/protocols/LinuxDMABUF.cpp

and it was tested under nvidia, amd and intel (albeit on linux) and was working.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Jun 10, 2024
@iamtimmy

This comment was marked as off-topic.

@vaxerski

This comment was marked as off-topic.

@iamtimmy

This comment was marked as off-topic.

@vaxerski

This comment was marked as off-topic.

@iamtimmy

This comment was marked as off-topic.

@vaxerski

This comment was marked as off-topic.

@iamtimmy

This comment was marked as off-topic.

tcberner pushed a commit to freebsd/freebsd-ports-kde that referenced this issue Jun 11, 2024
@vaxerski

This comment was marked as off-topic.

@jbeich

This comment was marked as off-topic.

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

Successfully merging a pull request may close this issue.

3 participants