From 9392512166e0098bc1553fa52e663240efd6c252 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Wed, 21 Apr 2021 11:08:17 +0200 Subject: [PATCH] qemu-{amd64,aarch64}: prevent display blanking when mce is in use (MR 2127) mce is used by both Glacier and Asteroid to do all kind of power management related stuff, including blanking the display. However, obviously we don't ever want to blank the display on Qemu --- device/main/device-qemu-aarch64/APKBUILD | 23 ++++++++++++++---- .../mce-display-blanking.conf | 1 + device/main/device-qemu-amd64/APKBUILD | 24 ++++++++++++++----- .../mce-display-blanking.conf | 1 + 4 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 device/main/device-qemu-aarch64/mce-display-blanking.conf create mode 100644 device/main/device-qemu-amd64/mce-display-blanking.conf diff --git a/device/main/device-qemu-aarch64/APKBUILD b/device/main/device-qemu-aarch64/APKBUILD index e9bec52f6..ff6353566 100644 --- a/device/main/device-qemu-aarch64/APKBUILD +++ b/device/main/device-qemu-aarch64/APKBUILD @@ -3,7 +3,7 @@ # Co-Maintainer: Daniele Debernardi pkgname=device-qemu-aarch64 pkgver=2.1 -pkgrel=1 +pkgrel=2 pkgdesc="Simulated device in QEMU (aarch64)" url="https://postmarketos.org" arch="aarch64" @@ -11,13 +11,18 @@ license="MIT" depends="postmarketos-base mesa-dri-gallium" makedepends="devicepkg-dev" subpackages=" + $pkgname-kernel-lts:kernel_lts + $pkgname-kernel-virt:kernel_virt + $pkgname-mce $pkgname-weston $pkgname-xfce4 - $pkgname-kernel-virt:kernel_virt - $pkgname-kernel-lts:kernel_lts -" + " -source="deviceinfo weston.ini" +source=" + deviceinfo + mce-display-blanking.conf + weston.ini + " options="!check !archcheck" build() { @@ -28,6 +33,13 @@ package() { devicepkg_package $startdir $pkgname } +mce() { + pkgdesc="Prevents screen blanking for UI's using mce (Glacier, Asteroid)" + install_if="$pkgname mce" + install -Dm644 "$srcdir"/mce-display-blanking.conf \ + "$subpkgdir"/etc/mce/50display-blanking.conf +} + weston() { install_if="$pkgname weston" install -Dm644 "$srcdir"/weston.ini \ @@ -53,4 +65,5 @@ kernel_lts() { } sha512sums="23380393d6c1dd5327b2be4ab22a617da5ae606b393042afd8adeb722d7680678a79ac78f20b8256a6741c3d43ea5863fbee58a5115c88c442a54675ef91079b deviceinfo +99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf de794566118f1744d068a94e6a75b61d43f6749a4b0871a5270fa7a2048164d609c71fcffa61845c2a7dd4cb5fbeb72c0e4f8b73b382f36d6ff0bcc9b8a5ae25 weston.ini" diff --git a/device/main/device-qemu-aarch64/mce-display-blanking.conf b/device/main/device-qemu-aarch64/mce-display-blanking.conf new file mode 100644 index 000000000..fdc685493 --- /dev/null +++ b/device/main/device-qemu-aarch64/mce-display-blanking.conf @@ -0,0 +1 @@ +/system/osso/dsm/display/display_never_blank=1 diff --git a/device/main/device-qemu-amd64/APKBUILD b/device/main/device-qemu-amd64/APKBUILD index 12226ee2d..34cef0487 100644 --- a/device/main/device-qemu-amd64/APKBUILD +++ b/device/main/device-qemu-amd64/APKBUILD @@ -3,7 +3,7 @@ # Co-Maintainer: Daniele Debernardi pkgname=device-qemu-amd64 pkgver=2.2 -pkgrel=1 +pkgrel=2 pkgdesc="Simulated device in QEMU (x86_64)" url="https://postmarketos.org" arch="x86_64" @@ -11,13 +11,17 @@ license="MIT" depends="postmarketos-base mesa-dri-gallium" makedepends="devicepkg-dev" subpackages=" + $pkgname-kernel-lts:kernel_lts + $pkgname-kernel-virt:kernel_virt + $pkgname-mce $pkgname-weston $pkgname-xfce4 - $pkgname-kernel-virt:kernel_virt - $pkgname-kernel-lts:kernel_lts -" - -source="deviceinfo weston.ini" + " +source=" + deviceinfo + mce-display-blanking.conf + weston.ini + " options="!check !archcheck" build() { @@ -28,6 +32,13 @@ package() { devicepkg_package $startdir $pkgname } +mce() { + pkgdesc="Prevents screen blanking for UI's using mce (Glacier, Asteroid)" + install_if="$pkgname mce" + install -Dm644 "$srcdir"/mce-display-blanking.conf \ + "$subpkgdir"/etc/mce/50display-blanking.conf +} + weston() { install_if="$pkgname weston" install -Dm644 "$srcdir"/weston.ini \ @@ -53,4 +64,5 @@ kernel_lts() { } sha512sums="994ab3e870f6374aa56d4f4347ce10a39ba66117f6a054ca735b9b038953a00df0e5f073ba87beac458b5ba7e262e0e89d470fec486f62bc899a1f41e517e0cb deviceinfo +99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf 47b27c7572b8737988488f7eb23b9e68f9a944e22baafe1c78355d2514a2554cf41d99b29fca12238eb13a6f5d53f00ca89b94e534e8461ebab72256dcf0f142 weston.ini" diff --git a/device/main/device-qemu-amd64/mce-display-blanking.conf b/device/main/device-qemu-amd64/mce-display-blanking.conf new file mode 100644 index 000000000..fdc685493 --- /dev/null +++ b/device/main/device-qemu-amd64/mce-display-blanking.conf @@ -0,0 +1 @@ +/system/osso/dsm/display/display_never_blank=1