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
X.org 1.18.4 and newer #2
Comments
Thankfully patching X will no longer be needed. By building a custom (read: quite hacked) Mesa we can use user-space programs as-is (which means KWin should also work - haven't tried yet though). I will try to push that tomorrow. |
Oh cool, I'll try that then immediately. The challenge is not kwin though, it's glamor. Being a mesa hack, this would also work on wayland, right? |
I have tested locally and GLamor also works thanks to that trick (it is Christian Gmeiner's renderonly series - we hope to get it merged officially into Mesa). I have tested kmscube, glmark2-drm, weston and X/GLamor and all were working (although with a few artefacts due to sync issues, but this should be fixable as well). Of course, EGL and GLX clients under Wayland and X were working as well. So the new workflow will be compile kernel (no need to compile the out-of-tree Nouveau), and compile Mesa, and you should be done. Stay tuned for more details tomorrow. :) |
All updated. Please see the new instructions at https://github.com/NVIDIA/tegra-nouveau-rootfs/ . xserver 1.18.4 confirmed to work with this. I am interested in hearing your feedback! Hopefully I will find a way to fix the tearing issue soon... Closing this issue for now. |
A question while it compiles: Does it require your kernel fork or would it be enough to set |
Provided you enable CONFIG_DRM_TEGRA_STAGING (hope to remove that requirement sometime soon) you should be ok with 4.5 on TK1 (TX1 requires something more recent I think) |
I already had it enabled on my 4.5 kernel, but it only falls back to llvmpipe, both X and weston. Here is a Xorg.0.log: https://gist.github.com/ChristophHaag/f952f38dd8e76b5a65fbc806bfa126b1 I used this PKGBUILD for mesa: https://gist.github.com/ChristophHaag/7ef70ed582f1776653ea8cf6c3294a04 I had a brief look at strace X and it does open tegra_dri.so, and I don't see obvious errors other than Any pointers where I could try debugging? Can you post a Xorg.0.log when it's working for comparison purposes? |
The Can you try the following:
|
I've single stepped a bit through mesa. Everything looks good until nouveau_drm_winsys.c:108 The current value of In libdrm nouveau.c like 417 Not sure what to do with that... Edit: Tried to set dev->chipset to 0xe0 (GK104) before the switch, but it still fails, this time with a printed error message: |
Let's start with the obvious: what is the content of |
Just an idea, but the drivers loading order may be important here. Mesa will expect tegradrm to be loaded before Nouveau. Usually I achieve this by having tegradrm built into the kernel, and Nouveau as a module. |
card0, card1 and renderD128 is there, and with the previous X hack, it worked. Your idea was probably right. udevadm info says that card0 is 57000000.gpu is and card1 is 50000000.host1x. I tried blacklisting nouveau and loading it manually after boot and kmscube now fails with the message |
I really should remove this hardcoded card1 in the Mesa hack... Mmm, so nvc0_screen_create() managed to create a 2d context, but not a 3d one? Interesting. Can you track what the value of obj_class is? On TK1 it should be 0xa297. I'm surprised it would not work though, especially since you reported the previous hack was working too... Also, can you post a full dmesg? |
Oh wait my mistake. I still had my Now kmscube works! In X and weston it doesn't work though. LIBGL_DEBUG=verbose says it's because of |
Nice! For kmscube at least. But now I would expect X and weston to work just the same, as they do on my system. You are using the Arch Linux packages and not custom-compiled packages, aren't you? Also from your use of a PKGBUILD I assume you only have one instance of Mesa installed, but could it be that there is another one lurking? |
This is not the problem. I single stepped some more and |
Great! I may have spotted an issue though. Looks the output of glxinfo for the core GL version - it says 0 and seems to fallback to compat mode. I am not sure why this is so. |
Works for me:
But I don't know what to do about permissions. I don't think it's a user space permission error, because it also happens when I chmod 777 /dev/dri/card1, I think it's the kernel rejecting it, maybe because of missing drm authorization? I don't know much about that... |
Oh, I know. You are missing |
Aha, am I. Thanks for the hint, I think that's what prevents Plasma compositor to start (won't be able to confirm until next year though, grrr). Regarding the permission issue, I am puzzled as well. Is your user in the video group? Maybe also have a look at the prepare-rootfs and distro/prepare-ArchLinuxArm scripts of https://github.com/NVIDIA/tegra-rootfs-scripts . I twiddle a lot of things in there and maybe there is something related. If you chmod, make sure to also chmod renderD128 as Mesa may use one or the other depending on the context. |
This one should replace some of my dirty hacks with saner logic. Will test it as soon as I am back from holidays. |
Suddenly everyone working on this? https://lists.x.org/archives/xorg-devel/2017-January/052218.html |
I'm not going to complain about this! :) Thanks for the infos. |
See https://archlinuxarm.org/forum/viewtopic.php?p=53358#p53358
For me, I get this assertion failing when trying to start X:
and then
1.18.3 works fine.
Even if you don't work on porting your patches to newer X.org versions, this info might be helpful for others who run into this issue.
The text was updated successfully, but these errors were encountered: