pierostrada

AudioCheck-sh.txt

Jul 31st, 2023
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | Software | 0 0
  1. Language: bash
  2. #version="5-2023-03-06@16:48"
  3. #version="5.1-2023-07-31@19:03:56"
  4. #author="https://forum.endeavouros.com/u/storm/"
  5. #about="Generates a set of log files in current or '$1' directory
  6. about the current kernel/audio configuration in case of 'Dummy Output', as happens with
  7. kernels 'linux-lts 6.1.15-1' and 'linux 6.2.2.arch1-1' with audio via HDMI
  8. (Kernel '5.15.96.61.realtime1-1-rt-lts' works well)."
  9.  
  10. Hn="`hostname | tr '[:upper:]' '[:lower:]'`"
  11. Kt=$(uname -r | cut -d- -f 3-) #Kernel type [rt-]lts or '_'
  12. [[ "$Kt" = '' ]] && Kt='_'
  13. pfix="aud-${Kt}"
  14.  
  15. [[ -d "$1" ]] && pth=${@%/} || pth="`pwd`"
  16. echo "Audio report of [($pth/)$Hn] running:"
  17.  
  18. #https://forum.endeavouros.com/t/pulseaudio-speakers-not-getting-detected-port-is-unplugged/38049
  19. ouFile="$pth/$Hn-$pfix-pipedaemons.log"
  20. echo "Generating $ouFile"
  21. echo '$ systemctl --user status pipewire pipewire-pulse' > "$ouFile"
  22. systemctl --user status pipewire pipewire-pulse >> "$ouFile"
  23.  
  24. #https://bbs.archlinux.org/viewtopic.php?id=96337
  25. ouFile="$pth/$Hn-$pfix-modinfo.log"
  26. echo "Generating $ouFile"
  27. echo '$ sudo modinfo soundcore' > "$ouFile"
  28. sudo modinfo soundcore >> "$ouFile"
  29.  
  30. ouFile="$pth/$Hn-$pfix-alsa-info.log"
  31. echo "Generating $ouFile"
  32. echo '$ sudo alsa-info.sh --stdout' > "$ouFile"
  33. sudo alsa-info.sh --stdout >> "$ouFile"
  34.  
  35. ouFile="$pth/$Hn-$pfix-pac-alsa.log"
  36. echo "Generating $ouFile"
  37. echo '$ pacman -Qs alsa' > "$ouFile"
  38. pacman -Qs alsa >> "$ouFile"
  39.  
  40. ouFile="$pth/$Hn-$pfix-pac-pulseaudio.log"
  41. echo "Generating $ouFile"
  42. echo '$ pacman -Qs pulseaudio' > "$ouFile"
  43. pacman -Qs pulseaudio >> "$ouFile"
  44.  
  45. ouFile="$pth/$Hn-$pfix-pac-pipewire.log"
  46. echo "Generating $ouFile"
  47. echo '$ pacman -Qs pipewire' > "$ouFile"
  48. pacman -Qs pipewire >> "$ouFile"
  49.  
  50. ouFile="$pth/$Hn-$pfix-iaa.log"
  51. echo "Generating $ouFile"
  52. echo '$ inxi -Aa' > "$ouFile"
  53. inxi -Aa >> "$ouFile"
  54.  
  55. ouFile="$pth/$Hn-$pfix-alsa.log"
  56. echo "Generating $ouFile"
  57. echo '$ uname -a' > "$ouFile"
  58. uname -a >> "$ouFile"
  59. echo >> "$ouFile"
  60. echo '$ grep "^GRUB_CMDLINE" /etc/default/grub' >> "$ouFile"
  61. grep '^GRUB_CMDLINE' /etc/default/grub >> "$ouFile"
  62. echo >> "$ouFile"
  63. echo '$ cat /proc/asound/modules' >> "$ouFile"
  64. cat /proc/asound/modules >> "$ouFile"
  65. echo >> "$ouFile"
  66. #As suggested by [joekamprad](https://forum.endeavouros.com/u/joekamprad) Der Doktor in https://forum.endeavouros.com/t/no-sound-from-front-audio-jack/30375/14
  67. echo "sudo modprobe snd_hda_codec >> $ouFile"
  68. sudo modprobe snd_hda_codec >> "$ouFile" 2>&1
  69. echo "sudo modprobe snd_hda_intel >> $ouFile"
  70. sudo modprobe snd_hda_intel >> "$ouFile" 2>&1
  71. #echo '$ sudo modprobe snd_hda_intel_codec' >> "$ouFile"
  72. #sudo modprobe snd_hda_intel_codec >> "$ouFile" 2>&1
  73. echo >> "$ouFile"
  74. echo '$ lsmod | grep snd' >> "$ouFile"
  75. lsmod | grep snd >> "$ouFile"
  76. echo >> "$ouFile"
  77. echo '$ ls /etc/modprobe.d/ ' >> "$ouFile"
  78. ls /etc/modprobe.d/ >> "$ouFile"
  79. echo >> "$ouFile"
  80. echo '$ cat /etc/modprobe.d/blacklist.conf' >> "$ouFile"
  81. cat /etc/modprobe.d/blacklist.conf >> "$ouFile" 2>&1
  82. echo >> "$ouFile"
  83. echo '$ cat /etc/modprobe.d/disable-dmic.conf' >> "$ouFile"
  84. cat /etc/modprobe.d/disable-dmic.conf >> "$ouFile" 2>&1
  85. echo >> "$ouFile"
  86. echo '$ cat /etc/modprobe.d/alsa-base.conf' >> "$ouFile"
  87. cat /etc/modprobe.d/alsa-base.conf >> "$ouFile" 2>&1
  88. echo '$ aplay -l' >> "$ouFile"
  89. aplay -l >> "$ouFile"
  90. echo >> "$ouFile"
  91. echo '$ lspci -v | grep -A7 -i "audio"' >> "$ouFile"
  92. lspci -v | grep -A7 -i "audio" >> "$ouFile"
  93. echo >> "$ouFile"
  94. echo '$ sudo lspci -v | grep -A7 -i "audio"' >> "$ouFile"
  95. sudo lspci -v | grep -A7 -i "audio" >> "$ouFile"
  96.  
  97. ouFile="$pth/$Hn-$pfix-iFull.log"
  98. echo "Generating $ouFile"
  99. echo '$ inxi -Fxxxza --no-host' > "$ouFile"
  100. inxi -Fxxxza --no-host >> "$ouFile"
  101.  
  102. ouFile="$pth/$Hn-$pfix-neofetch.log"
  103. echo "Generating $ouFile"
  104. echo '$ neofetch --off --stdout' > "$ouFile"
  105. neofetch --off --stdout >> "$ouFile"
  106.  
  107. ouFile="$pth/$Hn-$pfix-pactl-sinks.log"
  108. echo "Generating $ouFile"
  109. echo '$ pulsemixer -l' > "$ouFile"
  110. pulsemixer -l >> "$ouFile"
  111. echo >> "$ouFile"
  112. echo '$ pactl list short sinks' >>"$ouFile"
  113. pactl list short sinks >> "$ouFile"
  114. echo >> "$ouFile"
  115. echo '$ pactl list sinks' >> "$ouFile"
  116. pactl list sinks >> "$ouFile"
  117. echo
  118. echo "Audio report concluso, test con $ speaker-test -c 2"
  119. echo "End of Audio report: you can test with command $ speaker-test -c 2"
  120. echo
  121. ls $pth/$Hn-$pfix-*.log
  122.  
Tags: audio
Advertisement
Add Comment
Please, Sign In to add comment