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

Getting segmentation fault when using with gamescope #822

Closed
hartmark opened this issue Aug 16, 2022 · 8 comments
Closed

Getting segmentation fault when using with gamescope #822

hartmark opened this issue Aug 16, 2022 · 8 comments

Comments

@hartmark
Copy link

hartmark commented Aug 16, 2022

I'm using latest from main on arch.

I get segmentation fault when used with gamescope:

% AMD_VULKAN_ICD=RADV gamescope glxgears
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[2022-08-17 01:15:12.937] [MANGOHUD] [info] [config.cpp:118] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2022-08-17 01:15:12.937] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/markus/.config/MangoHud/gamescope.conf' [ not found ]
[2022-08-17 01:15:12.937] [MANGOHUD] [info] [config.cpp:123] parsing config: '/home/markus/.config/MangoHud/MangoHud.conf'
vulkan: selecting physical device 'AMD RADV VEGA10': queue family 1
vulkan: physical device supports DRM format modifiers
[2022-08-17 01:15:12.998] [MANGOHUD] [error] [file_utils.cpp:43] Error opening directory '/sys/class/drm/card0-HDMI-A-1/device/hwmon/': No such file or directory
[2022-08-17 01:15:12.998] [MANGOHUD] [error] [file_utils.cpp:43] Error opening directory '/sys/class/drm/card0-DVI-D-1/device/hwmon/': No such file or directory
[2022-08-17 01:15:12.998] [MANGOHUD] [error] [file_utils.cpp:43] Error opening directory '/sys/class/drm/card0-DP-2/device/hwmon/': No such file or directory
[2022-08-17 01:15:12.998] [MANGOHUD] [error] [file_utils.cpp:43] Error opening directory '/sys/class/drm/card0-HDMI-A-2/device/hwmon/': No such file or directory
[2022-08-17 01:15:12.998] [MANGOHUD] [info] [overlay.cpp:768] Uploading is disabled (permit_upload = 0)
vulkan: supported DRM formats for sampling usage:
vulkan:   0x34325241
vulkan:   0x34325258
vulkan:   0x3231564E
[1]    5591 segmentation fault (core dumped)  AMD_VULKAN_ICD=RADV gamescope glxgears

gdb trace:

(gdb) bt full
#0  0x00007fffe8dd163a in  () at /usr/lib/libMangoHud.so
#1  0x000055555559bca2 in  ()
#2  0x0000555555587d75 in  ()
#3  0x00005555555604c9 in  ()
#4  0x00007ffff74952d0 in __libc_start_call_main (main=main@entry=0x55555555f190, argc=argc@entry=1, argv=argv@entry=0x7fffffffdbc8) at ../sysdeps/nptl/libc_start_call_main.h:58
        self = <optimized out>
        result = <optimized out>

                      unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488346056, -2738145751233012003, 0, 140737488346072, 93824992966616, 140737354125312, 2738145752197947101, 2738127417259908829}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7fffffffdbc8, 0x1}, data = {prev = 0x0, cleanup = 0x0, canceltype = -9272}}}
        not_first_call = <optimized out>
#5  0x00007ffff749538a in __libc_start_main_impl (main=0x55555555f190, argc=1, argv=0x7fffffffdbc8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdbb8) at ../csu/libc-start.c:381
#6  0x0000555555563095 in  ()
@gort818
Copy link
Collaborator

gort818 commented Aug 17, 2022

use it like thisgamescope -- mangohud glxgears
you must have mangohud globally enabled?

MANGOHUD=0 gamescope -- mangohud glxgears

@hartmark
Copy link
Author

hartmark commented Aug 17, 2022

Yes, I'm having it globally enabled.

I'm aware of the workaround but the application should exit with an error instead of segmentation fault if it's not supported.

Also the workaround makes mangohud use opengl instead of vulkan, a subtle difference. The linked issue has another workaround which uses vkbasalt and are successfully working using vulkan.

@gort818
Copy link
Collaborator

gort818 commented Aug 17, 2022

It is not a workaround, it is the correct way to use mangohud with gamescope.
glxgears is an opengl application, so if it is reporting OpenGL then that is correct.

@hartmark
Copy link
Author

Alright, then this can be closed if we can live with a segmentation fault instead of an error

@jackun
Copy link
Collaborator

jackun commented Aug 17, 2022

gamescope has an exception for vkBasalt so it won't try to just use compute queues.

@hartmark
Copy link
Author

Aha, so that's the reason I got it working if I used ENABLE_VKBASALT=1

@neondeex
Copy link

i do
echo $ENABLE_VKBASALT
1
and still got the same error

@flightlessmango
Copy link
Owner

and still got the same error

You're not supposed to use mangohud with gamescope.
This is what mangoapp is for

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

No branches or pull requests

5 participants