Skip to content

Commit

Permalink
config: default to non-GL again
Browse files Browse the repository at this point in the history
There are various guest-side issues when GL support is enabled on Linux. We
will still default GL on for Windows as there is some renderering benefits but
on Linux, we bring back the checkbox to enable GL on supported installs.
  • Loading branch information
osy committed Feb 26, 2023
1 parent c938287 commit f06db7d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Configuration/UTMQemuConfigurationDisplay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ extension UTMQemuConfigurationDisplay {
}
let rawTarget = target.rawValue
if rawTarget.hasPrefix("pc") || rawTarget.hasPrefix("q35") {
hardware = QEMUDisplayDevice_x86_64.virtio_vga_gl
hardware = QEMUDisplayDevice_x86_64.virtio_vga
} else if rawTarget.hasPrefix("virt-") || rawTarget == "virt" {
hardware = QEMUDisplayDevice_aarch64.virtio_ramfb_gl
hardware = QEMUDisplayDevice_aarch64.virtio_ramfb
} else {
let cards = architecture.displayDeviceType.allRawValues
if cards.contains("VGA") {
Expand Down
6 changes: 2 additions & 4 deletions Platform/Shared/VMWizardHardwareView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ struct VMWizardHardwareView: View {


if !wizardState.useAppleVirtualization && wizardState.operatingSystem == .Linux {
Section {
Toggle("Enable hardware OpenGL acceleration (experimental)", isOn: $wizardState.isGLEnabled)
} header: {
Text("Hardware OpenGL Acceleration")
DetailedSection("Hardware OpenGL Acceleration", description: "There are known issues in some newer Linux drivers including black screen, broken compositing, and apps failing to render.") {
Toggle("Enable hardware OpenGL acceleration", isOn: $wizardState.isGLEnabled)
}

}
Expand Down
2 changes: 1 addition & 1 deletion Platform/Shared/VMWizardState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ enum VMWizardOS: String, Identifiable {
// only change UEFI settings for Windows
config.qemu.hasUefiBoot = systemBootUefi
}
if isGLEnabled, let displayCard = config.displays.first?.hardware {
if isGLEnabled || operatingSystem == .Windows, let displayCard = config.displays.first?.hardware {
let newCard = displayCard.rawValue + "-gl"
let allCards = systemArchitecture.displayDeviceType.allRawValues
if allCards.contains(where: { $0 == newCard }) {
Expand Down
2 changes: 1 addition & 1 deletion Platform/es-419.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
"Enable Rosetta on Linux (x86_64 Emulation)" = "Habilitar Rosetta en Linux (Emulación x86_64)";

/* No comment provided by engineer. */
"Enable hardware OpenGL acceleration (experimental)" = "Habilitar la aceleración OpenGL por hardware (experimental)";
"Enable hardware OpenGL acceleration" = "Habilitar la aceleración OpenGL por hardware";

/* No comment provided by engineer. */
"Enabled" = "Habilitado";
Expand Down
2 changes: 1 addition & 1 deletion Platform/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"Enable Directory Sharing" = "Ota hakemistojen jakaminen käyttöön";

/* No comment provided by engineer. */
"Enable hardware OpenGL acceleration (experimental)" = "Ota käyttöön laitteiston OpenGL-kiihdytys (kokeellinen)";
"Enable hardware OpenGL acceleration" = "Ota käyttöön laitteiston OpenGL-kiihdytys";

/* No comment provided by engineer. */
"Enabled" = "Käytössä";
Expand Down
2 changes: 1 addition & 1 deletion Platform/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@
"Specify the size of the drive where data will be stored into." = "Définissez la taille du lecteur dans lequel seront enregistrées les données.";

// VMWizardHardwareView.swift
"Enable hardware OpenGL acceleration (experimental)" = "Activer l'accélération matérielle OpenGL (expérimental)";
"Enable hardware OpenGL acceleration" = "Activer l'accélération matérielle OpenGL";
"Hardware OpenGL Acceleration" = "Accélération matérielle OpenGL";

// VMWizardOSLinuxView.swift
Expand Down
2 changes: 1 addition & 1 deletion Platform/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
"Specify the size of the drive where data will be stored into." = "データを保存するドライブのサイズを指定してください。";

// VMWizardHardwareView.swift
"Enable hardware OpenGL acceleration (experimental)" = "ハードウェアOpenGLアクセラレーションを有効にする(実験的)";
"Enable hardware OpenGL acceleration" = "ハードウェアOpenGLアクセラレーションを有効にする";
"Hardware OpenGL Acceleration" = "ハードウェアOpenGLアクセラレーション";

// VMWizardOSLinuxView.swift
Expand Down
2 changes: 1 addition & 1 deletion Platform/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
"Specify the size of the drive where data will be stored into." = "Ustaw rozmiar dysku, gdzie dane będą przechowywane.";

// VMWizardHardwareView.swift
"Enable hardware OpenGL acceleration (experimental)" = "Włącz akceleracje sprzętową OpenGL (eksperymentalne)";
"Enable hardware OpenGL acceleration" = "Włącz akceleracje sprzętową OpenGL";
"Hardware OpenGL Acceleration" = "Akceleracja sprzętowa OpenGL";

// VMWizardOSLinuxView.swift
Expand Down
2 changes: 1 addition & 1 deletion Platform/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
"Edit selected VM" = "编辑选择的虚拟机";

//VMWizardHardwareView
"Enable hardware OpenGL acceleration (experimental)" = "启用硬件 OpenGL 加速 (实验性)";
"Enable hardware OpenGL acceleration" = "启用硬件 OpenGL 加速";

//VMWizardOSLinuxView
"Linux initial ramdisk (optional)" = "Linux 初始虚拟内存盘 (可选)";
Expand Down
2 changes: 1 addition & 1 deletion Platform/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"Enable Directory Sharing" = "啟用檔案夾共享";

/* No comment provided by engineer. */
"Enable hardware OpenGL acceleration (experimental)" = "啟用 OpenGL 硬體加速(實驗性功能)";
"Enable hardware OpenGL acceleration" = "啟用 OpenGL 硬體加速";

/* No comment provided by engineer. */
"Enabled" = "已啟用";
Expand Down

0 comments on commit f06db7d

Please sign in to comment.