Tuesday, 2023-04-18

T42<TheVancedGamer> hm, not sure who to specifically ask so i'm asking here, how does SFOS work with Vulkan? the vulkan libraries created by libhybris build are installed, but I also see vulkan-ioader which replaces those, in any case vulkaninfo still doesn't see the GPU for me05:35
T42<TheVancedGamer> mal: does vulkan work at all? I'm trying to get it work, made an icd with libvulkan.so.1, and now it OOMs06:39
mal@TheVancedGamer at least the test_vulkan in libhybris-tests works, also the sdl test program works10:36
mal@TheVancedGamer do not use the vulkan-loader, just link to libvulkan10:37
malI tried to make the libhybris code the icd way but it didn't work so I made it a full library10:38
malthis is an example how to use vulkan https://github.com/libhybris/libhybris/blob/master/hybris/tests/test_vulkan.cpp10:40
malwell at least vulkan-loader should not be installed on device, I think it can be used during build10:45
malbecause vulkan pkgconfig file is in that package10:45
T42<TheVancedGamer> mal: I am not using vulkan-loader, test_vulkan doesn't work for me either10:48
T42<TheVancedGamer> so then how do I use vulkan? Was making an icd for it a bad idea?10:48
malwhich device?10:51
T42<TheVancedGamer> fp410:51
malare you also doing a port for it?10:52
T42<TheVancedGamer> test_vulkan works with llvmpipe, but without it I get10:52
T42<TheVancedGamer> ```10:52
T42<TheVancedGamer> Found 2 instance extensions10:52
T42<TheVancedGamer> Failure at 530 test_vulkan.cpp with result -9```10:52
T42<TheVancedGamer> mal: no, this is UT10:52
mallet me boot my fp4 and test vulkan on it10:52
malwondering who is that group of people doing a parallel port fp410:53
T42<TheVancedGamer> for ubuntu touch?10:53
malfor sailfish10:53
T42<TheVancedGamer> ah nah, this is on ubuntu touch10:54
T42<TheVancedGamer> I knew you had FP4 working on hybris-20 so didn't bother with SFOS10:54
malI have almost fully working port and then some people made a PR to one repo suggesting they are working on a port also10:54
T42<TheVancedGamer> no idea about that10:54
malbtw, test_vulkan works fine on my fp4 running hybris-20 based sailfish10:54
T42<TheVancedGamer> I think something is wrong here10:55
malstrace it10:55
T42<TheVancedGamer> so I used latest vulkan-headers (as in my issue), compiled and installed libhybris (without any icd pointing to it) and all vulkan apps complain about missing driver10:55
malwhat did you really mean when you said you made an icd for it10:55
T42<TheVancedGamer> like the icd json10:55
malwell libhybris is not an icd10:56
T42<TheVancedGamer> that points to the vulkan library10:56
T42<TheVancedGamer> I couldn't figure out how to use it so I tried doing that10:56
malbuild your vulkan app using pkgconfig(vulkan) as dependency, on device you only should have libhybris installed, not vulkan-loader10:57
T42<TheVancedGamer> only have libhybris, vulkan-loader is not installed10:57
T42<TheVancedGamer> only trying to get vulkaninfo to output anything rn10:57
T42<TheVancedGamer> stracing test_vulkan seems to suggest it's searching for an icd.d config10:58
malI'll check10:58
malmy strace doesn't mention anything about icd11:00
malwhich library does it load?11:00
T42<TheVancedGamer> let me pull up strace on desktop11:00
T42<TheVancedGamer> uhh, I got a different issue on ssh11:02
T42<TheVancedGamer> connect(3, {sa_family=AF_UNIX, sun_path="/run/user/32011/wayland-0"}, 28) = 011:03
T42<TheVancedGamer> sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\0\0\1\0\f\0\2\0\0\0", iov_len=12}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 1211:03
T42<TheVancedGamer> ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 0) = 1 ([{fd=3, revents=POLLIN|POLLERR|POLLHUP}])11:03
T42<TheVancedGamer> recvmsg(3, {msg_namelen=0}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = -1 ECONNRESET (Connection reset by peer)11:03
T42<TheVancedGamer> oops, should've pasted on a pastebin11:03
T42<TheVancedGamer> mal: https://paste.myself5.de/elexekuxey.yaml11:06
T42<TheVancedGamer> it does in fact load libvulkan.so.1 (from libhybris) but I get nothing11:06
malI still didn't quite understand where you put that icd you mentioned11:12
T42<TheVancedGamer> /usr/share/vulkan/icd.d/hybris_icd.aarch64.json11:12
T42<TheVancedGamer> in there I just copied the llvmpipe icd and replaced the lib with libhybris one, which OOMed device, but now i've removed it11:13
malI think the issue I had with icd indeed was and endless loop because android side also does a bit of a icd internally11:14
T42<TheVancedGamer> hmm, right now I really have no idea11:14
malhave you patches libhybris in any way?11:15
mal*patched11:15
T42<TheVancedGamer> hmm, nothing to vulkan bits11:15
T42<TheVancedGamer> some patches for ubuntu touch packaging though11:15
T42<TheVancedGamer> I still don't quite understand how programs are supposed to use libhybris vulkan11:18
malI mentioned it already, you link regularly against vulkan i.e. vulkan-headers and vulkan-loader, on device you have libhybris-libvulkan instead which is supposed to be same as vulkan-loader11:27
malyou have no other vulkan libs on the device? and you are really sure that libvulkan.so.1 is from libhybris?11:27
T42<TheVancedGamer> mal: yep, checked output of `dpkg -L`, and in general it is from libhybtis11:37
T42<TheVancedGamer> libhybris*11:37
malwhat could be doing that icd then11:55
T42<TheVancedGamer> as I said, I added it to test and then removed it11:58
malbut you still see it in strace?12:00
T42<TheVancedGamer> nope, I see it trying to find icd's in strace12:02
T42<TheVancedGamer> not sure if you saw this but here https://paste.myself5.de/elexekuxey.yaml12:02
malthere is nothing about libhybris linker in that12:06
T42<TheVancedGamer> it is strace of test_vulkan12:07
T42<TheVancedGamer> it loads libvulkan.so.1 which is provided by libhybris12:07
mallibhybris should be loading the android libvulkan.so12:08
malvia libhybris.so.112:09
T42<TheVancedGamer> hmm, didn't know that12:09
malhttps://github.com/libhybris/libhybris/blob/master/hybris/vulkan/vulkan.c#L5212:13
T42<TheVancedGamer> is this libvulkan.so supposed to be in vendor?12:14
T42<TheVancedGamer> I found it in /system/{lib,lib64}12:15
T42<TheVancedGamer> hm, something is broken definitely12:17
T42<TheVancedGamer> oh god, i'm so stupid12:19
T42<TheVancedGamer> libvulkan.so.1 comes from libvulkan1 package12:19
T42<TheVancedGamer> sorry mal12:19
T42<TheVancedGamer> now test_vulkan wants libvulkan.so.112:22
malso you had the vulkan-loader installed?12:23
maldo you now have libhybris vulkan package installed?12:23
T42<TheVancedGamer> vulkan-loader and libvulkan1 are completely different, hmm12:23
T42<TheVancedGamer> mal: there's a libhybris vulkan package?12:23
malyes, if you build it12:24
T42<TheVancedGamer> hm, where does the .so end up from build?12:24
T42<TheVancedGamer> I might need to adjust deb packaging12:24
malhttps://github.com/mer-hybris/libhybris/blob/master/rpm/libhybris.spec#L22212:24
malhttps://github.com/mer-hybris/libhybris/blob/master/rpm/libhybris.spec#L50212:25
mal@TheVancedGamer vulkan-loader provides libhybris.so.1, that libhybris one just replaces it in hybris based devices12:26
mal@TheVancedGamer where is the libhybris deb packagin?12:54
T42<TheVancedGamer> mal: gitlab.com/ubports/development/core/packaging/libhybris12:56
T42<TheVancedGamer> i'm updating it to latest snapshot rn12:56
malI just merged some PRs to libhybris yesterday12:56
T42<TheVancedGamer> it's okay, i'll get it in12:57
T42<TheVancedGamer> I think you merged the vulkan issue and one other PR iirc12:57
malyes12:57
malI should update vulkan headers for sailfish also12:57
T42<TheVancedGamer> that's probably why it compiled fine on sailfish12:58
malyes12:58
T42<TheVancedGamer> reminds me I need to pull latest libhybris and get rid of my comments12:58
malI haven't updated those for a while partially because no devices needed vulkan 1.3 yet12:58
malI will probably add any missing things to libhybris vulkan support when I do that13:00
malprobably 1.2 based devices are fine now13:00
malonly some very high end new devices have 1.313:01
T42<TheVancedGamer> mal: after installing the libraries provided by libhybris, test_vulkan and vulkaninfo are not segfaulting13:13
T42<TheVancedGamer> https://paste.myself5.de/jabahawatu.yaml13:14
T42<TheVancedGamer> I tried with sudo (in case the build.prop issue was fatal) but nope13:14
malwhat are the permissions of that file?13:15
T42<TheVancedGamer> sorry, I meant test_vulkan and vulkaninfo ARE segfaulting13:15
T42<TheVancedGamer> libvulkan*?13:15
T42<TheVancedGamer> -rwxr-xr-x, owned by root13:15
malI mean that property file13:16
T42<TheVancedGamer> -rw-------., owned by root as well13:16
T42<TheVancedGamer> as I said, after running with sudo it does open and read the file, but segfaults shortly after13:16
malpretty sure graphics are not even supposed to work as root13:17
malbecause of wayland stuff etc13:17
malI mean apps13:17
T42<TheVancedGamer> yeah, but why does it segfault as user?13:18
T42<TheVancedGamer> and anyway to debug? strace looks unhelpful to me13:18
malwhat does gdb say?13:18
malhave you tried to every permissions to that .prop file13:18
T42<TheVancedGamer> it's owned by android container, that might die13:19
T42<TheVancedGamer> i'll try though13:19
malhow do other things handle that13:19
T42<TheVancedGamer> most things use getprop13:20
T42<TheVancedGamer> "/sbin/ldconfig.real: /lib/aarch64-linux-gnu/libvulkan.so.1 is not a symbolic link"13:20
T42<TheVancedGamer> hmm13:20
T42<TheVancedGamer> it is indeed not, but why it it complaining?13:20
T42<TheVancedGamer> mal: and /system is mounted as ro in ramdisk13:21
T42<TheVancedGamer> and write-protected13:21
mallibhybris vulkan code is not doing any prop things13:21
T42<TheVancedGamer> I installed gdb, now how do I use it? :P13:22
malcan you test some other test_* from libhybris, do those work?13:23
T42<TheVancedGamer> test_dlopen works13:23
T42<TheVancedGamer> so does test_egl{_configs}13:23
maldo those do any prop stuff in strace13:23
T42<TheVancedGamer> `openat(AT_FDCWD, "/system/build.prop", O_RDONLY) = -1 EACCES (Permission denied)` in test_dlopen13:25
T42<TheVancedGamer> yet still works13:25
malso gdb time13:26
T42<TheVancedGamer> ok13:27
T42<TheVancedGamer> except I never learned my way across gdb, time for man pages on google13:27
maltry HYBRIS_ENABLE_LINKER_DEBUG_MAP=1 gdb test_vulkan13:27
maland then run, and once it crashes thread apply all bt13:28
T42<TheVancedGamer> thx13:29
T42<TheVancedGamer> ```13:30
T42<TheVancedGamer> 13:30
T42<TheVancedGamer> gdb) thread apply all bt13:30
T42<TheVancedGamer> 13:30
T42<TheVancedGamer> Thread 1 (process 62932):13:30
T42<TheVancedGamer> #0  0x0000007ff7b6e540 in ?? ()13:31
T42<TheVancedGamer> Backtrace stopped: previous frame identical to this frame (corrupt stack?)```13:31
T42<TheVancedGamer> hmm, am I missing something here?13:31
malprobably crashes in android side13:31
maldoes logcat tell anythint13:31
T42<TheVancedGamer> nothing in logcat13:32
malhave you tried strace -Ff -s2048 test_vulkan13:34
maljust to be sure it sees all threads13:34
maland forks etc13:34
T42<TheVancedGamer> mal: nothing changed13:36
T42<TheVancedGamer> strace is same as before13:36
malvery odd13:38
T42<TheVancedGamer> indeed13:39
malany chance of see what that pointer could be13:40
T42<TheVancedGamer> mal: can't seem to find any references to it13:58
T42<elros34> @TheVancedGamer have you checked /proc/pid/maps to see in which library it crash?19:26

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!