The temp/mesa packaging uses this path _dri_driverdir=/usr/lib/dri. The upstream aport uses this path _dri_driverdir=/usr/lib/xorg/modules/dri. xserver expects it to be in the latter path.
@ryang2678 The file swrast_dri.so said as missing in the log is not present anywhere in the system and sure not in /usr/lib/dri.
I have symlinked the content of /usr/lib/dri in /usr/lib/xorg/modules/dri but the result is the same since the aforementioned library is still missing on the system.
I was under the impression that hammerhead could use freedreno. I don't have any freedreno capable devices to test this myself. It is strange that xorg doesn't even appear to try to load that driver.
@craftyguy The dri drivers are installed to a different path than where xserver is trying to load them from. Was this intended for some reason?
I did not have much time to analyze this right now. But I did just flash a fresh pmbootstrap rootfs with i3wm to the hammerhead, for good measure. It seemed to be stuck at displaying a black screen with _ in the top left corner, then I did something else, and as I was about to shut the device down - several minutes later! - all over sudden i3 appeared. Touch screen is not working, probably because the relevant xf86 package is not installed.
Maybe this datapoint is useful - it seems to load up, but only very slowly. Can others confirm this with other desktops, and does anybody have an idea of what to make from that?
I can replicate this issue on the OnePlus One (bacon), running my fork of the kernel. I originally used XFCE to test with, but it also happens with i3. I've been chasing this issue down for some time, so I'm glad to know it's not just me experiencing it. In my experience, something about the newer version of Mesa (particularly related to DRI cursor planes, IIRC) freezes the GPU. The touchscreen doesn't appear to work, because the screen is frozen in a single frame.
I manually built an older version of Mesa, and everything seemed to work okay. I do have an Xorg config file that enables SWCursor and disables PageFlip, so there might be some differences without it.
I've attached several Xorg log files, from the old version of Mesa (18.3.5), and the version in pmaports. In one of them, I manually ran Xorg to get the console output, which includes an assertion failure in Freedreno.
I've noticed this same behaviour on Nexus 5 with xfce4 for many months now, but with success pictures being posted in that time I thought it was just me.
It seems a screen update isn't possible until the device experiences a period of inactivity (like the period of time that elapses after which the screen dims/locks on other mobile devices). Only after this period of inactivity can the screen be commanded to update, either automatically with msm-fb-refresher, or manually without msm-fb-refresher by a touch/button event. I don't know exactly how long the time period is but 10 mins is usually enough.
On xfce4 (and possibly others) touch does work, but appears not to due to the lack of regular screen updating.
Also, I think the wm may be loading in the expected amount of time but due to no screen update being possible until the necessary inactivity period has elapsed it's not obvious that the wm has loaded until many minutes after the fact.
Interestingly - noticing that the Sony Xperia Z2 (with same/similar SoC) was reportedly working fine, I replicated the x11() portion of the Z2's device APKBUILD file in the Nexus 5's just to test. It works great for approx 1-3 touch events but then the screen bugs out. The wm is also displayed quite quickly as opposed to @ollieparanoid 's i3wm experience mentioned above. Just thought I'd mention in case it proves useful for someone.
Thanks for the information @julian-goldsmith and @foneos. Unfortunately, I don't have a good idea how to proceed here, besides contacting the freedreno folks. I'm mostly focused on reviewing patches and pushing the much needed new binary repository forward, so maybe one of you can go down that path?
I completely missed this issue somehow. The problem is that since having our own Mesa package, /usr/lib/xorg/modules/dri isn't used anymore while it should be. This means only Wayland DE's work. This is fixed in !359 (merged).