From 741960eac292a32fca364fa67ebf5942be38ff05 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Tue, 31 Jul 2018 12:38:44 +0200 Subject: [PATCH] fix resolution after startup --- README.md | 7 +++---- raspberry-environment/display.py | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6bfcfe0..8917c38 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ ## Other features * you can call freeze.exe with the cmdline argument "single" to just do one screenshot, save it and exit + * if HDMI is connected after USB(Power): the device will switch to 1920x1080-32 # Initial setup @@ -88,7 +89,5 @@ mount -o remount,rw /boot ## ToDo - * korrekte auflösung bei desktop-scaling - * zu viel overscan - * hdmi korrekt konfigurieren wenn nach boot erst angeschlossen - * zeit knopfdruck bis anzeige soweit möglich optimieren + * Iconwechsel wenn kein RPi angeschlossen + * Windows Installer (cpack) diff --git a/raspberry-environment/display.py b/raspberry-environment/display.py index fb89680..76de204 100644 --- a/raspberry-environment/display.py +++ b/raspberry-environment/display.py @@ -252,8 +252,10 @@ if __name__ == '__main__': _stdout, _stderr = p.communicate() if (len(_stdout) > 0 and _stdout == fallback_str): subprocess.run('tvservice --explicit="CEA 16 HDMI"', shell=True, check=False) - subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '16'], shell=False, check=False) - subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '32'], shell=False, check=False) + #subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '16'], shell=False, check=False) + time.sleep(0.5) + subprocess.run('fbset -fb /dev/fb0 -a -g 1920 1080 1920 1080 32', shell=True, check=False) + time.sleep(0.5) def callback(paths):