Bug 250009 - graphics/drm-fbsd12.0-kmod: sound unusable on DisplayPort after DPMS or screen OFF/ON.
Summary: graphics/drm-fbsd12.0-kmod: sound unusable on DisplayPort after DPMS or scree...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-30 16:40 UTC by Jean-Claude MICHOT
Modified: 2020-10-03 01:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Claude MICHOT 2020-09-30 16:40:18 UTC
# uname -a
FreeBSD flash2.usenet-fr.net 12.1-RELEASE-p6 FreeBSD 12.1-RELEASE-p6 GENERIC  amd64

# pkg info | grep drm-fbsd
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components

My drivers is patched to support CPU: Intel(R) Core(TM) i7-9700 Intel Kaby Lake
i just add the line INTEL_VGA_DEVICE(0x3E98, info), /* SRV GT2 */ in file i915_pciids.h


=> boot

Sep 26 00:17:25 flash2 kernel: hdacc2: <Intel Kaby Lake HDA CODEC> at cad 2 on hdac1
Sep 26 00:17:25 flash2 kernel: hdaa2: <Intel Kaby Lake Audio Function Group> at nid 1 on hdacc2

=> audio over DisplayPort is OK.

=> off/on screen => no audio on DisplayPort (screen speaker)
Sep 26 02:49:44 flash2 kernel: hdacc2: Unexpected unsolicited response with tag 63: ffffffff
Sep 26 02:49:45 flash2 kernel: hdacc2: Unexpected unsolicited response with tag 63: ffffffff

=> reboot => audio over DisplayPort is OK.

=> xset dpms force suspend => same result no audio on DisplayPort
Sep 26 03:18:40 flash2 kernel: hdacc2: Unexpected unsolicited response with tag 63: ffffffff


Each time i got: " hdacc2: Unexpected unsolicited response with tag 63: ffffffff " the audio
become unsuable from screen connected by DisplayPort. (43" IIAYMA ProLite X4372UHSU).

The audio from rear jack connector still usable (tested with headphone), 
but as my real loud speaker are in screen... over DisplayPort.
Comment 1 Yuri Pankov 2020-09-30 17:08:06 UTC
You can try the following as a workaround (worked for me in somewhat similar situation):

devctl disable hdacc2
devctl enable hdacc2
Comment 2 Niclas Zeising freebsd_committer 2020-10-01 06:13:13 UTC
Does it work on current, with a driver that actually supports your GPU?


This could also be an issue in the sound driver.
Comment 3 Jean-Claude MICHOT 2020-10-01 19:12:01 UTC
unfortunatly that doesn't work.

# devctl disable hdacc2
devctl: Failed to disable hdacc2: Device busy

# dmesg | tail -6

=> power off screen

hdacc2: Unexpected unsolicited response with tag 63: ffffffff
hdacc2: Unexpected unsolicited response with tag 63: ffffffff
uhub4: 4 ports with 4 removable, self powered

=> power on screen

hdacc2: Unexpected unsolicited response with tag 63: ffffffff
hdacc2: Unexpected unsolicited response with tag 63: ffffffff

=> devctl disable hdacc2
pcm5: unregister: mixer busy

I have add a section in /etc/X11/xorg.org

Section "Extensions"
    Option      "DPMS" "Disable"
EndSection


% xset -q | grep DPMS
DPMS (Energy Star):
  Server does not have the DPMS Extension

If i setup the screen save "xset s on" and "xset s activate" a new line: 
"hdacc2: Unexpected unsolicited response with tag 63: ffffffff"
appear in dmesg, and sound disappear. I need to reboot to get sound back.

To keep sound on DisplayPort, i must disable DPMS __AND__ Screen Saver... :(

JC
Comment 4 Jean-Claude MICHOT 2020-10-03 01:10:58 UTC
With lsof i found why 'devctl disable hdacc2' return 'device busy'.
/dev/mixer5 was always open by few process (pulse audio, kmix, kde...)

After killing the process, 'devctl disable hdacc2' was usable.

But i also need a sysctl -w dev.hdaa.2.reconfig=1
and re-setup the config.

The following script is ok for me:

#!/bin/sh
devctl disable hdacc2
devctl enable hdacc2
sysctl -w dev.hdaa.2.reconfig=1
sysctl -w hw.snd.default_unit=5
mixer vol 80
mixer pcm 80
# test with noise on speaker
dd if=/dev/random of=/dev/dsp bs=1k count=1