WIP: RFC: samsung-klte: add GPU hardware acceleration
This fixes #319 (closed) by choosing option 3 because options 1 and 2 have failed.
As you can see this work has several steps split into 4 commits, and all of them are needed to succeed.
Steps
First we need to fork kwin to make it more versatile with regard to plugin selection/autodetection. Second, then we can add hwcomposer backend as a separate package, built in multiple variations for different android versions, CAF/non-CAF variants. Failed upstreaming attempt is https://phabricator.kde.org/D22418
Third, we have to tweak plasma-phone-components a little bit, to allow launching kwin with different backends for different situations. This is also currently discussed in https://invent.kde.org/kde/plasma-phone-components/-/merge_requests/56
4th step is the last, adjusting klte device package with a smart subpackage (device-samsung-klte-hybris-plasma
) that pulls needed kwin plugin. It will be installed only with nonfree-userland (on halium adaptation) and kwin.
P.S. 3rd commit (changing kwinwrapper logic in plasma-phone-components) can be useful on its own, it brings back possibility for all our "150+ booting devices" to boot plasma-mobile UI on framebuffer.
P.P.S. There is also an option to tweak kwin even further, like current revision in D22418, so that plugin autodetection is fully automatic, this way we may not need changes to plasma-phone-components at all.
P.P.P.S. I got several messages from users during last half of the year about how to launch plasma-mobile on samsung-klte... Let me finish this downstream port at this step so I can move to something better. For example add mainline support? Some other device..?
Test plan:
-
make sure that mainline/drm devices can still boot to plaMo with this (like PinePhone/Tab?) -
make sure that libhybris devices can boot to plaMo -
make sure that framebuffer-only devices can boot to plaMo (and suffer! but that's another story)
Merge request reports
Activity
added category::device type::feature labels
Well, as written in the issue, I'd avoid forking kwin. But it would be @PureTryOut's call ultimately, because he is maintaining the package in Alpine, and to make sure that postmarketOS does not break, he would need to make sure that this fork is upgraded in sync.
Getting some version of https://phabricator.kde.org/D22418 made it into upstream kwin instead would be better. Maybe this comment will help:
See if you can get ahold of Nate Graham. He doesn't deal with Kwin, but he might be able to help get some attention to the issue and get things moving.
If this upstreaming attempt will not be successful, maybe we should ask ourselves if it's really worth the effort for libhybris support. I know that there was a lot of work put into it already... but it might be a better idea to just focus on building a great distro for devices running close to mainline, with less hacks for the downstream kernel based devices.
@minlexx wrote:
P.S. 3rd commit (changing kwinwrapper logic in plasma-phone-components) can be useful on its own, it brings back possibility for all our "150+ booting devices" to boot plasma-mobile UI on framebuffer.
Just a side note, I know that you and others take issue with the "150+ booting devices" statement. No need to stress this anymore, because the plan is to have a proper categorization of devices (postmarketos#16 (closed)), and after that we can update the homepage to word this better. I don't see a point in changing it until then though, because that's just additional effort.
Thanks a lot for your work on this, @minlexx!
By Oliver Smith on 2020-03-01T15:30:32
Edited by Ghost UserI know that you and others take issue with the "150+ booting devices" statement
I don't have a problem with "150+ booting devices" statement, just saying that most devices don't have working DRM driver or halium port, only framebuffer.
About that 3rd commit, I should probably send it as a separate MR titled "Restore framebuffer support", what do you think?
By Alexey Min on 2020-03-01T15:30:32
But it would be @PureTryOut's call ultimately, because he is maintaining the package in Alpine, and to make sure that postmarketOS does not break, he would need to make sure that this fork is upgraded in sync.
Right, he is maintaining the package in Alpine, I will maintain it in pmOS then. The difference between packages is only 1 patch that did not change since kwin-5.16. It is small and successfully applied on 5.16, 5.17 and now on 5.18 without a change. That's doable :)
By Alexey Min on 2020-03-01T15:34:01
About that 3rd commit, I should probably send it as a separate MR titled "Restore framebuffer support", what do you think?
In theory it would make sense. But IIRC running with framebuffer caused all sorts of scaling glitches, and never went faster than a slide show. If I remember correctly, @bshah said at one point that running kwin with framebuffer is not supported. So I'm not sure what we would gain by that patch - people would be able to run a very broken version of plamo essentially, which would probably just give them a wrong impression of the UI.
By Oliver Smith on 2020-03-09T19:39:41
You probably don't read main matrix channel, but people keep asking how to get plasma on fb, and they report that this patch for kwinwrapper works fine. Well, of course, with issues, but I don't see why we should restrict users by removing functionality that works? Linux is all about freedom of choice, if user wants to suffer, let it be so..
https://kde.modular.im/_matrix/media/r0/download/matrix.org/BtMBaISXHfKPpLuBuhGjaaSm
By Alexey Min on 2020-03-15T22:16:33
Edited by AdministratorWell, of course, with issues, but I don't see why we should restrict users by removing functionality that works?
Is there any chance that we can get this fast enough to be usable? If not, then it will always be broken and I don't see how this benefits anyone, it would only get false hopes up and give a wrong impression of Plasma Mobile. We don't want to damage its reputation, do we?
By Oliver Smith on 2020-03-21T19:01:40
mentioned in issue #607 (closed)
By Alexey Min on 2020-06-07T12:26:49