Skip to content
Snippets Groups Projects

init: Hide unsupported UIs

Merged Imported Administrator requested to merge hide-ui into master

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).

Edited by Administrator

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Owner

    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

  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2021-06-20T21:07:54

  • Administrator added 2 commits · Imported

    added 2 commits

    • 5ce5eff0 - init: Hide unsupported UIs
    • 40718f5d - pmb/config/init.py: use f-strings, fix E501

    Compare with previous version

    By HenriDellal on 2021-06-21T10:32:18

    • Author Owner
      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
  • Administrator added 2 commits · Imported

    added 2 commits

    • 7239887d - init: Hide unsupported UIs
    • ea605a54 - pmb/config/init.py: use f-strings, fix E501

    Compare with previous version

    By HenriDellal on 2021-06-21T20:37:28

  • Administrator changed the description · Imported

    changed the description

    By Alexey Min on 2021-06-21T21:21:14

  • Author Owner

    image

    ping

    By Alexey Min on 2021-06-26T06:45:57

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading