Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipewire microphone issue #8

Open
bahtioraliev opened this issue May 20, 2022 · 13 comments
Open

Pipewire microphone issue #8

bahtioraliev opened this issue May 20, 2022 · 13 comments

Comments

@bahtioraliev
Copy link

bahtioraliev commented May 20, 2022

Distribution (run cat /etc/os-release):

 NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

admin@tool:~$ apt policy pipewire
pipewire:
  Installed: 0.3.51-1~1652110702~22.04~fc77ff2
  Candidate: 0.3.51-1~1652110702~22.04~fc77ff2
  Version table:
     0.3.51-1~ubuntu22.04 500
        500 https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu jammy/main amd64 Packages
 *** 0.3.51-1~1652110702~22.04~fc77ff2 1001
       1001 http://apt.pop-os.org/release jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.48-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Issue/Bug Description:
Microphone not working properly in zoom, and occasionally failed on slack.

● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-05-19 13:19:28 IDT; 23h ago
TriggeredBy: ● pipewire.socket
   Main PID: 1227 (pipewire)
      Tasks: 2 (limit: 46896)
     Memory: 13.9M
        CPU: 2min 41.355s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─1227 /usr/bin/pipewire

May 19 13:19:28 tool systemd[1165]: Started PipeWire Multimedia Service.
May 19 13:19:28 tool pipewire[1227]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
May 19 13:19:28 tool pipewire[1227]: mod.rt: could not set nice-level to -11: Permission denied
May 19 13:19:28 tool pipewire[1227]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
May 19 13:19:28 tool pipewire[1227]: mod.rt: could not make thread 1269 realtime using RTKit: Permission denied

Steps to reproduce (if you know):
Not that I'm aware of.
Update all packaged from 2 weeks ago.

Expected behavior:
Microphone to work properly.

Other Notes:

# systemctl --user status pipewire-session-manager
Warning: The unit file, source configuration file or drop-ins of pipewire-session-manager.service changed on disk. Run 'systemctl --user daemon-reload' to reload units.
○ pipewire-session-manager.service
     Loaded: error (Reason: Unit pipewire-session-manager.service failed to load properly, please adjust/correct and reload service manager: File exists)
     Active: inactive (dead)

May 19 13:19:28 tool systemd[1165]: pipewire-session-manager.service: Cannot add dependency job, ignoring: Unit pipewire-session-manager.service failed to load properly, please adjust/correct and reload ser>

@n3m0-22
Copy link

n3m0-22 commented May 20, 2022

Is the microphone you are using connected through the Mic input, USB, Bluetooth, or an audio interface?

@mmstick mmstick transferred this issue from pop-os/pop May 20, 2022
@bahtioraliev
Copy link
Author

The behavior is the same with the mic connected via USB and from build in laptop mic. (Lenovo t14)

@bahtioraliev
Copy link
Author

Can we focus on resolving those errors? Which might resolve the behavior.

@mmstick
Copy link
Member

mmstick commented May 23, 2022

The problem is that you have a Pipewire PPA most likely. That session manager service isn't used on Pop. Only wireplumber, pipewire, and pipewire-pulse

@bahtioraliev
Copy link
Author

Prior to current popos version, I followed the following guide https://ubuntuhandbook.org/index.php/2021/05/install-latest-pipewire-ppa-ubuntu-20-04/
What I need to uninstall/reinstall to get rid of unnecessary packages?

mmstick pushed a commit that referenced this issue Jun 9, 2022
… is destroyed

Previously, the resource listener was not removed when
the `node_data` object was freed, which could lead to
a use-after-free when the resource emitted an event
later.

==2787072==ERROR: AddressSanitizer: heap-use-after-free on address 0x61d000016728 at pc 0x7ffff7175b52 bp 0x7fffffffb930 sp 0x7fffffffb920
WRITE of size 8 at 0x61d000016728 thread T0
    #0 0x7ffff7175b51 in spa_list_remove ../spa/include/spa/utils/list.h:77
    #1 0x7ffff717cb5a in pw_resource_destroy ../src/pipewire/resource.c:335
    #2 0x7ffff7051c56 in pw_global_destroy ../src/pipewire/global.c:417
    #3 0x7ffff6f82a68 in registry_destroy ../src/pipewire/impl-core.c:130
    #4 0x7ffff3a5f349 in registry_demarshal_destroy ../src/modules/module-protocol-native/protocol-native.c:784
    #5 0x7ffff3a2c9ed in process_messages ../src/modules/module-protocol-native.c:352
    #6 0x7ffff3a2e2ea in connection_data ../src/modules/module-protocol-native.c:423
    #7 0x7ffff3e09402 in source_io_func ../spa/plugins/support/loop.c:427
    #8 0x7ffff3e0851d in loop_iterate ../spa/plugins/support/loop.c:409
    #9 0x7ffff709c21d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #10 0x555555559722 in main ../src/daemon/pipewire.c:131
    #11 0x7ffff62a528f  (/usr/lib/libc.so.6+0x2928f)
    #12 0x7ffff62a5349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #13 0x5555555582a4 in _start (./src/daemon/pipewire+0x42a4)

0x61d000016728 is located 2216 bytes inside of 2264-byte region [0x61d000015e80,0x61d000016758)
freed by thread T0 here:
    #0 0x7ffff798c672 in __interceptor_free /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7ffff70f9bc3 in pw_impl_node_destroy ../src/pipewire/impl-node.c:1880
    #2 0x7ffff70d1d57 in global_destroy ../src/pipewire/impl-node.c:638
    #3 0x7ffff7051a4f in pw_global_destroy ../src/pipewire/global.c:414
    #4 0x7ffff6f82a68 in registry_destroy ../src/pipewire/impl-core.c:130
    #5 0x7ffff3a5f349 in registry_demarshal_destroy ../src/modules/module-protocol-native/protocol-native.c:784
    #6 0x7ffff3a2c9ed in process_messages ../src/modules/module-protocol-native.c:352
    #7 0x7ffff3a2e2ea in connection_data ../src/modules/module-protocol-native.c:423
    #8 0x7ffff3e09402 in source_io_func ../spa/plugins/support/loop.c:427
    #9 0x7ffff3e0851d in loop_iterate ../spa/plugins/support/loop.c:409
    #10 0x7ffff709c21d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #11 0x555555559722 in main ../src/daemon/pipewire.c:131
    #12 0x7ffff62a528f  (/usr/lib/libc.so.6+0x2928f)

previously allocated by thread T0 here:
    #0 0x7ffff798d411 in __interceptor_calloc /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7ffff70e5bb7 in pw_context_create_node ../src/pipewire/impl-node.c:1192
    #2 0x7ffff28c748e in pw_spa_node_new ../src/modules/spa/spa-node.c:112
    #3 0x7ffff28c9a9f in pw_spa_node_load ../src/modules/spa/spa-node.c:276
    #4 0x7ffff28c1618 in create_object ../src/modules/spa/module-node-factory.c:134
    #5 0x7ffff7106c4e in pw_impl_factory_create_object ../src/pipewire/impl-factory.c:273
    #6 0x7ffff6f86dd7 in core_create_object ../src/pipewire/impl-core.c:349
    #7 0x7ffff3a5cba9 in core_method_demarshal_create_object ../src/modules/module-protocol-native/protocol-native.c:680
    #8 0x7ffff3a2c9ed in process_messages ../src/modules/module-protocol-native.c:352
    #9 0x7ffff3a2e2ea in connection_data ../src/modules/module-protocol-native.c:423
    #10 0x7ffff3e09402 in source_io_func ../spa/plugins/support/loop.c:427
    #11 0x7ffff3e0851d in loop_iterate ../spa/plugins/support/loop.c:409
    #12 0x7ffff709c21d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #13 0x555555559722 in main ../src/daemon/pipewire.c:131
    #14 0x7ffff62a528f  (/usr/lib/libc.so.6+0x2928f)

SUMMARY: AddressSanitizer: heap-use-after-free ../spa/include/spa/utils/list.h:77 in spa_list_remove
mmstick pushed a commit that referenced this issue Jun 9, 2022
Register a pthread cleanup handler to guarantee
that `spa_source::{priv, rmask}` are cleared even
if the thread is cancelled while the loop is dispatching.

This is necessary, otherwise `spa_source::priv` could point
to the stack of the cancelled thread, which will lead to
problems like this later:

  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x00007f846b025be2 in detach_source (source=0x7f845f435f60) at ../spa/plugins/support/loop.c:144
  144      e->data = NULL;
  [Current thread is 1 (LWP 5274)]
  (gdb) p e
  $1 = (struct spa_poll_event *) 0x7f845e297820
  (gdb) bt
  #0  0x00007f846b025be2 in detach_source (source=0x7f845f435f60) at ../spa/plugins/support/loop.c:144
  #1  0x00007f846b0276ad in free_source (s=0x7f845f435f60) at ../spa/plugins/support/loop.c:359
  #2  0x00007f846b02a453 in loop_destroy_source (object=0x7f845f3af478, source=0x7f845f435f60) at ../spa/plugins/support/loop.c:786
  #3  0x00007f846b02a886 in impl_clear (handle=0x7f845f3af478) at ../spa/plugins/support/loop.c:859
  #4  0x00007f846b172f40 in unref_handle (handle=0x7f845f3af450) at ../src/pipewire/pipewire.c:211
  #5  0x00007f846b173579 in pw_unload_spa_handle (handle=0x7f845f3af478) at ../src/pipewire/pipewire.c:346
  #6  0x00007f846b15a761 in pw_loop_destroy (loop=0x7f845f434e30) at ../src/pipewire/loop.c:159
  #7  0x00007f846b135d8e in pw_data_loop_destroy (loop=0x7f845f434cb0) at ../src/pipewire/data-loop.c:166
  #8  0x00007f846b12c31c in pw_context_destroy (context=0x7f845f41c690) at ../src/pipewire/context.c:485
  #9  0x00007f846b3ddf9e in jack_client_close (client=0x7f845f3c1030) at ../pipewire-jack/src/pipewire-jack.c:3481
  ...
@tivp
Copy link

tivp commented Jun 23, 2022

I have a LENOVO Ideapad 330.
Install pavucontrol and run it. After running it you go to the input devices tab and select lock and go to ports. After you change the port from "Internal microphone" to "Headset microphone (disconnected)" you have to go to lower the left front 80% because if you lower it to the base you hear a loss.

Sorry my English is translator.

Here are the commands I used:

sudo apt install pavucontrol
pavucontrol

@ASSahasranamam
Copy link

@tivp I tried to do what you said but didn't work. Can you please post a screenshot of your final settings on pavucontrol ?

Thanks

I have a LENOVO Ideapad 330. Install pavucontrol and run it. After running it you go to the input devices tab and select lock and go to ports. After you change the port from "Internal microphone" to "Headset microphone (disconnected)" you have to go to lower the left front 80% because if you lower it to the base you hear a loss.

Sorry my English is translator.

Here are the commands I used:

sudo apt install pavucontrol
pavucontrol

@tivp
Copy link

tivp commented Jun 24, 2022

Yes, of course @ASSahasranamam.
The method mentioned above I consider obsolete. Here I bring you a new method.

MOD to fix internal microphone

Step 1 - Install QasMixer
It has a graphical interface that facilitates the manipulation of AlsaMixer.

This is the command for the installation:

sudo apt install qasmixer

Step 2 - Run QasMixer

This is the command to execute it:

qasmixer
Captura desde 2022-06-24 02-39-14

Step 3 - Select in the box ""Mixer device" -> hw"
Captura desde 2022-06-24 02-39-51

Step 4 - Press the [R] key and set all settings of the mixer as shown in the following picture
Captura desde 2022-06-24 03-07-56

Step 5 - Select "Capture" and press the [S] key
Captura desde 2022-06-24 03-12-21
Captura desde 2022-06-24 03-13-54

Step 6 - Configure the panels as best suits your hearing
The rule is: L and R panels should not be at the same dB level.
I chose 18.75 dB and 21.75 dB since for me that configuration sounds better.

TIPS: You can test the microphone on Discord or somewhere where you can listen to it live.

Captura desde 2022-06-24 03-15-35

Step 7 - Store the AlsaMixer configuration

This is the command:

alsactl --file ~/.config/asound.state store

Step 8 - The creation of a .desktop for the autostart restore command

This is the command to create the .desktop:

nano ~/.config/autostart/alsarestore.desktop

The contents of the .desktop file should be the following:

[Desktop Entry]
Type=Application
Terminal=true
Name=alsarestore
Exec=bash -c "sleep 10 && alsactl --file ~/.config/asound.state restore"

Step 9 - Turn off or restart the computer to see that our configuration still remains.
If everything goes as described. CONGRATULATIONS! you have got your internal microphone working.
Captura desde 2022-06-24 03-43-03

TIPS: You can see in the sound settings that the microphone is low if you have followed my settings. This happens because it gets louder when you modify the dB of "Internal Mic Boost". I do not recommend turning this panel up as in my case it sounds saturated.
Captura desde 2022-06-24 03-46-19

@brenobaptista
Copy link

brenobaptista commented Jul 1, 2022

THANK YOU, @tivp! I've been spending a huge amount of time trying to fix my internal microphone, now it finally works. I would just set Terminal=false in the alsarestore.desktop file to remove the annoying terminal popping up every restart.

mmstick pushed a commit that referenced this issue Jul 1, 2022
`client::name` points to a string that is owned by `client::props`,
so when the property list is updated, it needs to be refreshed as well.
Otherwise, various use-after-frees can be triggered, for example:

==1471586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200007e7d0 at pc 0x7f14390755d0 bp 0x7ffe23edee30 sp 0x7ffe23ede5a8
READ of size 3 at 0x60200007e7d0 thread T0
    #0 0x7f14390755cf in printf_common /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:553
    #1 0x7f1439077215 in __interceptor_vsnprintf /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1665
    #2 0x7f1434ead47d in spa_vscnprintf ../spa/include/spa/utils/string.h:239
    #3 0x7f1434eae2ae in impl_log_logtv ../spa/plugins/support/logger.c:138
    #4 0x7f14385cacc7 in pw_log_logt ../src/pipewire/log.c:135
    #5 0x7f1433aef8e9 in do_set_profile ../src/modules/module-protocol-pulse/pulse-server.c:4656
    #6 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #7 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #8 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #9 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #10 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #11 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #12 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #13 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)
    #14 0x7f1437429349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #15 0x55b065d722a4 in _start (./src/daemon/pipewire-pulse+0x42a4)

0x60200007e7d0 is located 0 bytes inside of 16-byte region [0x60200007e7d0,0x60200007e7e0)
freed by thread T0 here:
    #0 0x7f14390be672 in __interceptor_free /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7f14386a775a in do_replace ../src/pipewire/properties.c:414
    #2 0x7f14386a785e in pw_properties_set ../src/pipewire/properties.c:441
    #3 0x7f14386a658b in pw_properties_update ../src/pipewire/properties.c:309
    #4 0x7f1433adb055 in do_update_proplist ../src/modules/module-protocol-pulse/pulse-server.c:3246
    #5 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #6 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #7 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #8 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #9 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #10 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #11 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #12 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)

previously allocated by thread T0 here:
    #0 0x7f1439072faa in __interceptor_strdup /usr/src/debug/gcc/libsanitizer/asan/asan_interceptors.cpp:439
    #1 0x7f14386a6fe2 in do_replace ../src/pipewire/properties.c:394
    #2 0x7f14386a785e in pw_properties_set ../src/pipewire/properties.c:441
    #3 0x7f1433a6c52d in read_props ../src/modules/module-protocol-pulse/message.c:147
    #4 0x7f1433a6f467 in message_get ../src/modules/module-protocol-pulse/message.c:359
    #5 0x7f1433ab3191 in do_set_client_name ../src/modules/module-protocol-pulse/pulse-server.c:1030
    #6 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #7 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #8 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #9 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #10 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #11 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #12 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #13 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)
@naveen433
Copy link

@tivp quasmixer is also not work me. I am using Lenovo yoga slim7 audio card is Realtek alc-287. any another solution. I had spend lot of time still I didn't find the solution.

mmstick pushed a commit that referenced this issue Dec 30, 2022
It is not enough for `buffer` to be alive in its current
scope because when execution enters that branch, `format`
will be set to `fmt`, which points inside `buffer`. And
since `format` is used outside that scope, `buffer` must
live longer.

This was detected by ASAN when Audacity was starting up.

  ==25007==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffdbcfef560 at pc 0x7fe44ca95db3 bp 0x7ffdbcfeeda0 sp 0x7ffdbcfeed90
  READ of size 4 at 0x7ffdbcfef560 thread T0
      #0 0x7fe44ca95db2 in spa_pod_parser_pod ../spa/include/spa/pod/parser.h:67
      #1 0x7fe44ca9a805 in spa_format_parse ../spa/include/spa/param/format-utils.h:44
      #2 0x7fe44cad293a in port_set_format ../spa/plugins/audioconvert/audioconvert.c:1934
      #3 0x7fe44cadad14 in impl_node_port_set_param ../spa/plugins/audioconvert/audioconvert.c:2038
      #4 0x7fe44ca587e2 in configure_format ../spa/plugins/audioconvert/audioadapter.c:509
      #5 0x7fe44ca60dff in negotiate_format ../spa/plugins/audioconvert/audioadapter.c:822
      #6 0x7fe44ca62bbf in impl_node_send_command ../spa/plugins/audioconvert/audioadapter.c:846
      #7 0x7fe45ea1c2f1 in node_update_state ../src/pipewire/impl-node.c:407
      #8 0x7fe45ea5137e in pw_impl_node_set_state ../src/pipewire/impl-node.c:2251
      #9 0x7fe45eb3355f in pw_work_queue_destroy ../src/pipewire/work-queue.c:142
      #10 0x7fe45b2cd6f4 in source_event_func ../spa/plugins/support/loop.c:615
      #11 0x7fe45b2c634f in loop_iterate ../spa/plugins/support/loop.c:452
      #12 0x7fe45e9ebebc in spa_hook_list_clean ../spa/include/spa/utils/hook.h:395
      #13 0x5561e03dc722 in main ../src/daemon/pipewire.c:131
      #14 0x7fe45da3c28f  (/usr/lib/libc.so.6+0x2328f)
      #15 0x7fe45da3c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
      #16 0x5561e03db2a4 in _start ../sysdeps/x86_64/start.S:115

  Address 0x7ffdbcfef560 is located in stack of thread T0 at offset 160 in frame
      #0 0x7fe44ca56fa9 in configure_format ../spa/plugins/audioconvert/audioadapter.c:475

    This frame has 4 object(s):
      [32, 36) 'state' (line 493)
      [48, 56) 'fmt' (line 494)
      [80, 128) 'b' (line 492)
      [160, 4256) 'buffer' (line 491) <== Memory access at offset 160 is inside this variable
@ilseroster
Copy link

Microphone not working here too - after upgrading to Pop-OS 22.04. I have tried all of the above, numerous time, but to no avail...

@OmarMahmoud10
Copy link

@vargastomas I did all the steps and the mic is working but when I restart it doesn't restore the settings
I don't know why, please if you can help me with this issue

@tivp
Copy link

tivp commented May 23, 2023

Of course @OmarMahmoud10.

The procedure is as follows:

Step 1 - Install ExifTool.
ExifTool, allows us to see the date of last modification and see if the file was updated by reading the metadata.

Here is the command to install it:

sudo apt install libimage-exiftool-perl

Step 2 - Run ExifTool over "asound.state" file.

This is the command to run it:

exiftool ~/.config/asound.state

Step 3 - Store AlsaMixer settings

This is the command:

alsactl --file ~/.config/asound.state store

Step 4 - Run ExifTool over "asound.state" file again
We will analyze if there was a change in file "asound.state"

This is the command:

exiftool ~/.config/asound.state

You compare if there was a change in the modification date in the metadata of the "asound.state" file.

NOTE: If you notice as in the following example that the file was modified you can proceed to the next step. If this is not the case you run sudo alsactl --file ~/.config/asound.state store and try this step again.
image

Step 5 - The creation of a .desktop for the autostart restore command

This is the command to create the .desktop:

gedit ~/.config/autostart/alsarestore.desktop

If the file cannot be saved you perform the following command:
mkdir ~/.config/autostart/

The contents of the .desktop file should be the following:

[Desktop Entry]
Type=Application
Terminal=false
Name=alsarestore
Exec=bash -c "sleep 10 && alsactl --file ~/.config/asound.state restore"

Alternative Step 5 - Create a startup task in the Gnome interface.

This is the command to run the Gnome application "applications at startup":

gnome-session-properties

NOTE: You can use this interface to see if step 5 above was successful by viewing your configuration.
image

Select add and type the command text box bash -c command area "sleep 10 && alsactl --file ~/.config/asound.state restore"

NOTE: In the name text box you are free to put whatever you want. In my case I name it as alsarestore

Here's what the "Edit Startup Program" setting should look like.
image
Select save once we have everything configured.

Then try restarting the computer. If your microphone is working properly as it did the last time you set it up, it is something to celebrate. Congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants