init: Hide unsupported UIs
Hides user interfaces which require hardware acceleration for unsupported devices. Support is identified by deviceinfo property gpu_accelerated
. UI which has hardware acceleration as requirement, must have pmb:gpu-accel
in APKBUILD's options.
Also fixes E501 for pmb/config/init.py and uses f-strings.
Closes #1998 (closed).
Merge request reports
Activity
mentioned in merge request pmaports!2078 (merged)
By HenriDellal on 2021-03-31T10:24:16
- Resolved by Administrator
deviceinfo_mesa_driver isn't really meant to show that a device has hardware accaleration, rather just a way for mkinitfs to copy the relevant driver to the initfs to make osk-sdl fast. Also the
_mainline
suffix isn't hardcoded anywhere so please don't do that here. It's rather taken from the device subpackage suffix iirc so anything is possible really.Also please split the f-string changes into its own commit
By Luca Weiss on 2021-03-31T11:30:10
Edited by Administrator
added 2 commits
By HenriDellal on 2021-03-31T11:18:04
added 2 commits
By HenriDellal on 2021-03-31T13:11:58
added 2 commits
By HenriDellal on 2021-03-31T15:11:39
- Resolved by Administrator
deviceinfo_mesa_driver isn't really meant to show that a device has hardware accaleration, rather just a way for mkinitfs to copy the relevant driver to the initfs to make osk-sdl fast.
+1 to that, this cannot be used as indicator of "gpu hw accel support". Device with hw accel can choose to not use "fast" osk-sdl just because its boot partition is limited and has no space to place gpu diver module + gpu firmware in it. (Example: most of the msm8916-based community devices). Not supporting accelerated osk-sdl does not mean that device is not hw-accelerated. Myabe @Minecrell can comment more here
Also I don't like the idea of hiding UIs at all.
So, here goes my -1
By Alexey Min on 2021-04-01T13:27:48
Edited by Ghost User
added 2 commits
By HenriDellal on 2021-04-01T18:47:02
- Resolved by Administrator
What about warning users that it most probably won't work instead of hiding them?
By Newbyte on 2021-04-07T09:26:16
Edited by Ghost User
added 46 commits
-
541a0fc8...76489653 - 44 commits from branch
postmarketOS:master
- ccb8b94c - init: Hide unsupported UIs
- e1ccaafe - pmb/config/init.py: use f-strings, fix E501
By HenriDellal on 2021-06-19T10:03:09
-
541a0fc8...76489653 - 44 commits from branch
added 2 commits
By HenriDellal on 2021-06-19T13:32:17
- Resolved by Administrator
Seems to work fine. Tested with the following diff applied to pmaports:
diff --git a/device/main/device-qemu-amd64/deviceinfo b/device/main/device-qemu-amd64/deviceinfo index da3d251c..f0e7f547 100644 --- a/device/main/device-qemu-amd64/deviceinfo +++ b/device/main/device-qemu-amd64/deviceinfo @@ -15,6 +15,7 @@ deviceinfo_keyboard="true" deviceinfo_external_storage="true" deviceinfo_screen_width="1024" deviceinfo_screen_height="768" +deviceinfo_hw_accelerated="true" deviceinfo_getty="ttyS0;115200" deviceinfo_dev_internal_storage="/dev/vdb" deviceinfo_dev_internal_storage_repartition="true" diff --git a/main/postmarketos-ui-plasma-mobile/APKBUILD b/main/postmarketos-ui-plasma-mobile/APKBUILD index cd40d540..6c5155d3 100644 --- a/main/postmarketos-ui-plasma-mobile/APKBUILD +++ b/main/postmarketos-ui-plasma-mobile/APKBUILD @@ -74,7 +74,7 @@ source=" kdewallet.salt " subpackages="$pkgname-extras" -options="!check" +options="!check pmb:hw-accel" package() { install -Dm644 "$srcdir"/kwinrc \
Select qemu-amd. Vary deviceinfo_hw_accelerated between true/false/unset and run pmbootstrap init and watch how plasma-mobile UI becomes unavailable in some cases.
By Alexey Min on 2021-06-20T21:07:49
added 2 commits
By HenriDellal on 2021-06-21T10:32:18
- Resolved by Administrator
I think that calling this
hw_accelerated
doesn't make sense. What are we accelerating? There are other accelerators found in phones today than GPUs, e.g. AI/machine learning accelerators. Feel free to disagree, but I'd like to hear a good reason to be vague about this.By Newbyte on 2021-07-07T01:54:47
Edited by Ghost User
added 2 commits
By HenriDellal on 2021-06-21T20:37:28