发现一个耳机切换的bug
Tofloor
poster avatar
打击越
deepin
2016-08-01 17:59
Author
最近发现一个bug.

插上耳机听音乐。后来耳机拔掉了。再开机的时候,发现系统没有声音了,去控制面板看了下,声音设置里面选的还是耳机。没有自动切换回来。这种情况每次都出现。

今天,又出现了一个以前没有出现的情况,就是本来是用电脑自带的喇叭听音乐的,后来关机了,再开机,插上耳机,发现耳机没有声音,去设置里面看了下,声音选 的是电脑自带的,没有自动切换过来。



Reply Favorite View the author
All Replies
jingle
deepin
2016-08-01 18:25
#1
这个与硬件有关,如果硬件不支持插拔事件就会是这样。

执行 pulseaudio --kill; pulseaudio --start --log-level=debug --log-target=newfile:/tmp/pulse.log 然后执行插拔操作,然后把日志文件发一下。
Reply View the author
打击越
deepin
2016-08-01 19:54
#2
https://bbs.deepin.org/post/41956
这个与硬件有关,如果硬件不支持插拔事件就会是这样。

执行 pulseaudio --kill; pulseaudio --start --log ...

我这个开机情况下拔插是正常的,就是重启机器后会出问题。


日志见附件!

purse.log.tar.gz

Reply View the author
jingle
deepin
2016-08-01 20:37
#3
imever 发表于 2016-8-1 11:54
我这个开机情况下拔插是正常的,就是重启机器后会出问题。



谢谢,已发开发者定位。
Reply View the author
fuyao
deepin
2016-08-01 21:36
#4
我的也有这问题,Windows没发现这问题
Reply View the author
catbb49294929
deepin
2016-08-01 22:43
#5
我也有这个问题
Reply View the author
kaile
deepin
2016-08-01 23:09
#6
同样问题,deepin下用耳机,重启回到windows耳机死活没声音,必须拔下耳机重启windows才能正常,重现率100%,有必要可以提供日志!!!!!
Reply View the author
yanbowen
deepin
2016-08-01 23:40
#7
从日志发现:没有你说的问题,每次插入拔出都有端口切换的动作:
  1. ### 插入时
  2. D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now plugged in
  3. D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status yes
  4. D: [pulseaudio] module-switch-on-port-available.c: Trying to switch to port analog-output-headphones
  5. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Activating path analog-output-headphones
  6. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Path analog-output-headphones (Headphones), direction=1, priority=90, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=87, min_dB=-181.5, max_dB=0  D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Master, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes
  7. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Headphone, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes
  8. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Speaker, direction=1, switch=2, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x6, n_channels=2, override_map=no
  9. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element PCM, direction=1, switch=0, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes
  10. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element IEC958, direction=1, switch=2, volume=0, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x0, n_channels=0, override_map=no
  11. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Dock Headphone, alsa_name='Dock Headphone Jack', detection unavailable
  12. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Dock Headphone Phantom, alsa_name='Dock Headphone Phantom Jack', detection unavailable
  13. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Front Headphone, alsa_name='Front Headphone Jack', detection unavailable
  14. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Front Headphone Phantom, alsa_name='Front Headphone Phantom Jack', detection unavailable
  15. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Headphone, alsa_name='Headphone Jack', detection possible
  16. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Headphone Phantom, alsa_name='Headphone Phantom Jack', detection unavailable
  17. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Headphone Mic, alsa_name='Headphone Mic Jack', detection unavailable
  18. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Successfully enabled deferred volume.
  19. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Hardware volume ranges from -181.50 dB to 0.00 dB.
  20. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Fixing base volume to 0.00 dB
  21. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
  22. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Using hardware mute control.
  23. D: [alsa-sink-ALC3239 Analog] alsa-sink.c: Written HW volume did not match with the request: front-left: 28808 /  44% / -21.42 dB,   front-right: 28808 /  44% / -21.42 dB (request) != front-left: 28443 /  43% / -21.75 dB,   front-       right: 28443 /  43% / -21.75 dB
  24. I: [pulseaudio] sink.c: Changed port of sink 1 "alsa_output.pci-0000_00_1b.0.analog-stereo" to analog-output-headphones


  25. ### 拔出时
  26. D: [pulseaudio] module-alsa-card.c: Jack 'Headphone Jack' is now unplugged
  27. D: [pulseaudio] device-port.c: Setting port analog-output-speaker to status unknown
  28. D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status no
  29. D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
  30. D: [pulseaudio] module-switch-on-port-available.c: Trying to switch away from port analog-output-headphones, found analog-output-speaker
  31. D: [pulseaudio] module-switch-on-port-available.c: Trying to switch to port analog-output-speaker
  32. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Activating path analog-output-speaker
  33. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Path analog-output-speaker (Speakers), direction=1, priority=100, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=87, min_dB=-181.5, max_dB=0
  34. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Master, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x7ffffffffffff, n_channels=1, override_map=yes
  35. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Headphone, direction=1, switch=2, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x6, n_channels=2, override_map=no
  36. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element Speaker, direction=1, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes
  37. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element PCM, direction=1, switch=0, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes
  38. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Element IEC958, direction=1, switch=2, volume=0, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x0, n_channels=0, override_map=no
  39. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Headphone, alsa_name='Headphone Jack', detection possible
  40. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Dock Headphone, alsa_name='Dock Headphone Jack', detection unavailable
  41. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Front Headphone, alsa_name='Front Headphone Jack', detection unavailable
  42. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Line Out, alsa_name='Line Out Jack', detection unavailable
  43. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Line Out Front, alsa_name='Line Out Front Jack', detection unavailable
  44. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Front Line Out, alsa_name='Front Line Out Jack', detection unavailable
  45. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Rear Line Out, alsa_name='Rear Line Out Jack', detection unavailable
  46. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Dock Line Out, alsa_name='Dock Line Out Jack', detection unavailable
  47. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Speaker Phantom, alsa_name='Speaker Phantom Jack', detection possible
  48. D: [alsa-sink-ALC3239 Analog] alsa-mixer.c: Jack Speaker Front Phantom, alsa_name='Speaker Front Phantom Jack', detection unavailable
  49. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Successfully enabled deferred volume.
  50. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Hardware volume ranges from -181.50 dB to 0.00 dB.
  51. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Fixing base volume to 0.00 dB
  52. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
  53. I: [alsa-sink-ALC3239 Analog] alsa-sink.c: Using hardware mute control.
  54. I: [pulseaudio] sink.c: Changed port of sink 1 "alsa_output.pci-0000_00_1b.0.analog-stereo" to analog-output-speaker
Copy the Code
Reply View the author
yanbowen
deepin
2016-08-01 23:41
#8
https://bbs.deepin.org/post/41956
我这个开机情况下拔插是正常的,就是重启机器后会出问题。

重启后插拔时端口不变?
Reply View the author
guanmfei
deepin
2016-08-02 00:00
#9
我也出现过这个问题
Reply View the author
kola
deepin
2016-08-02 00:17
#10
系统装好,插耳机必须手动去 【声音】-【高级】-【输出端口】-【模拟耳机】。不过后面就可以自动切换了。
Reply View the author
15******[email protected]
deepin
2016-08-02 00:23
#11
我也有这个问题:每次开机虽然有开机音乐,但进入桌面后是没有声音的,非要用耳机插一下,才会出现声音。https://bbs.deepin.org/user/48640
Reply View the author
pandajxc
deepin
2016-08-02 06:12
#12
我注销后也会出现类似情况
Reply View the author