Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rpi4] Limited RGB range #12476

Open
xboxones1 opened this issue Sep 10, 2024 · 8 comments · May be fixed by #12506
Open

[rpi4] Limited RGB range #12476

xboxones1 opened this issue Sep 10, 2024 · 8 comments · May be fixed by #12506
Assignees
Labels
feature request not a bug requires upstream fix needs to be fixed upstream from the source code. RPI Raspberry Pi

Comments

@xboxones1
Copy link

xboxones1 commented Sep 10, 2024

Batocera build version

40

Your architecture

raspberry pi 4

Your Graphic Processor Unit(s) (GPU)

raspberry pi 4

Issue description

When I connect to my raspberry pi 4 monitor via hdmi I get a limited rgb range, in other distributions I can force switch to full rgb range with xrandr.
xrandr --output HDMI-1 --set "Broadcast RGB" "Full"
It seems to be possible to do it with other utilities such as modetest and kmstest, but batocera for raspberry pi 4 doesn't have anything like that, so I can't fix this problem.

@Tovarichtch Tovarichtch added RPI Raspberry Pi need info need vendor support or information to resolve labels Sep 13, 2024
@n2qz
Copy link
Contributor

n2qz commented Sep 21, 2024

Not a bug.

You're trying to run a command to control an Intel GPU-specific parameter on an xorg display, while rpi4 uses a VideoCore GPU on Wayland.

The correct way to adjust such parameters on rpi4 is in /boot/config.txt

Try setting hdmi_pixel_encoding=2

For more info see https://elinux.org/RPiconfig

@n2qz n2qz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2024
@n2qz n2qz added invalid not a bug and removed need info need vendor support or information to resolve labels Sep 21, 2024
@xboxones1
Copy link
Author

xboxones1 commented Sep 21, 2024

@n2qz
You have the wrong information, hdmi_pixel_encoding is a deprecated option for the deprecated fkms driver, which is now unsupported. "Broadcast RGB Full" this toggle option was backported into the kernel by the raspberry command a long time ago and it works. For x11 this is xrandr --output HDMI-1 --set "Broadcast RGB" "Full", and for wayland, you can use modetest -M vc4 -w 32:"Output format":3 I tested modetest on wayland and it works too, but only when I add this command to .profile

@n2qz
Copy link
Contributor

n2qz commented Sep 22, 2024

You tested it with modetest on Batocera?

@n2qz n2qz reopened this Sep 22, 2024
@xboxones1
Copy link
Author

I tested modetest on RaspberryOS and Ubuntu with Wayland. As I wrote in the first post, the Batocera distribution for raspberry pi lacks the necessary packages. modetest is part of libdrm-tests

@n2qz
Copy link
Contributor

n2qz commented Sep 22, 2024

Install the build from this drive: https://drive.google.com/drive/folders/1OaxfQoMTO08jVlKbaMM-iGpo1sXnIj4P?usp=drive_link

Put your modetest commands in /boot/preshare.sh (remember to remount /boot as read-write first), then reboot.

Here's what I tested with, I can observe that the values are changed but I don't notice any change in the way the display appears on my system:

[root@adric-wlan0 /boot]# cat /boot/preshare.sh
modetest -M vc4 -w 32:"Broadcast RGB":1
modetest -M vc4 -w 32:"Output format":1

@n2qz n2qz added the feedback awaiting user feedback label Sep 22, 2024
@n2qz n2qz self-assigned this Sep 22, 2024
@xboxones1
Copy link
Author

xboxones1 commented Sep 23, 2024

Thanks, modetest works, it switches to full mode. But in this build there is a problem not related to modetest. For some reason the whole interface does not work smoothly, as if in 20-25fps (although according to the frame counter more). Compared with version 40 and there everything is fine.

@n2qz n2qz removed the feedback awaiting user feedback label Sep 23, 2024
@n2qz
Copy link
Contributor

n2qz commented Sep 23, 2024

Thanks for the confirmation. I'll get the modetest binary included in either v41 or v42, depending on when our next buildroot bump occurs.

The other issue is completely separate, and was already reported. You may want to chime in on the relevant report.

@n2qz n2qz added the requires upstream fix needs to be fixed upstream from the source code. label Sep 23, 2024
@n2qz n2qz linked a pull request Sep 23, 2024 that will close this issue
@xboxones1
Copy link
Author

This is relevant not only for raspberry pi 4, but for all models running on kms driver. At least libdrm-tests should be enabled for raspberry pi 5 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request not a bug requires upstream fix needs to be fixed upstream from the source code. RPI Raspberry Pi
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants