I have just installed 20220921-0658-postmarketOS-v22.06-phosh-18-purism-librem5-installer.img.xz and still no joy with up-side-down display, same as previous
Also unable to get external monitor connected via Baseus usb hub - this works with Purism PureOS
======================================================================================
Law of Probability... The probability of being watched is directly
proportional to the stupidity of your act.
On 1/10/22 2:36 pm, clayton craft (@craftyguy) wrote:
Sounds like you're using an incorrect device tree for your device. Phones from Birch and Chestnut batches (imx8mq-librem5-r2) had their sensors oriented in a different way than later ones. With Evergreen, you want to use imx8mq-librem5-r4 (or r3 for Dogwood).
Yes, that mechanism isn't reliable. At some point NXP made these fuses unavailable and forgot to change the docs... (actually I'm not 100% sure now, let me verify that) You should fallback to Evergreen, and add cases for r1 and r2 to the script. Ideally, there would be a way for the user to override that choice. Users with earlier revisions from before those fuses were being popped pre-shipment can always do it themselves.
ughhh, ok. I thought someone told me once that you should not boot the evergreen dtb on earlier revs (birch, chestnut, dogwood)... could those be damaged?
Well, you should not run mismatched device trees. But if you do, then it doesn't really matter which way it goes that much. Some things are going to be broken until you correct it, but there's nothing really hardware-threatening there. The worst things are that Birch & Chestnut use a slightly higher maximum charging current than the rest, and Evergreen uses a slightly higher maximum backlight current than the rest. I wouldn't advice to run it daily for months like that, but it won't really hurt if you get a wrong dts and figure that out, say, a few days later.
Other than that, you're likely going to have issues sensor rotation (this issue), cameras, external screens, proximity sensor, smart card reader and battery gauge readings when using a wrong device tree. LCD timings differ a bit in Evergreen too, although I haven't seen it making a visible difference in practice. In case of Dogwood devices, you'll also miss workaround for the sudden shutdown issue.
Since there's much more Evergreens out there than any other batch, I'd say that it's the most reasonable to default to Evergreen when there's no fuse data available.
Also, regardless of the above, you should definitely default to the latest device tree when the reading is higher than what you currently support. The latest revision has 5 stored, but your script fell back to Birch only because it was handling values up to 4.
Well, devices should properly advertise which rev they are if loading the correct DT is important, but I digress :P
The worst things are that Birch & Chestnut use a slightly higher maximum charging current than the rest, and Evergreen uses a slightly higher maximum backlight current than the rest. I wouldn't advice to run it daily for months like that, but it won't really hurt if you get a wrong dts and figure that out, say, a few days later.
And this part worries me. How likely is it that a user would recognize that any problem they do happen to observe is in fact due to running the wrong DT? Anyways, maybe the actual risk is small that someone would run the wrong DT for more than "a few days"... except for all Birch, Chestnut owners that don't have any fuse/board info... in their case we're going to default to Evergreen (as you requested), and then end up running it for more than a few days, right?
The latest revision has 5 stored, but your script fell back to Birch only because it was handling values up to 4.
Because I was operating under the assumption that the birch dts was "safe" for all revs, and running the wrong dts in other situations might cause harm... so it was a defensive stance.
I guess another "solution" is to basically make anything earlier than Evergreen "unsupported" in pmOS, and only install/use the Evergreen DT. All others are running pmOS at their own risk, or something. Yes, it sucks.
I know Purism ships 1 image per DT (or used to, not sure if you still do), but that's not something that will work here... which is why I tried to use the board rev to pick the right DT.
Because I was operating under the assumption that the birch dts was "safe" for all revs, and running the wrong dts in other situations might cause harm... so it was a defensive stance.
Nothing is "safe" when mismatched, as in I'm not going to give any guarantees. Such combinations are untested and, as evidenced by this issue existing, they visibly break functionality. However, while I'm not going to declare it "safe", I don't really expect any hardware damage to happen because of mismatched DT rev either.
in their case we're going to default to Evergreen (as you requested), and then end up running it for more than a few days, right?
I would expect them to notice that something is wrong (just like in this ticket) and look up why that may be the case, at which point they can blow the relevant fuse themselves. We're talking about a small number of devices here, so that should be manageable.
I guess a sane thing to do would be to default to r2 when the fuse isn't set at all, but use the latest one you know about (so right now r4) in cases where it's set to a higher rev than the latest one you support. The currently shipped hw revision is 5, which is newer and different than 4, but the changes aren't relevant to the device tree so r4 is being used for them both. In the future, 6 and more could get introduced - and you want your script to use the latest available device tree in such case and not fall back to the oldest one which differs the most, as that doesn't make much sense.