swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.69k stars 1.11k forks source link

invisible mouse cursor - Failed to pick cursor format - Failed to render cursor buffer - starting wdisplays shows cursor #7194

Closed Fisk-Germany closed 2 years ago

Fisk-Germany commented 2 years ago
emersion commented 2 years ago

Can you try again with the latest Sway commit? See https://github.com/swaywm/sway/wiki/Development-Setup#compiling-as-a-subproject

Fisk-Germany commented 2 years ago

Thanks a lot for your hint. I've just tried to load an compile sway. I want to give a few hints for those who want to do it on debian testing (bookwork aka version 12).

a) compile wlroots as folder (subprojects/wlroots) at first --> almost all dependencies can be found (via apt install) except: xcb-errors --> so load and compile (./autogen.sh && make && make install) https://gitlab.freedesktop.org/xorg/lib/libxcb-errors b) compile sway (in the parent folder of the described directory) --> almost all dependencies can be found (via apt install) except: fish aka (fish-shell) --> so you will find (e.g. a deb package) from https://fishshell.com/

Fisk-Germany commented 2 years ago

i am absolutely sorry, but i don't get a cursor either with the compile latest version: 00:00:00.000 [INFO] [sway/main.c:338] Sway version 1.8-dev-b0fc8348 (Oct 1 2022, branch 'master') 00:00:00.000 [INFO] [sway/main.c:339] wlroots version 0.16.0-dev cf.: https://gist.github.com/Fisk-Germany/3f90c351f3bd8c211c2a584faed72641

emersion commented 2 years ago

Can you try https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3744?

Fisk-Germany commented 2 years ago

i've cloned your repository instead of the official one and switched to your MR branch, I've just build your wlroots version and sway. i am going to answer in a few minutes.

Fisk-Germany commented 2 years ago

i am sorry, i do not see any cursor: https://gist.github.com/Fisk-Germany/633866ecf63f064ed3009c4627db750e

Fisk-Germany commented 2 years ago

git remote -v origin https://gitlab.freedesktop.org/emersion/wlroots.git (fetch) origin https://gitlab.freedesktop.org/emersion/wlroots.git (push)

Fisk-Germany commented 2 years ago

git status On branch pixman-drm-linear nothing to commit, working tree clean

Fisk-Germany commented 2 years ago

thanks a lot! i've just updated your mr feature branch via

git pull origin pixman-drm-linear

now, i do have a cursor! excellent! :-)

cf.: https://gist.github.com/Fisk-Germany/4ce3e12ed2171ff77cbead5bdbcc34e7

Fisk-Germany commented 2 years ago

` 00:00:00.005 [INFO] [wlr] [render/egl.c:192] Supported EGL client extensions: EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless 00:00:00.005 [DEBUG] [wlr] [render/egl.c:460] Using EGL device /dev/dri/card0 error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

libEGL warning: egl: failed to create dri2 screen 00:00:00.020 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen" error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

libEGL warning: egl: failed to create dri2 screen 00:00:00.023 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen" 00:00:00.023 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize" 00:00:00.023 [ERROR] [wlr] [render/egl.c:255] Failed to initialize EGL 00:00:00.023 [ERROR] [wlr] [render/egl.c:545] Failed to initialize EGL context 00:00:00.023 [ERROR] [wlr] [render/gles2/renderer.c:685] Could not initialize EGL 00:00:00.023 [DEBUG] [wlr] [render/wlr_renderer.c:271] Failed to create a GLES2 renderer. Skipping! `

emersion commented 2 years ago

Ah, yes, it got further but hit another error. I've pushed another commit to help with that.

One important thing to note: wlroots falls back to Pixman on your setup. That means your GPU isn't used by Sway to render the desktop. As indicated by that error message, it seems like you kernel is too old:

error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.
Fisk-Germany commented 2 years ago

my linux kernel is:

uname -a Linux my-host-name 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux

this must be some kind of "contradiction" to:

00:00:00.005 [DEBUG] [wlr] [render/egl.c:460] Using EGL device /dev/dri/card0 error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

libEGL warning: egl: failed to create dri2 screen 00:00:00.020 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen" error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

Fisk-Germany commented 2 years ago

i am going to compile your latest commit: i am to going to post a comment after testing it

emersion commented 2 years ago

Hm, indeed, looks like a Mesa bug to me. Can you report it here?

https://gitlab.freedesktop.org/mesa/mesa/

Fisk-Germany commented 2 years ago

you second commit works good

cf.: https://gist.github.com/Fisk-Germany/1854ad70911f1fcdded50b0c6159b062

Fisk-Germany commented 2 years ago

Hm, indeed, looks like a Mesa bug to me. Can you report it here?

https://gitlab.freedesktop.org/mesa/mesa/

Thanks for pointing me to the correct website. I am going to file an issue there.

Fisk-Germany commented 2 years ago

Hm, indeed, looks like a Mesa bug to me. Can you report it here? https://gitlab.freedesktop.org/mesa/mesa/

Thanks for pointing me to the correct website. I am going to file an issue there.

i need an approval of the admin to create an account. for that reason, i haven't filed an issue yet.

Fisk-Germany commented 2 years ago

as your branch was deleted while merging, i tried to use the master branch of both wlroots and sway. unfortunatelly sway crashes on startup:

https://gist.github.com/Fisk-Germany/d50404130ddf640243040c30a365c128

--> should i create an new issue on github or is this releated to the issue which i am posting in?

emersion commented 2 years ago

Yeah, the new failure on start is intentional, it has been introduced here: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3745/diffs?commit_id=49738406a383d859ffb7d37738556b3936cacf15

If you want to use software rendering, you'll need to manually opt-in by setting WLR_RENDERER=pixman.

If your GitLab account is still inactive, I can activate it, just indicate your GitLab username.

Fisk-Germany commented 2 years ago

a) I found a confirmation e-mail in my Junk-Email / Spam E-Mail folder. Than, I was able to file an issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7407 I kindly ask for your help describing the renderer problem in a correct way: what exactly is the problem with mesa regarding my linux kernel? If you have access rights to adjust gitlab-issues, can you please so kind and modify the text of this issue? https://gitlab.freedesktop.org/mesa/mesa/-/issues/7407

b) thanks a lot! I've just added

export WLR_RENDERER=pixman

to .profile -> now i can use sway, again ... :-)

cf.: https://gist.github.com/Fisk-Germany/4fe602564784485369809243c29a7c5c#file-sway-startup-with-environment-variable-log-L1044

emersion commented 2 years ago

Thanks. There isn't much more we can do from the Sway/wlroots side, so I'm going to close this as a driver bug.