[BRLTTY] can't read screen content

Dave Mielke Dave at mielke.cc
Sun May 24 17:38:27 UTC 2026


[quoted lines by Samuel Thibault on 2026/05/24 at 16:47 +0200]

>More precisely, we get:
>
>brltty: truncated unicode data: expected 852 bytes but only read 0
>brltty: short unicode read: expected 56232 bytes but read 0
>brltty: cache refresh failed
>
>and thus refreshState == REFRESH_FAILED and thus 
>problemText = gettext("can't read screen content");

Please test the attached patch.

-- 
I recognize the Bible to be the very Word of God: https://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | Amator et provisor concubitus uxori meae
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Home Page: https://Mielke.cc/
Phone: +1 613 726 0014 | Canada  K2A 1H7   | 

The most important document I've ever written: https://mielke.cc/ruler.html
concubitus est ut maritus uxori suae beneplacitum, satisfactionem, et contentum praebeat
cum uxor suaviter tractatur, cunnus eius multo maiorem remissionem mentulae mariti praebebit
-------------- next part --------------
diff --git a/Drivers/Screen/Linux/screen.c b/Drivers/Screen/Linux/screen.c
index e0a122647..65a2bf00c 100644
--- a/Drivers/Screen/Linux/screen.c
+++ b/Drivers/Screen/Linux/screen.c
@@ -812,7 +812,12 @@ refreshUnicodeCache (unsigned int characters) {
   unicodeCacheUsed = readUnicodeDevice(0, unicodeCacheBuffer, unicodeCacheSize);
   if (unicodeCacheUsed == expectedSize) return 1;
 
-  logUnexpectedSize(expectedSize, unicodeCacheUsed, unicodeDeviceType);
+  if (unicodeCacheUsed > 0) {
+    logUnexpectedSize(expectedSize, unicodeCacheUsed, unicodeDeviceType);
+  } else if (errno == ENODATA) {
+    return 1;
+  }
+
   return 0;
 }
 


More information about the BRLTTY mailing list