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

linux/SDL: fails to run on Wayland (Vulkan backend) #16163

Closed
5 tasks done
gucio321 opened this issue Oct 5, 2022 · 38 comments · Fixed by #16251
Closed
5 tasks done

linux/SDL: fails to run on Wayland (Vulkan backend) #16163

gucio321 opened this issue Oct 5, 2022 · 38 comments · Fixed by #16251

Comments

@gucio321
Copy link
Contributor

gucio321 commented Oct 5, 2022

Game or games this happens in

<doesn't matter>

What area of the game / PPSSPP

PPSSPP doesn't start on my linux machine.
I'm getting backend error (see logs)
A few days ago, I succeeded compiling the app on another linux machine.

What should happen

app should start

Logs

logs

44:01:524 Core/Config.cpp:649 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
44:01:536 UI/NativeApp.cpp:416 E[LOADER]: Failed graphics backends: OPENGL,VULKAN,ALL
44:01:536 Core/Config.cpp:751 E[LOADER]: Graphics backend failed for 0, trying another
44:01:536 Core/Config.cpp:776 E[LOADER]: All graphics backends failed
VulkanMayBeAvailable: Device allowed ('SDL:Linux')
VulkanMayBeAvailable: Library loaded ('libvulkan.so.1')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 19
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
VulkanMayBeAvailable: Ineligible device found and ignored: 'llvmpipe (LLVM 14.0.0, 256 bits)'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.24.0 and we are linking against SDL version 2.24.0. :)
ThreadManager::Init(compute threads: 8, all: 16)
Pixels: 960 x 544
Virtual pixels: 960 x 544
Failed to initialize glew!
GL init error ''
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
Segmentation fault (core dumped)

Platform

Linux / BSD

Mobile phone model or graphics card

Fedora 36; AMD ATI Radeon Vega Series / Radeon Vega Mobile Series

PPSSPP version affected

64c5b5e

Last working version

No response

Graphics backend (3D API)

OpenGL / GLES

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@unknownbrackets
Copy link
Collaborator

What this means is that PPSSPP has crashed on startup trying to init your graphics drivers for both OpenGL and Vulkan. So other apps that use OpenGL, Vulkan, or GLES work? Is it compiled against the right target (USING_FBDEV, Wayland, etc.)?

-[Unknown]

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 5, 2022

well, the deal is, that I'm using gnome based on Wayland. After switching to Xorg version, it started working. How to compile PPSSPP for wayland?

@unknownbrackets
Copy link
Collaborator

I think you need -DUSE_WAYLAND_WSI=ON in cmake, and make sure it doesn't say "Could not find Wayland libraries, disabling Wayland WSI support for Vulkan." Your SDL also needs Wayland support, of course.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Oct 6, 2022

I wonder if we could make it auto-detect with both code paths always on, so you could use the same binary.

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 6, 2022

Well, I've tried to build with USE_WAYLAND_WSI=ON

my change to b.sh
diff --git a/b.sh b/b.sh
index b68e93e2c..fa2eaaa7b 100755
--- a/b.sh
+++ b/b.sh
@@ -96,6 +96,6 @@ set -e
 mkdir -p ${BUILD_DIR}
 pushd ${BUILD_DIR}
 
-cmake $CMAKE_ARGS ..
+cmake $CMAKE_ARGS -DUSE_WAYLAND_WSI=ON .. 
 make -j$CORES_COUNT $MAKE_OPT
 popd

and got the following result: window doesn't appear, there is only the window's decoration...
image

@hrydgard
Copy link
Owner

hrydgard commented Oct 6, 2022

Ok, clear we need to do some work on wayland support..

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 6, 2022

yah, it'd be nice since some linux distros are using it by default (e.g. Fedora uses gnome on wayland. It is possible to switch to Xorg but some features doesn't work)

I'm trying to find what's going wrong.

output from cmake -DUSE_WAYLAND_WSI=ON ..
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- 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
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
Normal Build
Using X11 for Vulkan
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (WAYLAND_CLIENT) does not match the name of the calling package (Wayland).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindWayland.cmake:52 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:189 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found WAYLAND_CLIENT: /usr/lib64/libwayland-client.so  
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (WAYLAND_SERVER) does not match the name of the calling package (Wayland).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindWayland.cmake:53 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:189 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found WAYLAND_SERVER: /usr/lib64/libwayland-server.so  
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (WAYLAND_EGL) does not match the name of the calling package (Wayland).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindWayland.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:189 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found WAYLAND_EGL: /usr/lib64/libwayland-egl.so  
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (WAYLAND_CURSOR) does not match the name of the calling package (Wayland).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindWayland.cmake:55 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:189 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found WAYLAND_CURSOR: /usr/lib64/libwayland-cursor.so  
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (WAYLAND)
  does not match the name of the calling package (Wayland).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindWayland.cmake:56 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:189 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found WAYLAND: /usr/lib64/libwayland-client.so;/usr/lib64/libwayland-server.so;/usr/lib64/libwayland-egl.so;/usr/lib64/libwayland-cursor.so  
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found SDL2: /usr/lib64/libSDL2.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- No build type selected, default to Release
CMAKE_SYSTEM_PROCESSOR: x86_64
Generating for x86, Release
Generating for x86_64, Release
-- Found GLEW: /usr/include (found version "2.2.0") 
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.6", minimum required is "3") 
-- Google Mock was not found - tests based on that will not build
-- spirv-tools not linked - illegal SPIRV may be generated for HLSL
-- Could NOT find Snappy (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR) 
--  Found avcodec: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/lib/libavcodec.a
--  Found avformat: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/lib/libavformat.a
--  Found avutil: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/lib/libavutil.a
--  Found swresample: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/lib/libswresample.a
--  Found swscale: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/lib/libswscale.a
-- Found FFmpeg: /home/mszeptuch/tmp/ppsspp/ffmpeg/linux/x86_64/include  found components: avcodec avformat avutil swresample swscale 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Could NOT find LIBZIP (missing: LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR) 
-- Found PNG: /usr/lib64/libpng.so (found suitable version "1.6.37", minimum required is "1.6") 
-- ZSTD VERSION: 1.5.3
-- Performing Test C_FLAG_WALL
-- Performing Test C_FLAG_WALL - Success
-- Performing Test CXX_FLAG_WALL
-- Performing Test CXX_FLAG_WALL - Success
-- Performing Test C_FLAG_WEXTRA
-- Performing Test C_FLAG_WEXTRA - Success
-- Performing Test CXX_FLAG_WEXTRA
-- Performing Test CXX_FLAG_WEXTRA - Success
-- Performing Test C_FLAG_WUNDEF
-- Performing Test C_FLAG_WUNDEF - Success
-- Performing Test CXX_FLAG_WUNDEF
-- Performing Test CXX_FLAG_WUNDEF - Success
-- Performing Test C_FLAG_WSHADOW
-- Performing Test C_FLAG_WSHADOW - Success
-- Performing Test CXX_FLAG_WSHADOW
-- Performing Test CXX_FLAG_WSHADOW - Success
-- Performing Test C_FLAG_WCAST_ALIGN
-- Performing Test C_FLAG_WCAST_ALIGN - Success
-- Performing Test CXX_FLAG_WCAST_ALIGN
-- Performing Test CXX_FLAG_WCAST_ALIGN - Success
-- Performing Test C_FLAG_WCAST_QUAL
-- Performing Test C_FLAG_WCAST_QUAL - Success
-- Performing Test CXX_FLAG_WCAST_QUAL
-- Performing Test CXX_FLAG_WCAST_QUAL - Success
-- Performing Test C_FLAG_WSTRICT_PROTOTYPES
-- Performing Test C_FLAG_WSTRICT_PROTOTYPES - Success
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_INSTALL_LIBDIR: lib64
-- ZSTD_LEGACY_SUPPORT defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
-- Disabling playTests.sh test because ZSTD_BUILD_PROGRAMS is not enabled
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/font_atlas.zim
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/font_atlas.meta
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/ui_atlas.zim
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/ui_atlas.meta
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/asciifont_atlas.zim
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/asciifont_atlas.meta
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/asset-manifest.json
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/index.html
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/.git
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/.nojekyll
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/manifest.json
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/js
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/js/main.fe87e942.js.LICENSE.txt
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/js/main.fe87e942.js.map
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/js/main.fe87e942.js
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/media
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/media/logo.94f885ce93dfb6d29a122402a15cccca.svg
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/css
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/css/main.3eab8a01.css.map
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/static/css/main.3eab8a01.css
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/debugger/favicon.ico
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/tr_TR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ro_RO.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/hr_HR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ms_MY.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/README.md
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/nl_NL.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/vi_VN.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ru_RU.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/cz_CZ.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/zh_CN.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/sv_SE.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/fr_FR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/bg_BG.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/gr_EL.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/lo_LA.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/pt_PT.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/he_IL.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/gl_ES.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/pt_BR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/no_NO.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/es_LA.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/jv_ID.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/zh_TW.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/lt-LT.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/uk_UA.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ko_KR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/dr_ID.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/az_AZ.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/es_ES.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/de_DE.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/id_ID.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/tg_PH.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ca_ES.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/it_IT.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/fa_IR.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/hu_HU.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/fi_FI.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/th_TH.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/en_US.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ja_JP.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/pl_PL.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/da_DK.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/ar_AE.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/lang/he_IL_invert.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/aacolor.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/natural.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/5xBR-lv2.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/cartoon.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/4xhqglsl.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/videoAA.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/inversecolors.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/sharpen.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/aacolor.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/psp_color.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/cartoon.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/grayscale.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/tex_2xbrz.csh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/4xhqglsl.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_mitchell_netravali.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/scanlines.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_spline36.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_spline36.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/5xBR.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/defaultshaders.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/5xBR.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/bloom.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/fxaa.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/colorcorrection.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/natural.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/crt.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/naturalA.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/fxaa.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/tex_mmpx.csh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/tex_4xbrz.csh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_catmull_rom.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/vignette.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/naturalA.vsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/GaussianDownscale.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_catmull_rom.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/shaders/upscale_mitchell_netravali.fsh
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/themes
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/themes/defaultthemes.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/Roboto-Condensed.ttf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/7z.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/compat.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/gamecontrollerdb.txt
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/langregion.ini
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/ppge_atlas.zim
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/ppge_atlas.meta
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/rargray.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/unknown.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/zip.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/sfx_back.wav
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/sfx_confirm.wav
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/sfx_select.wav
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/sfx_toggle_off.wav
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/sfx_toggle_on.wav
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/logo.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/icon_regular_72.png
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn3.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn13.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/kr0.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn12.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn11.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn14.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn0.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/jpn0.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn9.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn15.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn4.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn6.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn10.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn8.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn1.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn7.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn2.pgf
-- Installing: /home/mszeptuch/tmp/ppsspp/build/assets/flash0/font/ltn5.pgf
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mszeptuch/tmp/ppsspp/build

I can see this: Using X11 for Vulkan

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 6, 2022

hmm, now it doesn't behave like in #16163 (comment) It seems to crash like at the beginning 😄

here is the log
25:20:124 Core/Config.cpp:649 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
25:20:125 Core/Config.cpp:1932 E[LOADER]: Failed to read /home/mszeptuch/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default.
VulkanMayBeAvailable: Device allowed ('SDL:Linux')
VulkanMayBeAvailable: Library loaded ('libvulkan.so.1')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 19
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
VulkanMayBeAvailable: Ineligible device found and ignored: 'llvmpipe (LLVM 14.0.0, 256 bits)'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.24.0 and we are linking against SDL version 2.24.0. :)
ThreadManager::Init(compute threads: 8, all: 16)
Pixels: 960 x 544
Virtual pixels: 960 x 544
Failed to initialize glew!
GL init error ''
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
Segmentation fault (core dumped)

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 6, 2022

why does it say "Vulkan may be available" all the time but it decides to use SDL finally (even I build with ./b.sh --no-sdl2)?

@gucio321 gucio321 changed the title linux/SDL: fails to run linux/SDL: fails to run on Wayland Oct 6, 2022
@unknownbrackets
Copy link
Collaborator

SDL is used for Vulkan and for OpenGL. On Linux, we currently default to OpenGL, but when OpenGL is marked as failed (i.e. you tried to use OpenGL, and it crashed during startup), it will try Vulkan. You can try editing ~/.config/ppsspp/PSP/SYSTEM/ppsspp.ini and change GraphicsBackend = ... to GraphicsBackend = VULKAN.

-[Unknown]

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 7, 2022

image

it worked as far as the app doesn't crash with core dump anymore, however, te window looks like above...

@catsout
Copy link
Contributor

catsout commented Oct 14, 2022

Same error on flatpak ppsspp.
run by flatpak run --nosocket=x11 org.ppsspp.PPSSPP.

@catsout
Copy link
Contributor

catsout commented Oct 14, 2022

@unknownbrackets
Copy link
Collaborator

Does #16219 fix this, or is that just one of more problems?

-[Unknown]

@gucio321
Copy link
Contributor Author

@unknownbrackets
sadly, still crashes

@gucio321
Copy link
Contributor Author

just FYI, I've tried to build QT version and run under wayland - the result is a bit better but still useless:
image
image

output
[ppsspp (0) ]$ ./build/PPSSPPQt
ThreadManager::Init(compute threads: 10, all: 20)
QObject::connect: No such slot MainWindow::frameSkippinGroup_triggered(QAction *)
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
42:48:230 UI/NativeApp.cpp:416 E[LOADER]: Failed graphics backends: OPENGL,DIRECT3D9,VULKAN,ALL
42:48:230 Core/Config.cpp:751 E[LOADER]: Graphics backend failed for 0, trying another
42:48:230 Core/Config.cpp:776 E[LOADER]: All graphics backends failed
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
Control pad device 0 not supported by SDL game controller database, attempting to create default mapping...
Added default mapping ok
found control pad: LiteOn Lenovo Calliope USB Keyboard Consumer Control, loading mapping: SUCCESS, mapping is:
03000000ef1700008c60000011010000,LiteOn Lenovo Calliope USB Keyboard Consumer Control,x:b3,a:b0,b:b1,y:b2,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:a5,leftstick:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,platform:Linux
pad 1 has been assigned to control pad: LiteOn Lenovo Calliope USB Keyboard Consumer Control
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,0-1603,1080 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,0-1603,64 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,0-1603,1080 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,63-1603,1017 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,63-1603,1017 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,63-1603,1017 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 0,0-1603,1080 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
42:52:326 UI/Context.cpp:173 E[G3D]: UI scissor out of bounds in MainScreen: 1612,9-298,1070 / 960,544
42:52:326 Common/LogReporting.cpp:62 E[SYSTEM]: Reporting not initialized, skipping: UI scissor out of bounds in %sScreen: %d,%d-%d,%d / %d,%d
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

@hrydgard
Copy link
Owner

I'd like to try to fix it, so I'm trying to switch my Ubuntu 22.4 Linux laptop to Wayland.

I'm following the instructions here: https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-22-04-desktop

But even after editing /etc/gdm3/custom.conf , that gear icon just won't show up on the login screen, so I can't choose Wayland.

Any ideas?

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 17, 2022

Maybe vm with fedora ;-)

No idea, in fedora it is there by default...

@gucio321
Copy link
Contributor Author

Also, note that you cannot be logged in when you want to switch desktop
(You can't just ctrl+alt+f1)

@catsout
Copy link
Contributor

catsout commented Oct 17, 2022

It's ok on my machine.
image

sadly, still crashes

@gucio321
As you said, it worked as far as the app doesn't crash with core dump anymore, however, te window looks like above...
It should not crash. Do you run with vulkan backend?

@unknownbrackets
Copy link
Collaborator

The Qt issue above almost looks like it gave us a backbuffer with alpha and is compositing it. We used to force alpha to 1 in the UI shaders but maybe don't anymore since we use Draw elsewhere now?

-[Unknown]

@gucio321
Copy link
Contributor Author

It's ok on my machine.
image

sadly, still crashes

@gucio321
As you said, it worked as far as the app doesn't crash with core dump anymore, however, te window looks like above...
It should not crash. Do you run with vulkan backend?

Yes, i was using vulkan... Let me check again

@gucio321
Copy link
Contributor Author

okey, for me, the SDL version under wayland still crashes. I'm using Vulkan backend now. I've also compiled with --debug flag and the log is as follows:

log
VulkanMayBeAvailable: Device allowed ('SDL:Linux')
VulkanMayBeAvailable: Library loaded ('libvulkan.so')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 19
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
VulkanMayBeAvailable: Ineligible device found and ignored: 'llvmpipe (LLVM 14.0.0, 256 bits)'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.24.0 and we are linking against SDL version 2.24.0. :)
ThreadManager::Init(compute threads: 10, all: 20)
Registered VFS for prefix : /usr/local/share/ppsspp/assets
Registered VFS for prefix : /home/mszeptuch/git/ppsspp/build/assets
Registered VFS for prefix : /home/mszeptuch/git/ppsspp/build
Registered VFS for prefix : /usr/local/share/ppsspp/assets
Registered VFS for prefix : /usr/local/share/games/ppsspp/assets
Registered VFS for prefix : /usr/share/ppsspp/assets
Registered VFS for prefix : /usr/share/games/ppsspp/assets
Registered VFS for prefix : assets
Registered VFS for prefix : /home/mszeptuch
33:30:745 Core/Config.cpp:649 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
33:30:752 Core/Config.cpp:1441 I[LOADER]: Loading controller config: /home/mszeptuch/.config/ppsspp/PSP/SYSTEM/controls.ini
33:30:752 Core/Config.cpp:1484 I[LOADER]: Config loaded: '/home/mszeptuch/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
33:30:753 Core/Config.cpp:1721 I[SYSTEM]: CleanRecent took 0.00
33:30:754 UI/NativeApp.cpp:821 D[SYSTEM]: ScreenManager!
33:30:754 UI/NativeApp.cpp:383 N[LOADER]: Not checking for failed graphics backends in debug mode
Pixels: 960 x 544
Virtual pixels: 960 x 544
33:30:774 Vulkan/VulkanLoader.cpp:284 I[G3D]: VulkanLoad: Library loaded ('libvulkan.so')
33:30:774 Vulkan/VulkanLoader.cpp:514 I[G3D]: VulkanLoad: Base functions loaded.
33:30:782 Vulkan/VulkanContext.cpp:144 I[G3D]: Vulkan debug_utils validation enabled.
33:30:782 Vulkan/VulkanContext.cpp:201 W[G3D]: Validation on but instance layer not available - dropping layers
33:30:784 Vulkan/VulkanLoader.cpp:585 I[G3D]: Vulkan instance functions loaded.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
33:30:785 Vulkan/VulkanContext.cpp:765 I[G3D]: Debug callback registered with vkCreateDebugUtilsMessengerEXT.
33:30:785 Vulkan/VulkanContext.cpp:533 I[G3D]: Chose physical device 0: 0x2dec550
33:30:785 Vulkan/VulkanContext.cpp:573 I[G3D]: Memory Types (1):
33:30:785 Vulkan/VulkanContext.cpp:578 I[G3D]:   0: Heap 0; Flags: DEVICE_LOCAL HOST_VISIBLE HOST_CACHED HOST_COHERENT   
33:30:787 Vulkan/VulkanLoader.cpp:592 I[G3D]: Vulkan device functions loaded.
33:30:787 Vulkan/VulkanLoader.cpp:609 I[G3D]: Missing (device): vkGetDeviceBufferMemoryRequirements
33:30:787 Vulkan/VulkanLoader.cpp:612 I[G3D]: Missing (device): vkGetDeviceImageMemoryRequirements
33:30:787 Vulkan/VulkanContext.cpp:690 I[G3D]: Vulkan Device created
Vulkan subsystem 6 not supported

@unknownbrackets
Copy link
Collaborator

That means PPSSPPSDL was compiled without -DVK_USE_PLATFORM_WAYLAND_KHR, which either means -DUSE_WAYLAND_WSI=ON was not used for cmake or the wayland dev libraries etc. are not available. Or I suppose that SDL was compiled without Wayland support, but that seems unlikely.

-[Unknown]

@gucio321
Copy link
Contributor Author

info: after installing vulkan-validation-layers-devel log has changed a bit

new log
VulkanMayBeAvailable: Device allowed ('SDL:Linux')
VulkanMayBeAvailable: Library loaded ('libvulkan.so')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 19
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
VulkanMayBeAvailable: Ineligible device found and ignored: 'llvmpipe (LLVM 14.0.0, 256 bits)'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.24.0 and we are linking against SDL version 2.24.0. :)
ThreadManager::Init(compute threads: 10, all: 20)
Registered VFS for prefix : /usr/local/share/ppsspp/assets
Registered VFS for prefix : /home/mszeptuch/git/ppsspp/build/assets
Registered VFS for prefix : /home/mszeptuch/git/ppsspp/build
Registered VFS for prefix : /usr/local/share/ppsspp/assets
Registered VFS for prefix : /usr/local/share/games/ppsspp/assets
Registered VFS for prefix : /usr/share/ppsspp/assets
Registered VFS for prefix : /usr/share/games/ppsspp/assets
Registered VFS for prefix : assets
Registered VFS for prefix : /home/mszeptuch
37:41:598 Core/Config.cpp:649 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
37:41:605 Core/Config.cpp:1441 I[LOADER]: Loading controller config: /home/mszeptuch/.config/ppsspp/PSP/SYSTEM/controls.ini
37:41:605 Core/Config.cpp:1484 I[LOADER]: Config loaded: '/home/mszeptuch/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
37:41:605 Core/Config.cpp:1721 I[SYSTEM]: CleanRecent took 0.00
37:41:607 UI/NativeApp.cpp:821 D[SYSTEM]: ScreenManager!
37:41:607 UI/NativeApp.cpp:383 N[LOADER]: Not checking for failed graphics backends in debug mode
Pixels: 960 x 544
Virtual pixels: 960 x 544
37:41:629 Vulkan/VulkanLoader.cpp:284 I[G3D]: VulkanLoad: Library loaded ('libvulkan.so')
37:41:629 Vulkan/VulkanLoader.cpp:514 I[G3D]: VulkanLoad: Base functions loaded.
37:41:636 Vulkan/VulkanContext.cpp:144 I[G3D]: Vulkan debug_utils validation enabled.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
37:41:644 Vulkan/VulkanLoader.cpp:585 I[G3D]: Vulkan instance functions loaded.
37:41:645 Vulkan/VulkanContext.cpp:765 I[G3D]: Debug callback registered with vkCreateDebugUtilsMessengerEXT.
37:41:645 Vulkan/VulkanContext.cpp:533 I[G3D]: Chose physical device 0: 0x41e2470
37:41:645 Vulkan/VulkanContext.cpp:573 I[G3D]: Memory Types (1):
37:41:645 Vulkan/VulkanContext.cpp:578 I[G3D]:   0: Heap 0; Flags: DEVICE_LOCAL HOST_VISIBLE HOST_CACHED HOST_COHERENT   
37:41:647 Vulkan/VulkanLoader.cpp:592 I[G3D]: Vulkan device functions loaded.
37:41:647 Vulkan/VulkanLoader.cpp:609 I[G3D]: Missing (device): vkGetDeviceBufferMemoryRequirements
37:41:647 Vulkan/VulkanLoader.cpp:612 I[G3D]: Missing (device): vkGetDeviceImageMemoryRequirements
37:41:647 Vulkan/VulkanContext.cpp:690 I[G3D]: Vulkan Device created
Vulkan subsystem 6 not supported

@gucio321
Copy link
Contributor Author

That means PPSSPPSDL was compiled without -DVK_USE_PLATFORM_WAYLAND_KHR, which either means -DUSE_WAYLAND_WSI=ON was not used for cmake or the wayland dev libraries etc. are not available. Or I suppose that SDL was compiled without Wayland support, but that seems unlikely.

-[Unknown]

ok, will check it

@gucio321
Copy link
Contributor Author

🎉
image

so, the deal is to use -DUSE_WAYLAND_WSI=ON and use backend 3 (VULKAN)

@unknownbrackets
Copy link
Collaborator

Yeah, this should be easier. I don't really know why Wayland is off by default.

-[Unknown]

@gucio321
Copy link
Contributor Author

gucio321 commented Oct 18, 2022

yah, I changed it this way:

diff --git a/b.sh b/b.sh
index b68e93e2c..aeb8fae4d 100755
--- a/b.sh
+++ b/b.sh
@@ -96,6 +96,6 @@ set -e
 mkdir -p ${BUILD_DIR}
 pushd ${BUILD_DIR}
 
-cmake $CMAKE_ARGS ..
+cmake $CMAKE_ARGS -DUSE_WAYLAND_WSI=ON ..
 make -j$CORES_COUNT $MAKE_OPT
 popd

but it is not commitable imo, someone needs to change it more proffesional 😄

@unknownbrackets
Copy link
Collaborator

I kinda feel like the find_package is enough, it should just enable Wayland whenever you have the packages for it. But I don't use Wayland, so this is just armchair opinioning.

-[Unknown]

@gucio321
Copy link
Contributor Author

Sadly, I'm not familiar with cmake at all... I suppose, I see the valid place to do this, but... How to set this variable to ON in CMakeList?
I did like:

        # add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
        if(USE_WAYLAND_WSI)
                find_package(Wayland)
                if(NOT WAYLAND_FOUND)
                        message(STATUS "Could not find Wayland libraries, disabling Wayland WSI
                else()
                        include_directories(${WAYLAND_INCLUDE_DIR})
                        add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR)
                        add_definitions(-DUSE_WAYLAND_WSI=ON)
                endif()

but it doesn't work 😄

@gucio321
Copy link
Contributor Author

wait, I see the problemm, if(USE_WAYLAND_WSI)
so maybe we shoul find_package(Wayland) before this if-statement?

@gucio321
Copy link
Contributor Author

ok, opened a PR

@gucio321 gucio321 changed the title linux/SDL: fails to run on Wayland linux/SDL: fails to run on Wayland (Vulkan backend) Oct 18, 2022
@gucio321
Copy link
Contributor Author

ok, gonna open a separated issues for Wayland+OPENGL and Wayland+QT (thay are both different cases and both aren't exactly a problem discussed here)

@ghost
Copy link

ghost commented Oct 31, 2022

I don't know if I should make a new issue or just commenting here, but, I found some things.

I tested PPSSPP on my Arch Linux KDE system(with AMD graphics card) with Wayland with -DUSE_WAYLAND_WSI and it worked very well.
But I also tested it on my Nvidia laptop(which has the same OS and desktop environment as my desktop) and I had some issues, visual glitches, weird things happens in the screen, I also tested on GNOME DE(still on my Nvidia laptop) and the windows has no decorations and the window goes white, but on GNOME on my desktop it worked, so I tested Sway on my Nvidia laptop and it not worked really well, the windows appears BUT the brightness of the windows is terrible, so white, it's like viewing the window with a white filter.

I don't think this issue is specific to Nvidia, it seems to be happening on other GPUs as well, like the Rasberry Pi 4 GPU : Black screen at launch with -DUSE_WAYLAND_WSI.

I think the Wayland experience with PPSSPP differs from GPU to GPU..

(The Vulkan backend was used everytime)

@gucio321
Copy link
Contributor Author

gucio321 commented Nov 1, 2022

@yann-boyer just wondering: what happens
Could you test with opengl backend? It should be already fixed
Also have you used Wayland?

@ghost
Copy link

ghost commented Nov 1, 2022

@gucio321 Yes I also tested on OpenGL backend and everything worked fine, but the Vulkan one is broken with Wayland and some GPUs.
And all my tests was on Wayland, so yes I used Wayland.

@Anuskuss
Copy link
Contributor

Just commenting to confirm that for me it also slowly turns white. It kinda looks like theres no background layer/buffer (transparent) and then it's doing some calculation (imagine multiplicating alpha) which makes the window/foreground turn white eventually. Hope that description makes sense.

@hrydgard hrydgard removed this from the Future-Prio milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants