Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-21 Thread Miles Keaton
On Tue, Jul 19, 2016 at 5:31 AM, Alexandre Ratchov  wrote:

> If you have some time, could you build a kernel with the
> AZALIA_DEBUG option, reboot using the new kernel and send me the
> output of dmesg once with the mic disabled in the bios and once
> with the mic enabled.  This way we could compare them and possibly
> find a fix.
>

Happy to help!  Here are the two dmesg, using -current.  Let me know if I
can help/test in any way.

# DISABLED:

OpenBSD 6.0 (AZALIA) #0: Thu Jul 21 11:52:32 NZST 2016
derek@t440s.x:/usr/src/sys/arch/amd64/compile/AZALIA
real mem = 8246124544 (7864MB)
avail mem = 7991668736 (7621MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdcd3d000 (61 entries)
bios0: vendor LENOVO version "GJET67WW (2.17 )" date 12/10/2013
bios0: LENOVO 20AQCTO1WW
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT
SSDT SSDT SSDT SSDT PCCT SSDT UEFI POAT ASF! BATB FPDT UEFI SSDT DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.67 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
acpipwrres1 at acpi0: NVP3, resource for PEG_
acpipwrres2 at acpi0: NVP2, resource for PEG_
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
"LEN0071" at acpi0 not configured
"LEN0036" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "45N1773" serial 32828 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 model "45N1737" serial 26275 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT340F" at acpi0 not configured
"INT33A0" at acpi0 not configured
acpivideo0 at acpi0: VID_
acpivout at acpivideo0 not configured
acpiv

Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-18 Thread Alexandre Ratchov
On Mon, Jul 18, 2016 at 04:01:30PM +0800, Miles Keaton wrote:
> On Mon, Jul 18, 2016 at 3:09 PM, Alexandre Ratchov  wrote:
> 
> > could you go in the bios setup and see if there are options to
> > disable audio recording?  If so, could you enable recording and see
> > what happens?
> >
> 
> That fixed it. Thank you!
> 
> So, (for the list archives), azalia audio driver :
> http://man.openbsd.org/OpenBSD-current/man4/azalia.4
> 
> dmesg cliip:
> azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi
> azalia1: codecs: Realtek ALC292
> audio0 at azalia1
> 
> When hardware microphone is disabled in BIOS, audio will stutter.  Enabling
> hardware microphone again makes audio work fine.
> 
> Very strange, but true.
> 

When the microphone is disabled, the azalia driver gets confused on
certain machines.  We need to fix it (ie make the device appear
play-only), but I don't have a machine that reproduces the problem.

If you have some time, could you build a kernel with the
AZALIA_DEBUG option, reboot using the new kernel and send me the
output of dmesg once with the mic disabled in the bios and once
with the mic enabled.  This way we could compare them and possibly
find a fix.

thanks



Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-18 Thread Erling Westenvik
On Mon, Jul 18, 2016 at 04:01:30PM +0800, Miles Keaton wrote:
> On Mon, Jul 18, 2016 at 3:09 PM, Alexandre Ratchov  wrote:
> 
> When hardware microphone is disabled in BIOS, audio will stutter.  Enabling
> hardware microphone again makes audio work fine.
> 
> Very strange, but true.

Alarming? Okay, I'm in a somewhat lazy summer holiday mode here, and
recent political events may have made me a little jumpy, but at this
point I would seriously consider cutting the wires to the hardware
microphone so as to see if audio will start stuttering againg.. :-D

-- 
Erling Westenvik



Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-18 Thread Miles Keaton
On Mon, Jul 18, 2016 at 3:09 PM, Alexandre Ratchov  wrote:

> could you go in the bios setup and see if there are options to
> disable audio recording?  If so, could you enable recording and see
> what happens?
>

That fixed it. Thank you!

So, (for the list archives), azalia audio driver :
http://man.openbsd.org/OpenBSD-current/man4/azalia.4

dmesg cliip:
azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi
azalia1: codecs: Realtek ALC292
audio0 at azalia1

When hardware microphone is disabled in BIOS, audio will stutter.  Enabling
hardware microphone again makes audio work fine.

Very strange, but true.

Thanks again.



Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-17 Thread Miles Keaton
Good question! Just tried a regular pop song MP3 and got the same
stuttering.  Here's the mplayer output:

===
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 56.60.100 (external)
AUDIO: 44100 Hz, 2 ch, floatle, 177.3 kbit/6.28% (ratio: 22161->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
===
AO: [sndio] 44100Hz 2ch s32le (4 bytes per sample)
Video: no video
Starting playback...
A:   0.1 (00.1) of 179.0 (02:59.0)  0.5%
Audio device got stuck!
A:   0.4 (00.4) of 179.0 (02:59.0)  0.4%
Audio device got stuck!
A:   0.7 (00.6) of 179.0 (02:59.0)  0.4%
(... etc ...)


On Mon, Jul 18, 2016 at 2:52 PM, Alexandre Ratchov  wrote:

> On Mon, Jul 18, 2016 at 02:46:52PM +0800, Miles Keaton wrote:
> > Lenovo ThinkPad T440s : just a couple years old.
> >
> > Triple-booting Arch Linux and Windows too, it's plenty fast to watch even
> > huge HD 1080p movies.
> >
> > But on a new stock OpenBSD (dmesg below) it does that stuttering thing
> with
> > all video, even the tiniest little YouTube or low-resolution mp4 file,
> even
> > if only 3 seconds long:  "ev.. er...y  th... ing... stut... ters... a...
> > few... times... per... sec... ond...", whether using mplayer or browser
> or
> > any other method I've tried.
> >
> > I saw http://www.openbsd.org/faq/faq13.html#audioserver and tried the
> > `rcctl set sndiod flags -b2400` advice with various frames values, huge
> and
> > small, but it had no effect.
> >
> > Any pointers for what you'd look at, if it were you, to troubleshoot
> this?
> > I'm happy to do the work, but sorry I don't know where to start.
>
> could you confirm that audio stutters even if video is not
> involved?



Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-17 Thread Alexandre Ratchov
On Mon, Jul 18, 2016 at 02:46:52PM +0800, Miles Keaton wrote:
> Lenovo ThinkPad T440s : just a couple years old.
> 
> Triple-booting Arch Linux and Windows too, it's plenty fast to watch even
> huge HD 1080p movies.
> 
> But on a new stock OpenBSD (dmesg below) it does that stuttering thing with
> all video, even the tiniest little YouTube or low-resolution mp4 file, even
> if only 3 seconds long:  "ev.. er...y  th... ing... stut... ters... a...
> few... times... per... sec... ond...", whether using mplayer or browser or
> any other method I've tried.
> 
> I saw http://www.openbsd.org/faq/faq13.html#audioserver and tried the
> `rcctl set sndiod flags -b2400` advice with various frames values, huge and
> small, but it had no effect.
> 
> Any pointers for what you'd look at, if it were you, to troubleshoot this?
> I'm happy to do the work, but sorry I don't know where to start.

could you confirm that audio stutters even if video is not
involved?



how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-17 Thread Miles Keaton
Lenovo ThinkPad T440s : just a couple years old.

Triple-booting Arch Linux and Windows too, it's plenty fast to watch even
huge HD 1080p movies.

But on a new stock OpenBSD (dmesg below) it does that stuttering thing with
all video, even the tiniest little YouTube or low-resolution mp4 file, even
if only 3 seconds long:  "ev.. er...y  th... ing... stut... ters... a...
few... times... per... sec... ond...", whether using mplayer or browser or
any other method I've tried.

I saw http://www.openbsd.org/faq/faq13.html#audioserver and tried the
`rcctl set sndiod flags -b2400` advice with various frames values, huge and
small, but it had no effect.

Any pointers for what you'd look at, if it were you, to troubleshoot this?
I'm happy to do the work, but sorry I don't know where to start.

Thank you.

===

OpenBSD 5.9 (GENERIC.MP) #4: Thu May 19 08:22:39 CEST 2016
jas...@stable-59-amd64.mtier.org:
/binpatchng/work-binpatch59-amd64/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8246124544 (7864MB)
avail mem = 7992012800 (7621MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdcd3d000 (61 entries)
bios0: vendor LENOVO version "GJET67WW (2.17 )" date 12/10/2013
bios0: LENOVO 20AQCTO1WW
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT
SSDT SSDT SSDT SSDT PCCT SSDT UEFI POAT ASF! BATB FPDT UEFI SSDT DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.69 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 1995.38 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,
BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
acpipwrres1 at acpi0: NVP3, resource for PEG_
acpipwrres2 at acpi0: NVP2, resource for PEG_
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "45N1773" serial 32828 type LION oem "SANYO"
acpibat1 at acpi0: BAT