device-qemu-*: set a default resolution for X11 (MR 5712)

Qemu by default starts a GTK window in VGA resolution 640x480. The content
adapts to this resolution, thus X11 shows up in resolution 640x480 as well.

This resolution causes some handling issues. In Xfce4 the shutdown button of
the menu isn't reachable. Even worse in MATE, where the "Apply" button for
changing the resolution is out of the screen, making it difficult to change
the resolution.

The default resolution for X11 can be set by a config file. The Qemu GTK
window resolution remains independently at default 640x480. Setting the X11
resolution to default 800x600 mitigates the issue: Most of the screen content
becomes accessible while font size and button sizes are still large enough.
From this point the user can adjust the resolutions of the Qemu GTK window
and X11 content as desired.
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Jakob Hauser 2024-10-13 12:34:46 +02:00 committed by Clayton Craft
parent a9ab9a3925
commit a8a4d06fac
No known key found for this signature in database
GPG Key ID: 4A4CED6D7EDF950A
6 changed files with 51 additions and 6 deletions

View File

@ -2,8 +2,8 @@
# Maintainer: Minecrell <minecrell@minecrell.net> # Maintainer: Minecrell <minecrell@minecrell.net>
# Co-Maintainer: Oliver Smith <ollieparanoid@postmarketos.org> # Co-Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=device-qemu-aarch64 pkgname=device-qemu-aarch64
pkgver=5 pkgver=6
pkgrel=1 pkgrel=0
pkgdesc="Simulated device in QEMU (aarch64)" pkgdesc="Simulated device in QEMU (aarch64)"
url="https://postmarketos.org" url="https://postmarketos.org"
arch="aarch64" arch="aarch64"
@ -16,12 +16,14 @@ subpackages="
$pkgname-kernel-edge:kernel_edge $pkgname-kernel-edge:kernel_edge
$pkgname-mce $pkgname-mce
$pkgname-sway $pkgname-sway
$pkgname-x11
" "
source=" source="
deviceinfo deviceinfo
modules-initfs modules-initfs
mce-display-blanking.conf mce-display-blanking.conf
resolution-qemu-X11.conf
" "
options="!check !archcheck" options="!check !archcheck"
@ -46,6 +48,12 @@ sway() {
mkdir "$subpkgdir" mkdir "$subpkgdir"
} }
x11() {
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
install -Dm644 "$srcdir"/resolution-qemu-X11.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/10-resolution-qemu-X11.conf
}
kernel_virt() { kernel_virt() {
pkgdesc="Alpine Virt kernel (minimal, no audio)" pkgdesc="Alpine Virt kernel (minimal, no audio)"
depends="linux-virt" depends="linux-virt"
@ -68,4 +76,5 @@ sha512sums="
90527c2be00f97172f8e9b7508aba706c62e9067c50c93cfa69fbe5940462e9a165f35b9c8dd0efe2b690a839c6069b26d0c8706b7c4114219ef3004ea3dda3e deviceinfo 90527c2be00f97172f8e9b7508aba706c62e9067c50c93cfa69fbe5940462e9a165f35b9c8dd0efe2b690a839c6069b26d0c8706b7c4114219ef3004ea3dda3e deviceinfo
8129439ec53e76e714b2d3dac97bbe702822d6f6642ea6b631aa26001fec85ca310fbe9eeb04c2bd849145a1137b7934c21b704524f3a98b96b7c6f71c2ca992 modules-initfs 8129439ec53e76e714b2d3dac97bbe702822d6f6642ea6b631aa26001fec85ca310fbe9eeb04c2bd849145a1137b7934c21b704524f3a98b96b7c6f71c2ca992 modules-initfs
99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf 99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf
bfff3ebf11abb43d8ea45e778c19554b1bc8ef9e694d8160daaac0ef906b4d8eda772e5f984033cce52ebddfbbe76e5340c6805e68f967994a3240c1e10c8b5b resolution-qemu-X11.conf
" "

View File

@ -0,0 +1,6 @@
Section "Screen"
Identifier "Virtual-1"
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection

View File

@ -2,8 +2,8 @@
# Maintainer: Minecrell <minecrell@minecrell.net> # Maintainer: Minecrell <minecrell@minecrell.net>
# Co-Maintainer: Oliver Smith <ollieparanoid@postmarketos.org> # Co-Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=device-qemu-amd64 pkgname=device-qemu-amd64
pkgver=6 pkgver=7
pkgrel=4 pkgrel=0
pkgdesc="Simulated device in QEMU (x86_64)" pkgdesc="Simulated device in QEMU (x86_64)"
url="https://postmarketos.org" url="https://postmarketos.org"
arch="x86_64" arch="x86_64"
@ -18,11 +18,13 @@ subpackages="
$pkgname-kernel-none:kernel_none $pkgname-kernel-none:kernel_none
$pkgname-mce $pkgname-mce
$pkgname-sway $pkgname-sway
$pkgname-x11
" "
source=" source="
deviceinfo deviceinfo
modules-initfs modules-initfs
mce-display-blanking.conf mce-display-blanking.conf
resolution-qemu-X11.conf
" "
options="!check !archcheck" options="!check !archcheck"
@ -47,6 +49,12 @@ sway() {
mkdir "$subpkgdir" mkdir "$subpkgdir"
} }
x11() {
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
install -Dm644 "$srcdir"/resolution-qemu-X11.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/10-resolution-qemu-X11.conf
}
kernel_none() { kernel_none() {
pkgdesc="No kernel (does not boot! can be used during pmbootstrap testing to save time)" pkgdesc="No kernel (does not boot! can be used during pmbootstrap testing to save time)"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
@ -74,4 +82,5 @@ sha512sums="
74dd746b16f17ce67f6d58b6b86878b6eebaaa473fa36f475074c2c14ed738386c1b5cfcf15ad07b58f94d303799e8a9ed356143061e7854cf38170bef999a0b deviceinfo 74dd746b16f17ce67f6d58b6b86878b6eebaaa473fa36f475074c2c14ed738386c1b5cfcf15ad07b58f94d303799e8a9ed356143061e7854cf38170bef999a0b deviceinfo
29766094e64a7ce881c8e96433203ea538057b8fd1d577fc69b9add6bc1217af04ddf60cbcf82333811c627897eda7537b0b1f862899e1fdfd93403b3f6425d7 modules-initfs 29766094e64a7ce881c8e96433203ea538057b8fd1d577fc69b9add6bc1217af04ddf60cbcf82333811c627897eda7537b0b1f862899e1fdfd93403b3f6425d7 modules-initfs
99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf 99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf
bfff3ebf11abb43d8ea45e778c19554b1bc8ef9e694d8160daaac0ef906b4d8eda772e5f984033cce52ebddfbbe76e5340c6805e68f967994a3240c1e10c8b5b resolution-qemu-X11.conf
" "

View File

@ -0,0 +1,6 @@
Section "Screen"
Identifier "Virtual-1"
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection

View File

@ -2,8 +2,8 @@
# Maintainer: Minecrell <minecrell@minecrell.net> # Maintainer: Minecrell <minecrell@minecrell.net>
# Co-Maintainer: Luca Weiss <luca@lucaweiss.eu> # Co-Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=device-qemu-riscv64 pkgname=device-qemu-riscv64
pkgver=2 pkgver=3
pkgrel=2 pkgrel=0
pkgdesc="Simulated device in QEMU (riscv64)" pkgdesc="Simulated device in QEMU (riscv64)"
url="https://postmarketos.org" url="https://postmarketos.org"
arch="riscv64" arch="riscv64"
@ -14,12 +14,14 @@ subpackages="
$pkgname-kernel-edge:kernel_edge $pkgname-kernel-edge:kernel_edge
$pkgname-mce $pkgname-mce
$pkgname-sway $pkgname-sway
$pkgname-x11
" "
source=" source="
deviceinfo deviceinfo
modules-initfs modules-initfs
mce-display-blanking.conf mce-display-blanking.conf
resolution-qemu-X11.conf
" "
options="!check !archcheck" options="!check !archcheck"
@ -44,6 +46,12 @@ sway() {
mkdir "$subpkgdir" mkdir "$subpkgdir"
} }
x11() {
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
install -Dm644 "$srcdir"/resolution-qemu-X11.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/10-resolution-qemu-X11.conf
}
kernel_edge() { kernel_edge() {
pkgdesc="Alpine Edge kernel" pkgdesc="Alpine Edge kernel"
depends="linux-edge linux-firmware-none" depends="linux-edge linux-firmware-none"
@ -54,4 +62,5 @@ sha512sums="
4e2acace2d7a5b55302e9571eef3e57cbc14c2831a2e0797ef5ff87290aef581a0bf112816c2f113878b9ca57599b66d0e3f8a593e0c08819322ff8d5ea7f351 deviceinfo 4e2acace2d7a5b55302e9571eef3e57cbc14c2831a2e0797ef5ff87290aef581a0bf112816c2f113878b9ca57599b66d0e3f8a593e0c08819322ff8d5ea7f351 deviceinfo
8129439ec53e76e714b2d3dac97bbe702822d6f6642ea6b631aa26001fec85ca310fbe9eeb04c2bd849145a1137b7934c21b704524f3a98b96b7c6f71c2ca992 modules-initfs 8129439ec53e76e714b2d3dac97bbe702822d6f6642ea6b631aa26001fec85ca310fbe9eeb04c2bd849145a1137b7934c21b704524f3a98b96b7c6f71c2ca992 modules-initfs
99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf 99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf
bfff3ebf11abb43d8ea45e778c19554b1bc8ef9e694d8160daaac0ef906b4d8eda772e5f984033cce52ebddfbbe76e5340c6805e68f967994a3240c1e10c8b5b resolution-qemu-X11.conf
" "

View File

@ -0,0 +1,6 @@
Section "Screen"
Identifier "Virtual-1"
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection