<div dir="ltr">I think I might understand this now.<div><br></div><div>It appears the initial load of module-udev-detect (in /etc/pulse/<a href="http://default.ps">default.ps</a>) fails to open the audio device because its busy (why I dont know - there is no sound).</div><div>So the attempt to create the remap sink in my ~/.config/pulse/<a href="http://default.pa">default.pa</a> fails because the default sink doesnt exist at that point.</div><div><br></div><div>Now Im guessing that the udev module is polling the audio devices every so often (because it handles eg usb devices)  and after a while (1-3 secs) the hardware audio device becomes available then it loads the device etc. and loads the profiles.</div><div>But of course this is past the point for running commands in <a href="http://default.pa">default.pa</a>.</div><div><br></div><div>This also means that when I run the remap command manually all the sinks exist so everything works.</div><div><br></div><div>So next question is how to run the remap command at this point.</div><div>Is the only option to add a udev command?</div><div><br></div><div>Is there any way to get the initial udev load to wait for the device to become free?</div><div><br></div><div>David</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 27, 2020 at 6:54 PM David Osguthorpe <<a href="mailto:david.osguthorpe@gmail.com">david.osguthorpe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="arial, sans-serif">PS Should say I havent attempted to change anything in the profiles  (ie anything in <br>





<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-size:13px">/usr/share/pulseaudio/alsa-mixer/profile-sets or /lib/udev/rules.d/</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-size:13px">90-pulseaudio.rules</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-size:13px">) </span>- its all default Ubuntu 20.04.</font></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 27, 2020 at 6:36 PM David Osguthorpe <<a href="mailto:david.osguthorpe@gmail.com" target="_blank">david.osguthorpe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="arial, sans-serif">If I stop the pulse daemon (<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-size:13px">systemctl --user mask pulseaudio.socket, </span>systemctl --user stop pulseaudio)</font><div><font face="arial, sans-serif">then start the daemon with pulseaudio -vvvvv or <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-size:13px">systemctl --user start pulseaudio </span>everything works, the remap device <span style="font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">remap-analog-surround-40 exists and is set as the default sink (no reboot).</span></font></div><div><span style="font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><font face="arial, sans-serif"><br></font></span></div><div><span style="font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><font face="arial, sans-serif">I have not tried explicitly using the commands via pacmd - Ill see what happens.</font></span></div><div><span style="font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><font face="arial, sans-serif"><br></font></span></div><div><span style="font-size:13px;font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><font face="arial, sans-serif">I have a feeling its something to do with profiles - but dont understand why the profiles seem to be activated after everything else and how to change this - well I dont understand profiles.</font></span></div>











</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 27, 2020 at 5:51 PM guest271314 <<a href="mailto:guest271314@gmail.com" target="_blank">guest271314@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">What happens when you run the commands at terminal without using or relying on <a href="http://default.pa" target="_blank">default.pa</a> or ~/.config/pulse?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 27, 2020 at 9:40 AM David Osguthorpe <<a href="mailto:david.osguthorpe@gmail.com" target="_blank">david.osguthorpe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>This is direct from the boot logs:</div><div><br></div><a href="http://default.pa" target="_blank">default.pa</a> file in ~/.config/pulse<div><br></div><div>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#!/usr/bin/pulseaudio -nF</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#<span> </span></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">.include /etc/pulse/<a href="http://default.pa" target="_blank">default.pa</a></span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">.fail</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">set-default-sink alsa_output.pci-0000_00_1f.3.analog-surround-40</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">load-module module-remap-sink sink_name=remap-analog-surround-40 master=alsa_output.pci-0000_00_1f.3.analog-surround-40<span>  </span>channels=4 channel_map=front-left,front-right,rear-left,rear-right master_channel_map=front-left,rear-left,front-right,rear-right remix=no</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:15px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">### Make some devices default</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#set-default-sink output</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">set-default-sink remap-analog-surround-40</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#set-default-source input</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">syslog portion where fails to load:</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Starting GLib main loop</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Loaded "module-filter-heuristics" (index: #21; argument: "").</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Loaded "module-filter-apply" (index: #22; argument: "").</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Master sink not found</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Failed to load module "module-remap-sink" (argument: "sink_name=remap-analog-surround-40 master=alsa_output.pci-0000_00_1f.3.analog-surround-40<span>  </span>channels=4 channel_map=front-left,front-right,rear-left,rear-right master_channel_map=front-left,rear-left,front-right,rear-right remix=no"): initialization failed.</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Sink alsa_output.pci-0000_00_1f.3.analog-surround-40 does not exist.</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Sink remap-analog-surround-40 does not exist.</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">












</p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Successfully connected to D-Bus session bus fd35a79135b7241371a4f2745fe88d2d as :1.8</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">syslog from same boot where analog-surround-40 is first mentioned:</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Looking at profile output:analog-surround-40</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Checking for playback on Analogue Surround 4.0 (analog-surround-40)</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Trying surround40:0 with SND_PCM_NO_AUTO_FORMAT ...</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Managed to open surround40:0</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Maximum hw buffer size is 92 ms</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Set buffer size first (to 4408 samples), period size second (to 1102 samples).</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Device surround40:0 doesn't support sample format s16le, changed to s32le.</span></p><p style="margin:0px;font:13px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Profile output:analog-surround-40 supported.</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">

















</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Removing path 'analog-output' as it is a subset of 'analog-output-speaker'.</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">analog-surround-40 is a valid setting for Sound output in the Settings dialog - and is set  as the default output device.</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div></div>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>