Skip to content

Don’t throw that Pi into the garbage

The most recent iteration of Pi, operating on the Bookworm OS, may cause Xojo’s DesktopHTMLViewer to appear like garbage, but that’s no reason to discard either the Pi or Xojo!

If you’re encountering display anomalies with the DesktopHTMLViewer on a Pi 5 running Bookworm OS, rest assured you’re not alone. This issue stems from the version of WebKitGTK the DesktopHTMLViewer relies on. While efforts to address this persist, a viable workaround exists: disabling hardware acceleration when utilizing WebKitGTK. Fortunately, in Xojo, we’ve facilitated this by exposing an environment variable. You can conveniently set this variable before the creation of the DesktopHTMLViewer, such as within your App.Opening event.

To turn hardware acceleration OFF, you can assign that to the WEBKIT_HARDWARE_ACCELERATION environment variable:

System.EnvironmentVariable("WEBKIT_HARDWARE_ACCELERATION") = "OFF"

By default, hardware acceleration is enabled/disabled as requested by web contents, but you can also force hardware acceleration to be enabled even for websites not requesting it:

System.EnvironmentVariable("WEBKIT_HARDWARE_ACCELERATION") = "ON"

To revert it to its default state, simply assign any value other than ON/OFF. While we remain optimistic that this issue will be resolved at some point, in the interim, this environment variable stands ready to function as a temporary solution.

Dana Brown is Xojo’s Director of Sales & Marketing. She has a Bachelor’s degree in Communication and a Master’s degree in Advertising. Having worked in the marketing field for almost 20 years, primarily in the technology sector, she has extensive experience in everything from digital marketing to search engine marketing, content creation, website development, event planning, brand development, advertising and more.