minecraft-wayland
minecraft-wayland copied to clipboard
Problems with desktop environments, and HIDPI when using libdecor branch
The minecraft window has really weird scalling and 2 weird white window borders, full screen doesnt fix, and mouse cursor doesnt hide while in game.
edit: manjaro gnome, 5.13 kernel, glfw-wayland-minecraft 3.3.4-2
Can you try the libdecoration
branch in this repo? That should fix the borders at least, though I am not entirely sure on the rest, as I don't use GNOME
ok lemme try
error :/
Applying patch /home/yavor/minecraft-wayland/src/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
/home/yavor/minecraft-wayland/PKGBUILD: line 41: /home/yavor/minecraft-wayland/src/0001-set-O_NONBLOCK-on-repeat-timerfd.patch: No such file or directory
I cant build it for some reason does anyone have a prebuilt binary?
Make sure you update the PKGBUILD along with the patches. The patch numbered 0001 in the "main" branch is numbered 0002 in "libdecoration" and that's why the PKGBUILD can't find it.
If you used git
to clone the repo, just do git checkout libdecoration
yeah i checked out to the branch, ok ill so that
I don't know what to do, I've never used this stuff, here are the logs, and i do have libdecor installed, and im not going to downgrade, should i? idk
libdecor [Installed] 0.1.0-3 extra
Client-side decorations library for Wayland clients
makepkg -si
==> Making package: glfw-wayland-minecraft 3.4.0-1 (Thu 28 Oct 2021 08:35:14 PM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found 6876cf8d7e0e70dc3e4d7b0224d08312c9f78099.tar.gz
-> Found 0001-libdecoration-support.patch
-> Found 0002-set-O_NONBLOCK-on-repeat-timerfd.patch
-> Found 0003-wayland-don-t-crash-app-on-api-calls-to-window-focus.patch
-> Found 0004-fix-broken-opengl-screenshots-on-mutter.patch
==> Validating source files with sha256sums...
6876cf8d7e0e70dc3e4d7b0224d08312c9f78099.tar.gz ... Passed
0001-libdecoration-support.patch ... Passed
0002-set-O_NONBLOCK-on-repeat-timerfd.patch ... Passed
0003-wayland-don-t-crash-app-on-api-calls-to-window-focus.patch ... Passed
0004-fix-broken-opengl-screenshots-on-mutter.patch ... Passed
==> Extracting sources...
-> Extracting 6876cf8d7e0e70dc3e4d7b0224d08312c9f78099.tar.gz with bsdtar
==> Starting prepare()...
Applying patch /home/yavor/minecraft-wayland/src/0001-libdecoration-support.patch
patching file CMakeLists.txt
patching file src/window.c
patching file src/wl_init.c
patching file src/wl_platform.h
patching file src/wl_window.c
Applying patch /home/yavor/minecraft-wayland/src/0002-set-O_NONBLOCK-on-repeat-timerfd.patch
patching file src/wl_init.c
Applying patch /home/yavor/minecraft-wayland/src/0003-wayland-don-t-crash-app-on-api-calls-to-window-focus.patch
patching file src/wl_window.c
Applying patch /home/yavor/minecraft-wayland/src/0004-fix-broken-opengl-screenshots-on-mutter.patch
patching file src/egl_context.c
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The C compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.2") found components: doxygen
-- Using Wayland for window creation
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Checking for modules 'wayland-client>=0.2.7;wayland-cursor>=0.2.7;wayland-egl>=0.2.7;xkbcommon'
-- Found wayland-client, version 1.19.0
-- Found wayland-cursor, version 1.19.0
-- Found wayland-egl, version 18.1.0
-- Found xkbcommon, version 1.3.1
-- Checking for module 'libdecor-0.1'
-- Package 'libdecor-0.1', required by 'virtual:world', not found
CMake Error at /usr/share/cmake-3.21/Modules/FindPkgConfig.cmake:562 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.21/Modules/FindPkgConfig.cmake:784 (_pkg_check_modules_internal)
CMakeLists.txt:231 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/home/yavor/minecraft-wayland/src/glfw-6876cf8d7e0e70dc3e4d7b0224d08312c9f78099/build-wayland/CMakeFiles/CMakeOutput.log".
See also "/home/yavor/minecraft-wayland/src/glfw-6876cf8d7e0e70dc3e4d7b0224d08312c9f78099/build-wayland/CMakeFiles/CMakeError.log".
==> ERROR: A failure occurred in build().
Aborting...
@yavko I opened #9 with some fixes, related to Gnome, could you try it?
I can provide prebuilt package, but I highly discourage from doing it (as launching binaries from random places of web is not a good idea at all).
Ok @Prototik!
It built without issue! Thanks!
I wanted to add that the title bar is a bit weird it would be nice if it could use native GTK title bar!
and cursors don't hide and don't start from the center!
And menus appear blurry
I don't know if the issue comes from this, but I hope there are fixes to these issues!
In GNOME, you can't use the "native GTK title bar" unless you use a majority of the GTK toolkit. (libdecor is, as far as I know, intended to be a "solution" to this in the future, but I am not exactly sure on that just yet) This is GNOME's decision (search for client-side decorations on their issue tracker) which is one of the reasons why I don't use GNOME on my personal machines.
I'll take a look at the PR in a sec
I noticed blurriness as well in https://github.com/Admicos/minecraft-wayland/issues/2, although unfortunately I never got around to fully testing and reporting that. If you can, please forward that issue to the glfw libdecor PR as that’s fairly important for them to know.
PR #11 should fix the mouse cursor issue, though I haven't tested it that much
PR #11 should fix the mouse cursor issue, though I haven't tested it that much
ooooh what about hidpi?
@Admicos Are you on HIDPI?
No, sorry. I don't have any hi-dpi display
In theory for the sake of testing, you might be able to set even a 1080p display to 200% scaling temporarily (even though it will be janky, the test is still valid).
Yeah idk what the issue is since idk anything about opengl or window decorations :|
I would guess the hidpi blur issue is either in the libdecor glfw patch or in libdecor itself, but I haven't been able to test this properly.
I know SDL has some sort of libdecor support, perhaps that would be a useful test.
btw i need to add something, i have only played on version 1.8.8 1.12.2 1.17.1 1.18 and only 1.17 and 1.18 have the non native window decor and ui bluriness
That's strange, I will test it out in a moment.
That's strange, I will test it out in a moment.
im using multimc btw
There's possibly an incompatibility between older java that older minecraft versions use and modern glfw.
There's possibly an incompatibility between older java that older minecraft versions use and modern glfw.
yeah im using graalvm 8 for everything below 1.17, graalvm 17 for 1.17 and above
I assume that's a java fork? Yeah that's probably the reason, java 8 is very old. Not sure how minecraft/glfw upstream can workaround that problem.
https://github.com/Admicos/minecraft-wayland#requirements
I assume that's a java fork? Yeah that's probably the reason, java 8 is very old. Not sure how minecraft/glfw upstream can workaround that problem.
its a openjdk distro by oracle that is made on java instead of C and runs like wayyy faster
oh lol i forgot 1.13+