Wayland dual monitor switch from 30Hz to 60Hz: High pitch audio double playback speed

Bug #1957816 reported by Troels Petersen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a desktop computer with a 60Hz 4K display connected through Display Port. The display is a ThinkVision X1 with built in audio. With the Display Port cable I am then able to output sound from the monitor and this works without any issues.
I have now added a 4K Samsung television through HDMI to the same GPU, which also allows me to do 4K at 60Hz, albeit only with Wayland. In Xorg I can only do 30Hz on the television while doing 60Hz on the ThinkVision X1. It is clear however, that when it is set to 60Hz in Wayland, the animation on the television is much more smooth.

The problem is that whenever I set the television to 60Hz, the playback of any sound is both high pitched and faster than normal. If I play a video in YouTube, the video appears to playback about twice as fast as normal and and very high pitched sound (everyone sounds like chipmunks). This is the case on the entire system (also when playing the video or any other sounds on the X1 display at 60Hz). Only if I set the refresh rate, on the television, to 30Hz again does everything play and sound normal again.
It is only the playback of media that is doubled in speed. Everything else (animations, mouse, etc.) is still behaving as normal.

If I change audio output to the ThinkVision X1 (or something else) at 60Hz while also being connected to the television at 60Hz, the audio stays high pitched and sped up.

If I unplug the main display, ThinkVision X1, then the playback of media on the television becomes normal.

I have tried with different +100 USD HDMI cables, that are all rated as HDMI 2.0 and the behavior stays the same.

My system is Ubuntu 20.04 LTS. I tried in a LiveUSB 21.10, but the behavior was the same.

I have an AMD Radeon VII GPU (Has 3x Display Port and 1x HDMI).

As mentioned I cannot test it in Xorg, but that is only because it does not allow me to set the refresh rate to 60Hz.

I am uncertain whether this is related to MESA, Pulseaudio or maybe Mutter/Wayland?

tags: added: hdmi wayland
tags: removed: hdmi
tags: added: hdmi
Revision history for this message
Troels Petersen (thesleort) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1957816/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → xorg (Ubuntu)
summary: - Wayland dual monitor 60Hz: High pitch audio
+ Wayland dual monitor from 30Hz to 60Hz: High pitch audio double playback
+ speed
summary: - Wayland dual monitor from 30Hz to 60Hz: High pitch audio double playback
- speed
+ Wayland dual monitor switch from 30Hz to 60Hz: High pitch audio double
+ playback speed
Revision history for this message
Troels Petersen (thesleort) wrote :

Also because Wayland allows the television to be at 60Hz, whenever I login (after boot) and have it in mirror mode, the sound is therefore too fast by default.

I cannot change it, since the HDMI port is the first port on the GPU and the DisplayPort port is the second. This means it by default assumes the television to be the default display.

Of course this would not be an issue if the sound just worked. But right now it would also be nice to be able to change the primary display when mirroring screens.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try editing /etc/pulse/daemon.conf and change:

  ; default-sample-rate=44100

to

  default-sample-rate=48000

and then reboot.

affects: xorg (Ubuntu) → pulseaudio (Ubuntu)
tags: added: focal
Revision history for this message
Troels Petersen (thesleort) wrote :

This does not fix the issue. Playback is still double and high pitched in Wayland with both monitors at 60Hz.
In Xorg I can still only select 30Hz as the maximum on the television.

Revision history for this message
Troels Petersen (thesleort) wrote :

However, audio going through USB on the X1 ThinkVision (called "Analog Output - X1") is now playing correctly in Wayland with both monitors at 60Hz.
When selecting the television output "HDMI / DisplayPort - Vega 20 HDMI Audio [Radeon VII]" on Wayland with 60Hz on both monitors, the playback doubles and sound is high pitched. (This one is connected through HDMI)

When selecting the X1 monitor output "HDMI / DisplayPort 2 - Vega 20 HDMI Audio [Radeon VII]" on Wayland with 60Hz on both monitors, the playback doubles and sound is also high pitched. (This one is connected through DisplayPort)

So it appears that on Wayland with both monitors on 60Hz, the audio going through either HDMI or DisplayPort doubles in speed and becomes high pitched.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't think it's quite doubling. Usually "chipmunks sound" bugs are a mismatch between 44.1kHz and 48.0kHz somewhere in the system.

The refresh rate of the monitor should be completely irrelevant to any audio.

Revision history for this message
Troels Petersen (thesleort) wrote (last edit ):

I don't know if the speed is exactly doubled, by but changing the output definitely changes the playback speed of any media.
I tried making a video to show it: https://youtu.be/hlqw_ijdxOE

Revision history for this message
Troels Petersen (thesleort) wrote :

I just tested it on a laptop with intel graphics, and sound and playback is perfectly normal on 60Hz when playing through the HDMI (playing on the television). Same cable, same television - only connected to my laptop instead.
This makes me wonder whether this could be an issue in the kernel driver, amdgpu?

Hardware:
CPU: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
GPU: Intel(R) HD Graphics 4400 (HSW GT2)
OS: Ubuntu 21.10

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes the kernel graphics driver provides the path to the monitor audio device so that might be it. Although history makes me suspect PulseAudio more.

tags: added: amdgpu
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
tack22 (tack22) wrote :

Very similar issue over here. I can logon to X11 and run 4k at 60 Hz without issue. However, when I logon to Wayland and run 4k at 60 Hz all audio and video plays back at 2x-3x speed (YouTube, VLC, mp3, etc). I have an AMD GPU and am running off the DisplayPort through a DisplayPort to HDMI adapter, although the same issue occurs if I utilize the HDMI directly.

Revision history for this message
Sam Wise (mesome) wrote :

Same issue here. AMD gpu, two 4k monitors, one on Display Port @ 60Hz and The other on HDMI @ 60Hz with audio playback high pitched and increased speed. Lowering the HDMI refresh rate to 30Hz fixes the audio.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.