From 30579dfc603fbdc35cfdfd53f1214741e5d2c56c Mon Sep 17 00:00:00 2001 From: linuswck Date: Wed, 15 Jan 2025 16:21:36 +0800 Subject: [PATCH] gui: Do not use OpenGL for pyqtgraph - Fix Painter path exceeds +/-32767 pixels bug - Plotting with OpenGL has worse performance - See pyqtgraph Issue #2227 --- fast-servo/linien-gui-do-not-use-opengl.patch | 13 +++++++++++++ flake.nix | 1 + 2 files changed, 14 insertions(+) create mode 100644 fast-servo/linien-gui-do-not-use-opengl.patch diff --git a/fast-servo/linien-gui-do-not-use-opengl.patch b/fast-servo/linien-gui-do-not-use-opengl.patch new file mode 100644 index 0000000..48451d5 --- /dev/null +++ b/fast-servo/linien-gui-do-not-use-opengl.patch @@ -0,0 +1,13 @@ +diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py +index f3b81ce..7d865a3 100644 +--- a/linien-gui/linien_gui/ui/plot_widget.py ++++ b/linien-gui/linien_gui/ui/plot_widget.py +@@ -40,7 +40,7 @@ from pyqtgraph.Qt import QtCore + # NOTE: this is required for using a pen_width > 1. There is a bug though that causes + # the plot to be way too small. Therefore, we call PlotWidget.resize() after a while + pg.setConfigOptions( +- useOpenGL=True, ++ useOpenGL=False, + # by default, pyqtgraph tries to clean some things up using atexit. This causes + # problems with rpyc objects as their connection is already closed. Therefore, we + # disable this cleanup. diff --git a/flake.nix b/flake.nix index 24f12ed..aec1901 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ ./fast-servo/linien-server-fast-servo-hardware-specific.patch ./fast-servo/linien-gui-fast-servo-hardware-specific.patch ./fast-servo/linien-gui-add-afe_gain-combo-boxes.patch + ./fast-servo/linien-ui-do-not-use-opengl.patch ./fast-servo/linien-client-ssh-port-change.patch ./fast-servo/linien-server-fast-servo.patch ./fast-servo/linien-server-cli.patch