HDMI Consumer Electronic Control (CEC) is a simple protocol that allows connected HDMI devices to use a shared bus to pass information and control messages. This is what allows the remote for your Blu-ray player to automatically turn on your TV or to change the volume. However, basicly no GPUs (integrated or descrete) support the feature.
Luckily, it is a simple protocol that can easily be handled by a microcontroller (MCU) using the Arduino library CEClient. The libary has support for several different hardware setups. To connect a 5V MCU some external circuitry is required as documented here. Devices based on the STM32F4 chip can use their hardware open-drain GPIO and 3.3V logic level to connect directly to the HDMI CEC bus. The code could easy be adapted to other 3.3V devices with open-drain GPIO support.
The Rapsberry Pi Pico is a 3.3V device, but does not support open-drain IO. The behavior can easily be emulated in software by switching the GPIO between INPUT and OUTPUT/LOW. We can get away with this because the other devices on the HDMI bus will be pulling the line HIGH. If you do experience problems, adding a 10k Ω resistor between the bus and 3.3V may solve the issue.