Bug 483662 - KScreen on Wayland unable to set HDMI audio mode to "force-dvi"
Summary: KScreen on Wayland unable to set HDMI audio mode to "force-dvi"
Status: CONFIRMED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-15 13:10 UTC by Jack
Modified: 2024-05-06 17:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Top: HDMI just connected, `audio = auto`. Bottom: `audio = force-dvi` (3.72 MB, image/jpeg)
2024-03-15 13:10 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2024-03-15 13:10:06 UTC
Created attachment 167255 [details]
Top: HDMI just connected, `audio = auto`. Bottom: `audio = force-dvi`

SUMMARY

I have a TV with HDMI input. Unfortunately, computers connected with HDMI rather than D-Sub are affected by overscan and bad colors. While overscan can theoretically be adjusted within the TV menu, bad colors (and especially bad text shadow) remain and make the TV not usable.

On Xorg I can simply run `xrandr --output HDMI-1 --set audio force-dvi` to fix the issue (compare the two photos below). As a side effect, audio doesn't go through the HDMI cable anymore, but I can live with that.

However, on Wayland and Plasma I am unable to run such command, and there seems to be no alternative for the KWin compositor (and neither for Wlroots/Hyprland).

How can I have Kscreen-doctor/others to set the HDMI output in DVI mode?
This is the only reason preventing me from moving to Wayland.


STEPS TO REPRODUCE
1. Connect a (dumb) TV to the computer through HDMI, observe bad colors and overscan
2. On Xorg Plasma, run `xrandr --prop` and then `xrandr --output HDMI-1 --set audio force-dvi`

EXPECTED RESULT
Overscan and colors are fixed

OBSERVED RESULT
xrandr does not work on Wayland, Kscreen-doctor does not have such a feature

SOFTWARE/OS VERSIONS
Linux: 6.7.9
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6
Comment 1 Jack 2024-03-29 10:36:02 UTC
Workaround by using https://github.com/NickCis/drm_tool.

It works with both XOrg and Wayland, but only from TTY (no Yakuake/Konsole):

```
# view connector number: 103
drm_tool list

# set dvi mode (good video)
drm_tool set /dev/dri/card0 103 audio -2

# revert to hdmi mode (bad video + audio)
drm_tool set /dev/dri/card0 103 audio 0
```