raspberrypi / bookworm-feedback

13 stars 1 forks source link

Screen Configuration is broken with today apt update for raspi-utils #243

Closed qrp73 closed 5 months ago

qrp73 commented 6 months ago

Today I get latest apt upgrade for raspi-utils, after reboot the screen resolution is switched to non native 1200x720 instead of native 1280x1024 (which is always was used before).

I opened Screen Configuration and tried to change screen resolution to 1280x1024 manually, but it don't have effect and resolution still remains 1200x720. Also there is disappears refresh rate selection. Reboot, power off, reconnect HDMI also don't helps. The resolution still remains 1200x720

Please fix it asap, because it prevents to use raspi os due to non native display resolution.

UPDATE: temporary workaround, I tried to add video=HDMI-A-1:1280x1024@75.02D to /boot/firmware/cmdline.txt to enforce 1280x1024 mode at boot and it helps, but Screen Configuration still don't works (attempt to change screen resolution just do nothing) and refresh rate is missing from menu.

$ cat /var/log/apt/history.log

Start-Date: 2024-04-01  04:36:43
Commandline: apt upgrade
Requested-By: pi (1000)
Upgrade: libblkid-dev:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libsmartcols1:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libmount-dev:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libmount1:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), util-linux:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), util-linux-extra:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), fdisk:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libfdisk1:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), eject:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libuuid1:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), uuid-dev:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), rfkill:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), mount:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), libblkid1:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1), bsdutils:arm64 (1:2.38.1-5+b1, 1:2.38.1-5+deb12u1), bsdextrautils:arm64 (2.38.1-5+b1, 2.38.1-5+deb12u1)
End-Date: 2024-04-01  04:37:14

Start-Date: 2024-04-02  22:12:31
Commandline: apt upgrade
Requested-By: pi (1000)
Upgrade: raspi-utils:arm64 (20240115-1, 20240402-1)
End-Date: 2024-04-02  22:12:37

some error from dmesg:

[    3.320629] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    3.371332] EDID block 0 (tag 0x00) checksum is invalid, remainder is 38
[    3.371369]  [00] BAD  00 ff ff ff ff ff ff 00 4c 2d 47 02 39 31 42 4d
[    3.371377]  [00] BAD  31 11 01 03 0e 26 1e 78 2a ee 95 a3 54 4c 99 26
[    3.371384]  [00] BAD  00 a0 00 a1 ff 80 81 80 81 40 71 4f 01 01 01 01
[    3.371390]  [00] BAD  01 01 01 01 01 01 30 2a 00 98 51 00 2a 40 30 70
[    3.371397]  [00] BAD  13 00 78 2d 11 00 00 1e 00 00 00 fd 00 38 4b 1e
[    3.371403]  [00] BAD  51 0e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53
[    3.371409]  [00] BAD  79 6e 63 4d 61 73 74 65 72 0a 20 20 00 00 00 ff
...

UPDATE2: I tried to power off display and rpi, disconnect hdmi, reconnect again and after boot there is no error for checksum and I can change resolution again.

Now I get this edid content:

xxd -p -c 16 /sys/class/drm/card1-HDMI-A-1/edid | sed 's/../& /g'
00 ff ff ff ff ff ff 00 4c 2d 47 02 39 31 42 4d 
31 11 01 03 0e 26 1e 78 2a ee 95 a3 54 4c 99 26 
0f 50 54 bf ef 80 81 80 81 40 71 4f 01 01 01 01 
01 01 01 01 01 01 30 2a 00 98 51 00 2a 40 30 70 
13 00 78 2d 11 00 00 1e 00 00 00 fd 00 38 4b 1e 
51 0e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53 
79 6e 63 4d 61 73 74 65 72 0a 20 20 00 00 00 ff 
...

the difference in third line: 0f 50 54 bf ef 80 81 vs 00 a0 00 a1 ff 80 81

Any idea what happens?

popcornmix commented 6 months ago

Report output of uname -a and vcgencmd version to begin with. What is the model of Pi?

An unreliable hdmi cable seems the simplest explanation based on the information provided. (it sometimes works, it sometimes doesn't).

If you can absolutely confirm the issue was related to an update, then it should be possible to confirm that. To start with, if you use a spare sdcard, install a fresh bookworm sdcard image, but don't update it.

Does this work 100% reliably without changes to config.txt/cmdline.txt? Check multiple boots, and try adjusting position of hdmi cable in case it is more likely to fail when flexed in a certain direction.

If you have another hdmi cable to try, that would be useful. Also try using the other hdmi socket (if you are using pi4 or pi5). Try also any other hdmi socket on display, and another display if possible. The more information the better.

qrp73 commented 6 months ago

Report output of uname -a and vcgencmd version to begin with. What is the model of Pi?


$ uname -a
Linux raspi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

$ vcgencmd version Feb 29 2024 12:24:53 Copyright (c) 2012 Broadcom version f4e2138c2adc8f3a92a3a65939e458f11d7298ba (clean) (release) (start)



> If you can absolutely confirm the issue was related to an update, then it should be possible to confirm that. To start with, if you use a spare sdcard, install a fresh bookworm sdcard image, but don't update it.

I'm not sure 100% because it happens after mains outage and during first reboot after update I also did power cable switch for display and rpi from batteries to mains power. But I'm sure 100% that later I tried several times to disconnect and connect again HDMI cable with reboot and it didn't helped.
qrp73 commented 6 months ago

Does this work 100% reliably without changes to config.txt/cmdline.txt? Check multiple boots, and try adjusting position of hdmi cable in case it is more likely to fail when flexed in a certain direction.

just tried to remove video mode from cmdline.txt and tried to reboot. Screen Confguration works as expected.

Most of all this issue happens due to bad EDID reading from HDMI, but I have no idea how it's possible, because I'm sure 100% that HDMI cable was ok. I tried to reconnect it several times with reboot, tried to power off display power cable, but it didn't helped.

And now EDID reading is ok and Screen Configuration works as expected, with no change to HDMI cable... So, I'm confused. What can be root of cause for bad EDID reading?

I believe the reason why it was solved is the full power off for both - display and rpi. But why separate power off for display and for rpi didn't solved it?

popcornmix commented 6 months ago

What can be root of cause for bad EDID reading?

A faulty cable can certainly result in intermittent reading of the EDID data. Depending on exactly how it's flexed it may work or not work.

Without further information, that seems more likely than a software issue (which broke things, but fixed itself without additional updates).

If we start getting other similar reports, or you can identify a version of the software that behaves significantly better we can investigate more.

qrp73 commented 5 months ago

I cannot reproduce it anymore. I suspect it happens due to power off/on switch for the display. Maybe something going wrong with display firmware during power-on and it started to sent wrong EDID bytes. Probably display firmware keeps running from capacitors or/and HDMI power from RPI and it can explain why it still sent wrong EDID even after display power off/on. Full display power off with HDMI reconnect fixed this issue. I tried to reproduce it with power off/on for the display, but all works ok.

lurch commented 5 months ago

I cannot reproduce it anymore.

I'll close this then; but please do comment if you discover a way to reproduce it in future.