Bug 233400 - 12.0-RC1 - FreeBSD 12.x Breaks WINE
Summary: 12.0-RC1 - FreeBSD 12.x Breaks WINE
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: regression
Depends on:
Blocks: 228911
  Show dependency treegraph
 
Reported: 2018-11-22 09:41 UTC by Slawomir Wojciech Wojtczak
Modified: 2020-01-19 04:50 UTC (History)
6 users (show)

See Also:


Attachments
Test Sound (29.48 KB, image/png)
2019-10-15 16:05 UTC, Slawomir Wojciech Wojtczak
no flags Details
AUDIO (397.06 KB, audio/mpeg)
2019-10-15 16:39 UTC, Slawomir Wojciech Wojtczak
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2018-11-22 09:41:42 UTC
Hi,

when I was running 11.2-RELEASE-p3 I was able to play Baldur's Gate Enhanced Edition game with WINE (i386-wine-devel-3.3,1) but after upgrade to 12.0-RC1 WINE is no longer able to start the game.

I did not changed anything else so I assume that 12.x is the reason for making it not work.

Regards.
Comment 1 Slawomir Wojciech Wojtczak 2018-11-22 11:18:35 UTC
Also the log from then WINE command.

% cd ~/.wine/drive_c/BG1EE
% wine Baldur.exe 
0030:fixme:ver:GetCurrentPackageId (0x382ff40 0x0): stub
0009:fixme:win:EnumDisplayDevicesW ((null),0,0x32fad4,0x00000000), stub!
0009:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32fad4,0x00000000), stub!
0009:fixme:shcore:GetDpiForMonitor (0x1, 0, 0x32f0e4, 0x32f0fc): semi-stub
0009:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f718,0x00000000), stub!
0009:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32fad4,0x00000000), stub!
0009:fixme:win:EnumDisplayDevicesW ((null),1,0x32fad4,0x00000000), stub!
0009:fixme:win:EnumDisplayDevicesW ((null),0,0x32fad4,0x00000000), stub!
0009:fixme:win:EnumDisplayDevicesW ((null),1,0x32fad4,0x00000000), stub!
0009:fixme:console:AttachConsole stub ffffffff
INFO: status: 0
INFO: status: 0
INFO: Creating DPWrapper
INFO: Creating DPWrapper
INFO: Steam not found
INFO: Steam not found
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: mounting archive: sod-dlc.zip
INFO: mounting archive: sod-dlc.zip
INFO: mounting archive: webcache.zip
INFO: mounting archive: webcache.zip
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(0) C:/BG1EE/override
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(1) C:/BG1EE/scripts
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(2) C:/BG1EE/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(3) C:/BG1EE/lang/en_US/sounds
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(4) C:/BG1EE/portraits
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(5) C:/BG1EE/characters
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(6) C:/BG1EE/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(7) C:/BG1EE/lang/en_US/movies
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(8) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/override
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(9) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/scripts
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(10) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/sounds
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(11) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/portraits
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(12) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/characters
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: scanning:(13) C:/users/vermaden/My Documents/Baldur's Gate - Enhanced Edition/movies
INFO: LUA: UI string not found: Recent events text will go here.
INFO: LUA: UI string not found: Recent events text will go here.
INFO: LUA: Initializing Quests
INFO: LUA: Initializing Quests
0009:fixme:win:SetGestureConfig (0x20044 00000000 2 0x32fd34 12): stub
MESA-LOADER: failed to retrieve device information
0009:fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
0009:fixme:imm:ImmReleaseContext (0x20044, 0x5c22d28): stub
0009:fixme:msctf:ThreadMgr_ActivateEx Unimplemented flags 0x4
0009:fixme:msctf:ThreadMgrSource_AdviseSink (0x5c22c18) Unhandled Sink: {ea1ea136-19df-11d7-a6d2-00065b84435c}
0009:fixme:imm:NotifyIME NI_CLOSECANDIDATE
0009:fixme:msctf:ThreadMgrSource_AdviseSink (0x5c22c18) Unhandled Sink: {ea1ea136-19df-11d7-a6d2-00065b84435c}
INFO: gl.useShaders: 0
gl.has_s3tc: 1
gl.has_pvrtc: 0
gl.has_atc: 0
gl.postprocessing: 0
gl.uploadFormat: 0x80E1
gl.uploadType: 0x8367
gl.versionstring: 1.3 Mesa 17.3.1
gl.majorVersion: 1
gl.minorVersion: 3
INFO: gl.useShaders: 0
gl.has_s3tc: 1
gl.has_pvrtc: 0
gl.has_atc: 0
gl.postprocessing: 0
gl.uploadFormat: 0x80E1
gl.uploadType: 0x8367
gl.versionstring: 1.3 Mesa 17.3.1
gl.majorVersion: 1
gl.minorVersion: 3
0033:fixme:dbghelp:MiniDumpWriteDump NIY MiniDumpWithDataSegs

%
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-11-26 22:36:38 UTC
(In reply to vermaden from comment #0)
> 12.0-RC1

12.0-ALPHA8 up to 12.0-RC1 have a regression in COMPAT_FREEBSD32 which affects libdrm as used by Wine (via libGL). The fix (base r340657) landed in 12.0-RC2.
Comment 3 Slawomir Wojciech Wojtczak 2018-11-27 06:37:01 UTC
On 12-RC2 its better now - at least the game starts but now its the sound - its very jerky, all the time.
Comment 4 Slawomir Wojciech Wojtczak 2019-10-14 13:09:35 UTC
The sound is still broken on 12.1-RC1.

Is this a candidate for this?
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240700
Comment 5 Alex S 2019-10-14 13:53:35 UTC
(In reply to vermaden from comment #4)

For what it's worth, my sound with Wine is completely fine. Are you having issues specifically with Baldur's Gate audio?
Comment 6 Slawomir Wojciech Wojtczak 2019-10-14 16:29:46 UTC
(In reply to Alex S from comment #5)

I have had perfectly working Baldur's Gate Enhanced Edition under WINE under 11.2, but then 12.0 came and break the sound, then 11.3 came with same break and now 12.1 still has the same problem.

Its not that sound does not work - it does work but its very jerky.
Comment 7 Alex S 2019-10-14 16:42:51 UTC
(In reply to vermaden from comment #0)

> Its not that sound does not work - it does work but its very jerky.
Yes, that part is clear. I'm asking precisely whether there is any stutter with other Wine applications.
Comment 8 Slawomir Wojciech Wojtczak 2019-10-14 18:54:59 UTC
(In reply to Alex S from comment #7)
Its the same in other games, like Heroes III or Fallout.
Comment 9 Alex S 2019-10-15 15:05:01 UTC
Weird. With Planescape: Torment (Enhanced Edition), which should be close enough, the sound (again) works fine for me. I even tried Mesa's software rasterizer in combination with manually setting CPU frequency to 800 Mhz and with the game running at 1/3 full speed I still can't reproduce this.

(In reply to vermaden from comment #8)

Have you tested this on multiple machines? Is that snd_hda or another driver? In the end, you can always try to find the offending commit by bisection. This would take a while, though.
Comment 10 Slawomir Wojciech Wojtczak 2019-10-15 15:57:05 UTC
(In reply to Alex S from comment #9)

I have tried latest i386-wine-devel and i386-wine. Both work the same with 'jerky' sound. Its not about CPU/performance.

Its even in the [Test Sound] button in winecfg ...

How can I record sound from X11 so I can show you what is the problem?
Comment 11 Slawomir Wojciech Wojtczak 2019-10-15 16:05:43 UTC
Created attachment 208337 [details]
Test Sound

I mean this button.
Comment 12 Alex S 2019-10-15 16:09:53 UTC
(In reply to vermaden from comment #10)

> How can I record sound from X11 so I can show you what is the problem?
https://forums.freebsd.org/threads/switching-dsp-devices-on-the-fly.69773/#post-419290 (This will replace normal /dev/dsp until reboot.)
Comment 13 Alex S 2019-10-15 16:18:16 UTC
(In reply to Alex S from comment #12)

Although I'm unsure if Wine is actually able to use that virtual_oss loopback device...
Comment 14 Slawomir Wojciech Wojtczak 2019-10-15 16:39:26 UTC
Created attachment 208339 [details]
AUDIO

I have recorded the desktop with phone.

I was also able (unfortunatelly) to have the same jerky sound on youtube in Firefox without WINE if that helps.

This is the sound of this video played:
https://www.youtube.com/watch?v=JVf8bemEnzU

Hope that helps.
Comment 15 Slawomir Wojciech Wojtczak 2019-10-15 16:40:15 UTC
Some details:

% tail -5 /boot/device.hints
# T420s SOUND ON HEADPHONES
hint.hdaa.0.nid31.config="as=1"
hint.hdaa.0.nid25.config="as=1 seq=15 device=Headphones mute=0 misc=0"
hint.hdaa.0.nid28.config="as=1 seq=15 device=Headphones mute=0 misc=0"

% cat /dev/sndstat 
Installed devices:
pcm0: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Conexant CX20590 (Internal Analog Mic)> (rec)
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.

% kldstat -v | grep snd
                270 hdac/snd_hda
                269 pci/snd_hda
                268 hdaa/snd_hda_pcm
                267 hdacc/snd_hda
                266 pci/snd_via8233
                265 pci/snd_ich
                264 pci/snd_es137x
                263 emu10kx/snd_emu10kx_midi
                262 emu10kx/snd_emu10kx_pcm
                261 pci/snd_emu10kx
                260 csa/snd_csapcm
                259 pci/snd_csa
                258 pci/snd_cmi

% sysctl dev.hdaa
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config: 
dev.hdaa.1.gpo_state: 
dev.hdaa.1.gpio_config: 
dev.hdaa.1.gpio_state: 
dev.hdaa.1.gpi_state: 
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid8: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid7_original: 0x18560030 as=3 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7_config: 0x18560030 as=3 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid7: pin: Digital-out (Jack)
     Widget cap: 0x0040778d PWR DIGITAL UNSOL 8CH
    Association: 2 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x18560030 as=3 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 1
          + <- nid=4 [audio output]

dev.hdaa.1.nid6_original: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6_config: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid6: pin: Digital-out (Jack)
     Widget cap: 0x0040778d PWR DIGITAL UNSOL 8CH
    Association: 1 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x18560020 as=2 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 1
          + <- nid=3 [audio output]

dev.hdaa.1.nid5_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid5_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid5: pin: Digital-out (Jack)
     Widget cap: 0x0040778d PWR DIGITAL UNSOL 8CH
    Association: 0 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 1
          + <- nid=2 [audio output]

dev.hdaa.1.nid4: audio output
     Widget cap: 0x00006611 PWR DIGITAL 8CH
    Association: 2 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.1.nid3: audio output
     Widget cap: 0x00006611 PWR DIGITAL 8CH
    Association: 1 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.1.nid2: audio output
     Widget cap: 0x00006611 PWR DIGITAL 8CH
    Association: 0 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x80860101
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Intel Cougar Point Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config: 
dev.hdaa.0.gpo_state: 
dev.hdaa.0.gpio_config: 0=keep 1=keep 2=keep 3=keep
dev.hdaa.0.gpio_state: 0=disabled 1=disabled 2=disabled 3=disabled
dev.hdaa.0.gpi_state: 
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid37: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.0.nid36: audio mixer [DISABLED]
     Widget cap: 0x0020050b PWR STEREO
      Input amp: 0x80034a4a mute=1 step=74 size=3 offset=74 (-74/0dB)
    Connections: 2
          + [DISABLED] <- nid=16 [audio output]
          + [DISABLED] <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid35_original: 0x90a60170 as=7 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid35_config: 0x90a60170 as=7 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid35: pin: Mic (Fixed)
     Widget cap: 0x0040040b PWR STEREO
    Association: 2 (0x0001)
            OSS: monitor (monitor)
        Pin cap: 0x00000020 IN
     Pin config: 0x90a60170 as=7 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
    Pin control: 0x00000020 IN
      Input amp: 0x002f0400 mute=0 step=4 size=47 offset=0 (0/48dB)

dev.hdaa.0.nid34_original: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid34_config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid34: pin: Other (None) [DISABLED]
     Widget cap: 0x00400781 PWR DIGITAL UNSOL STEREO
        Pin cap: 0x00000010 OUT
     Pin config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
    Pin control: 0x00000000
    Connections: 1
          + <- nid=33 [audio output] [DISABLED]

dev.hdaa.0.nid33: audio output [DISABLED]
     Widget cap: 0x00000611 PWR DIGITAL STEREO
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e0160 16 20 24 bits, 44 48 96 KHz

dev.hdaa.0.nid32_original: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid32_config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid32: pin: Other (None) [DISABLED]
     Widget cap: 0x00400781 PWR DIGITAL UNSOL STEREO
        Pin cap: 0x00000010 OUT
     Pin config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
    Pin control: 0x00000000
    Connections: 1
          + <- nid=18 [audio output] [DISABLED]

dev.hdaa.0.nid31_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid31_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid31: pin: Speaker (Fixed)
     Widget cap: 0x00400501 PWR STEREO
    Association: 0 (0x0001)
        Pin cap: 0x00000010 OUT
     Pin config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
    Pin control: 0x00000040 OUT
    Connections: 2
          + <- nid=16 [audio output] (selected)
          + [DISABLED] <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid30_original: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid30_config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid30: pin: Other (None) [DISABLED]
     Widget cap: 0x00400481 PWR UNSOL STEREO
        Pin cap: 0x00000024 PDC IN
     Pin config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
    Pin control: 0x00000000

dev.hdaa.0.nid29_original: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid29_config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
dev.hdaa.0.nid29: pin: Other (None) [DISABLED]
     Widget cap: 0x00400581 PWR UNSOL STEREO
        Pin cap: 0x00010034 PDC OUT IN EAPD
     Pin config: 0x40f001f0 as=15 seq=0 device=Other conn=None ctype=Unknown loc=0x00 color=Unknown misc=1
    Pin control: 0x00000000
           EAPD: 0x00000002 EAPD
    Connections: 2
          + <- nid=16 [audio output] (selected)
          + <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid28_original: 0x6121401f as=1 seq=15 device=Headphones conn=None ctype=1/8 loc=Ext-Rear color=Green misc=0
dev.hdaa.0.nid28_config: 0x6121401f as=1 seq=15 device=Headphones conn=None ctype=1/8 loc=Ext-Rear color=Green misc=0
dev.hdaa.0.nid28: pin: Headphones (None) [DISABLED]
     Widget cap: 0x00400581 PWR UNSOL STEREO
        Pin cap: 0x00000014 PDC OUT
     Pin config: 0x6121401f as=1 seq=15 device=Headphones conn=None ctype=1/8 loc=Ext-Rear color=Green misc=0
    Pin control: 0x00000000
    Connections: 2
          + <- nid=16 [audio output] (selected)
          + <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid27_original: 0x04a11060 as=6 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid27_config: 0x04a11060 as=6 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid27: pin: Mic (Black Jack)
     Widget cap: 0x00400581 PWR UNSOL STEREO
    Association: 1 (0x0001)
            OSS: mic (mic)
        Pin cap: 0x00011334 PDC OUT IN VREF[ 50 80 HIZ ] EAPD
     Pin config: 0x04a11060 as=6 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x00000024 IN VREFs
           EAPD: 0x00000002 EAPD
    Connections: 2
          + [DISABLED] <- nid=16 [audio output] (selected)
          + [DISABLED] <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid26_original: 0x61a19050 as=5 seq=0 device=Mic conn=None ctype=1/8 loc=Ext-Rear color=Pink misc=0
dev.hdaa.0.nid26_config: 0x61a19050 as=5 seq=0 device=Mic conn=None ctype=1/8 loc=Ext-Rear color=Pink misc=0
dev.hdaa.0.nid26: pin: Mic (None) [DISABLED]
     Widget cap: 0x00400481 PWR UNSOL STEREO
        Pin cap: 0x00001324 PDC IN VREF[ 50 80 HIZ ]
     Pin config: 0x61a19050 as=5 seq=0 device=Mic conn=None ctype=1/8 loc=Ext-Rear color=Pink misc=0
    Pin control: 0x00000000

dev.hdaa.0.nid25_original: 0x04211040 as=4 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid25_config: 0x0421101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid25: pin: Headphones (Black Jack)
     Widget cap: 0x00400581 PWR UNSOL STEREO
    Association: 0 (0x8000)
        Pin cap: 0x0000001c PDC HP OUT
     Pin config: 0x0421101f as=1 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x00000080 HP
    Connections: 2
          + <- nid=16 [audio output] (selected)
          + [DISABLED] <- nid=17 [audio output] [DISABLED]

dev.hdaa.0.nid24: audio selector [DISABLED]
     Widget cap: 0x0030050d PWR STEREO
     Output amp: 0x00270400 mute=0 step=4 size=39 offset=0 (0/40dB)
    Connections: 4
          + [DISABLED] <- nid=26 [pin: Mic (None)] [DISABLED] (selected)
          + <- nid=27 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=29 [pin: Other (None)] [DISABLED]
          + [DISABLED] <- nid=30 [pin: Other (None)] [DISABLED]

dev.hdaa.0.nid23: audio selector
     Widget cap: 0x0030050d PWR STEREO
    Association: 1 (0x0001)
            OSS: mic
     Output amp: 0x00270400 mute=0 step=4 size=39 offset=0 (0/40dB)
    Connections: 4
          + [DISABLED] <- nid=26 [pin: Mic (None)] [DISABLED]
          + <- nid=27 [pin: Mic (Black Jack)] (selected)
          + [DISABLED] <- nid=29 [pin: Other (None)] [DISABLED]
          + [DISABLED] <- nid=30 [pin: Other (None)] [DISABLED]

dev.hdaa.0.nid22: audio input [DISABLED]
     Widget cap: 0x00100d1b LRSWAP PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0160 16 20 24 bits, 44 48 96 KHz
      Input amp: 0x8003504a mute=1 step=80 size=3 offset=74 (-74/6dB)
    Connections: 4
          + [DISABLED] <- nid=23 [audio selector] (selected)
          + <- nid=24 [audio selector] [DISABLED]
          + <- nid=35 [pin: Mic (Fixed)]
          + <- nid=36 [audio mixer] [DISABLED]

dev.hdaa.0.nid21: audio input
     Widget cap: 0x00100d1b LRSWAP PWR STEREO
    Association: 2 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0160 16 20 24 bits, 44 48 96 KHz
      Input amp: 0x8003504a mute=1 step=80 size=3 offset=74 (-74/6dB)
    Connections: 4
          + [DISABLED] <- nid=23 [audio selector]
          + [DISABLED] <- nid=24 [audio selector] [DISABLED]
          + <- nid=35 [pin: Mic (Fixed)] (selected)
          + [DISABLED] <- nid=36 [audio mixer] [DISABLED]

dev.hdaa.0.nid20: audio input
     Widget cap: 0x00100d1b LRSWAP PWR STEREO
    Association: 1 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0160 16 20 24 bits, 44 48 96 KHz
      Input amp: 0x8003504a mute=1 step=80 size=3 offset=74 (-74/6dB)
    Connections: 4
          + <- nid=23 [audio selector] (selected)
          + [DISABLED] <- nid=24 [audio selector] [DISABLED]
          + [DISABLED] <- nid=35 [pin: Mic (Fixed)]
          + [DISABLED] <- nid=36 [audio mixer] [DISABLED]

dev.hdaa.0.nid19: beep widget
     Widget cap: 0x0070000c
    Association: -2 (0x0000)
            OSS: speaker (speaker)
     Output amp: 0x000f0707 mute=0 step=7 size=15 offset=7 (-28/0dB)

dev.hdaa.0.nid18: audio output [DISABLED]
     Widget cap: 0x00000611 PWR DIGITAL STEREO
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e0160 16 20 24 bits, 44 48 96 KHz

dev.hdaa.0.nid17: audio output [DISABLED]
     Widget cap: 0x00000c1d LRSWAP PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
     Output amp: 0x80034a4a mute=1 step=74 size=3 offset=74 (-74/0dB)

dev.hdaa.0.nid16: audio output
     Widget cap: 0x00000c1d LRSWAP PWR STEREO
    Association: 0 (0x8001)
            OSS: pcm (pcm)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
     Output amp: 0x80034a4a mute=1 step=74 size=3 offset=74 (-74/0dB)

dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x17aa21d2
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Conexant CX20590 Audio Function Group
dev.hdaa.%parent:
Comment 16 Jan Beich freebsd_committer freebsd_triage 2019-10-15 18:09:46 UTC
Comment on attachment 208339 [details]
AUDIO

Maybe audio samples fail to fill the buffer in time before being played. Set hw.snd.verbose to 2 or greater then check "underrun" of the affected process in /dev/sndstat. If underrun != 0 try bumping hw.snd.latency and make sure hw.snd.latency_profile=1 (default).

> the same jerky sound on youtube in Firefox without WINE if that helps.

Try switching audio backend as described in firefox/pkg-message. Each one has different buffering defaults.
Comment 17 Alex S 2019-11-02 21:40:49 UTC
So, uh, how is investigation going?
Comment 18 Slawomir Wojciech Wojtczak 2019-11-02 23:34:29 UTC
(In reply to Alex S from comment #17)

Fuck it. I do not have time to deal with this shit.

You can mark it as solved even, I already got W520 where I would probable choose Windows 10 to play some games at last.

Regards.
Comment 19 Alex S 2019-11-03 00:01:59 UTC
(In reply to vermaden from comment #18)

> Fuck it. I do not have time to deal with this shit.
Ah, the story of FreeBSD desktop in a nutshell.

(This is not directed at you by the way. I recently upgraded to 12.1 and found that Wine crashes for me in a USR1 signal handler in dlls/ntdll/signal_i386.c, I had to comment the entire thing out. I dunno how much time would it take to properly debug it and that is far beyond my skill level anyway.)

On a more general note, if anybody else has Conexant CX20590, please try to reproduce these audio glitches. It does feel like a genuine regression somewhere.
Comment 20 Mark Linimon freebsd_committer freebsd_triage 2019-11-03 15:12:21 UTC
(In reply to vermaden from comment #18)

I understand that you are frustrated but please understand that all the desktop effort is done by volunteers.  Their work is unrewarding enough without being cussed at.  It's not appropriate.
Comment 21 Jan Beich freebsd_committer freebsd_triage 2019-11-03 17:35:14 UTC
Success story tends to be better on -CURRENT where regressions are easier to catch and developers haven't moved on.

(In reply to Alex S from comment #19)
> I recently upgraded to 12.1 and found that Wine crashes for me in a
> USR1 signal handler in dlls/ntdll/signal_i386.c, I had to comment
> the entire thing out

Maybe file a separate bug with more details e.g., sample program, wine output, stacktrace. emulators/i386-wine-devel (self-built in poudriere) works fine on 13.0-CURRENT amd64.
Comment 22 Alex S 2019-11-03 23:21:04 UTC
(In reply to Jan Beich from comment #21)

> Maybe file a separate bug with more details e.g., sample program, wine output
Let's not kid ourselves, then I would have to at least partially debug it. The output consists of "nested exception on signal stack" messages. Only seriously affects Steam, although that message can also be seen on Wine environment (wineserver & friends) shutdown, since one of the service applications dies with it.

> stacktrace
It's Wine. No stacktraces for you. No debugger as well.

> emulators/i386-wine-devel (self-built in poudriere) works fine on 13.0-CURRENT amd64.
I'm using a completely custom package set (https://github.com/shkhln/freebsd-lib32-companion-ports). i386-wine-devel-4.0.r1_1,1 package indeed doesn't have this issue.
Comment 23 Slawomir Wojciech Wojtczak 2019-12-08 12:32:53 UTC
(In reply to Alex S from comment #19)

I recently got FreeBSD installed also on that W520, it also has the same Conexant CX20590 sound chip but on W520 it works like a charm ...

I assume that as T420s needs these below in the /boot/device.hints file just to gest jack/headphones output there are probably other 'quirks' for T420s that made it work not so reliably ... or W520 has other 'quirks' then T420s. Also T520 and X220 work ok on FreeBSD so probably only T420s is problematic.

# tail -5 /boot/device.hints

# T420s SOUND ON HEADPHONES
hint.hdaa.0.nid31.config="as=1"
hint.hdaa.0.nid25.config="as=1 seq=15 device=Headphones mute=0 misc=0"
hint.hdaa.0.nid28.config="as=1 seq=15 device=Headphones mute=0 misc=0"

Regards.
Comment 24 Slawomir Wojciech Wojtczak 2019-12-08 12:34:28 UTC
(In reply to Mark Linimon from comment #20)

I am also one of those volunteers:
https://vermaden.wordpress.com/freebsd-desktop/
Comment 25 Alex S 2019-12-09 04:11:42 UTC
(In reply to vermaden from comment #23)

> I recently got FreeBSD installed also on that W520,
> it also has the same Conexant CX20590 sound chip but on W520 it works like a charm ...
I see. Yeah, it's probably not worth spending any more time on this. (Let's get back to wow64 instead. Why am I the only person complaining about it?)


(In reply to Alex S from comment #22)

> "nested exception on signal stack"
FYI, -march=i686 works around it. (The default march value for -m32 is x86_64.)
Comment 26 Slawomir Wojciech Wojtczak 2020-01-19 04:50:17 UTC
I finally nailed the source of this problem ...

Below line in /boot/loader.conf file:

  hw.snd.latency=7

Without this line sound in Firefox and WINE works well.

The W520 initially worked because I did not yet added my full /boot/loader.conf configuration ... and this option (hw.snd.latency=7) is suggested by almost ALL guides regarding tuning FreeBSD for lower power consumption ...

Finally solved.

What it (hw.snd.latency=7) does break:
  Firefox sound (audio in movies from youtube.com for example)
  WINE sound

What it (hw.snd.latency=7) does not break:
  Chromium sound
  MPV/VLC sound

Hope that helps someone.

Regards.