From a06c23ae2ce3d758545b3d5f5a1cafb7695aebb8 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:25:06 +0100 Subject: [PATCH] graphics() improved for Raspberry PI --- lib/graphics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphics.js b/lib/graphics.js index 39c0116..3a520cc 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -733,8 +733,8 @@ function graphics(callback) { } if (_linux) { // Raspberry: https://elinux.org/RPI_vcgencmd_usage - if (util.isRaspberry() && util.isRaspbian()) { - let cmd = 'fbset -s | grep \'mode "\'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;'; + if (util.isRaspberry()) { + let cmd = 'fbset -s 2> /dev/null | grep \'mode "\' ; vcgencmd get_mem gpu 2> /dev/null; tvservice -s 2> /dev/null; tvservice -n 2> /dev/null;'; exec(cmd, function (error, stdout) { let lines = stdout.toString().split('\n'); if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf('0x12000a') > -1) {