-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix-sound.sh
executable file
·51 lines (48 loc) · 1.25 KB
/
fix-sound.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# https://forums.lenovo.com/t5/Ubuntu/Ubuntu-and-legion-pro-7-16IRX8H-audio-issues/m-p/5210709?page=32
echo "options snd-hda-intel model=,17aa:38a8" | sudo tee /etc/modprobe.d/60-hda.conf
echo "options snd_hda_intel power_save=0" | sudo tee /etc/modprobe.d/audio_disable_powersave.conf
echo "options snd_hda_intel power_save_controller=N" | sudo tee -a /etc/modprobe.d/audio_disable_powersave.conf
cp -a /usr/share/wireplumber ~/.config/
# EOF config file ~/.config/wireplumber/wireplumber.conf.d/51-disable-suspension.conf
cat <<EOF > ~/.config/wireplumber/wireplumber.conf.d/51-disable-suspension.conf
monitor.alsa.rules = [
{
matches = [
{
# Matches all sources
node.name = "~alsa_input.*"
},
{
# Matches all sinks
node.name = "~alsa_output.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]
# bluetooth devices
monitor.bluez.rules = [
{
matches = [
{
# Matches all sources
node.name = "~bluez_input.*"
},
{
# Matches all sinks
node.name = "~bluez_output.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]
EOF