tag:blogger.com,1999:blog-1271184822487263806.post5260366413961701356..comments2016-07-26T02:46:46.201-04:00Comments on Pablo's Findings and Hacks: kmix: Automatically switch "Master Channel" between devicespablohttp://www.blogger.com/profile/06563992257833459378noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-1271184822487263806.post-29321130718218990322014-08-24T02:25:05.607-04:002014-08-24T02:25:05.607-04:00when i hit mute key on laptop it mutes MASTER, PCM...when i hit mute key on laptop it mutes MASTER, PCM, HEADPHONES. when i unmute with key it only unmutes MASTER i than have to go into mixer and manually unmute PCM and HEADPHONES. this is driving me insane, any idaeas?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-78190874269659054902013-07-01T10:24:19.475-04:002013-07-01T10:24:19.475-04:00Hi,
You&#39;re very welcome. I appreciate you ta...Hi,<br /><br />You&#39;re very welcome. I appreciate you taking the time to thank me. <br />pablohttps://www.blogger.com/profile/06563992257833459378noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-10719401208419675152013-07-01T10:11:58.738-04:002013-07-01T10:11:58.738-04:00Thanks a lot for the script, Pablo!Thanks a lot for the script, Pablo!pterionhttps://www.blogger.com/profile/16366635751789504736noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-44004992210573963072013-01-26T08:12:11.081-05:002013-01-26T08:12:11.081-05:00Thanks for your script! Unfortunately it was not w...Thanks for your script! Unfortunately it was not working with my Logitech Audio Bluetooth-Adapter because it can&#39;t be listed with $ fgrep &#39;[&#39; /proc/asound/cards <br /><br />My workaround so far:<br /><br /> pacmd list-cards | grep -B 1 blue 2&gt;&amp;1 &gt;/dev/null #check if any blue(tooth) device is connected<br /># pacmd list-cards | grep -B 1 bluez_card.C8_84_47_0D_03_9C 2&gt;&amp;1 &gt;/dev/null #or check for your specific device<br /> CARD_INSTALLED=$?<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-59717530259513365392012-11-30T14:56:01.055-05:002012-11-30T14:56:01.055-05:00Thanks, I&#39;ll check it out.Thanks, I&#39;ll check it out.JoeBaloneyhttps://www.blogger.com/profile/18021559023863878930noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-69799558198805465572012-11-29T10:28:40.596-05:002012-11-29T10:28:40.596-05:00Hi,
Thank you for writing. When I came back to U...Hi,<br /><br />Thank you for writing. When I came back to Unix/Linux, I looked at Gnome and KDE along with a few other Window Managers. For my tastes, KDE has worked best. It&#39;s not perfect but you can code around issues. Like this one. :)<br /><br />I even wrote a KDE User Base document for KWin Rules - http://userbase.kde.org/KWin_Rules<br /><br />You might want to have a read and see how you can tailor your windows based on rules. For example, I have thunderbird on Virtual Desktop 1, sized the way I like it, my RSS reader on 2, etc.<br /><br />Cheers,<br />-pabloPablo Sanchezhttps://www.blogger.com/profile/10758032596694021339noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-5651674475978797722012-11-29T10:13:45.085-05:002012-11-29T10:13:45.085-05:00Thanks for the script. I just switched to Arch and...Thanks for the script. I just switched to Arch and KDE, fed up with Unity/Gnome3 and sick of re-installing Ubuntu every 6 months and having outdated software in the meantime.<br /><br />I remember dealing with this issue in gnome years ago before it got fixed.<br />KDE is ahead of gnome in some areas and behind in others but its way better than the the what they have going now.JoeBaloneyhttps://www.blogger.com/profile/18021559023863878930noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-15632929385335006042012-08-09T05:25:56.727-04:002012-08-09T05:25:56.727-04:00Erhm, lol... -__-;
https://bugs.launchpad.net/ubun...Erhm, lol... -__-;<br />https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/812940Robertohttps://www.blogger.com/profile/08450570206401776039noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-37482859599216582852012-08-09T05:19:25.280-04:002012-08-09T05:19:25.280-04:00Very nice and useful, and also a good example of h...Very nice and useful, and also a good example of how to use this kind of stuff.<br />I tried to convert it to a dbus-send command, hoping it was a problem with qdbus... but it seems the problem is worse:<br /><br />dbus-send --dest=org.kde.kmix /Mixers org.kde.KMix.MixSet.setCurrentMaster string:&quot;ALSA::C-Media_USB_Headphone_Set:1&quot; string:&quot;Speaker:0&quot;<br /><br />testing it from console gives the same problem so I&#39;m wondering if without X11 we can only talk to system dbus services? From a security point of view I really don&#39;t like an xhost + (or even an xhost +127.0.0.1).Robertohttps://www.blogger.com/profile/08450570206401776039noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-59153283693258722752012-07-17T15:08:58.952-04:002012-07-17T15:08:58.952-04:00Yes, I also had to run &quot;xhost +&quot; and add...Yes, I also had to run &quot;xhost +&quot; and add &quot;su - username -c before the qdbus method so that it would be run by user rather than by udev.<br />Now it works. I just have to find out why is the udev rule being run multiple times.<br />Thanks for your support!andrisllnoreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-61549670531703317502012-07-15T21:40:06.343-04:002012-07-15T21:40:06.343-04:00Howdy,
I&#39;m sorry for the late response ... I ...Howdy,<br /><br />I&#39;m sorry for the late response ... I was on vacation. :) Try setting DISPLAY to :0.0<br /><br />For example, in bash/sh, it&#39;d be &quot;export DISPLAY :0.0&quot;<br /><br />btw, clever to use a udev rule. :)<br /><br />Cheers,<br />-pabloPablo Sanchezhttps://www.blogger.com/profile/10758032596694021339noreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-20380799924125722252012-07-09T12:54:56.639-04:002012-07-09T12:54:56.639-04:00Oh, and this is what&#39;s inside setmix.sh:
#!/bi...Oh, and this is what&#39;s inside setmix.sh:<br />#!/bin/sh<br />qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.setCurrentMaster &quot;ALSA::C-Media_USB_Headphone_Set:1&quot; &quot;Speaker:0&quot;andrisllnoreply@blogger.comtag:blogger.com,1999:blog-1271184822487263806.post-50207460511703456512012-07-09T12:51:26.331-04:002012-07-09T12:51:26.331-04:00Thank you for sharing the script!
This is the only...Thank you for sharing the script!<br />This is the only workaround I&#39;ve found so far.<br />But I was thinking if it wouldn&#39;t be possible to put the setCurrentMaster command in udev rule to run it when the preferred is being attached.<br />Here is my udev rule:<br />KERNEL==&quot;pcmC[D0-9cp]*&quot;, ACTION==&quot;add&quot;, PROGRAM=&quot;/bin/sh -c &#39;K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K &gt; /etc/asound.conf; echo defaults.pcm.card $$K &gt;&gt;/etc/asound.conf&quot;, RUN+=&quot;/home/blabla/setmix.sh&quot;<br />KERNEL==&quot;pcmC[D0-9cp]*&quot;, ACTION==&quot;remove&quot;, PROGRAM=&quot;/bin/sh -c &#39;echo defaults.ctl.card 0 &gt; /etc/asound.conf; echo defaults.pcm.card 0 &gt;&gt;/etc/asound.conf&#39;&quot;<br /><br />Unfortunately this doesn&#39;t work. The reason is this error:<br />Could not connect to D-Bus server: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11&#39;<br /><br />Do you know how to fix this (as I&#39;m not familiar with dbus)?<br />Udev rule would be a better solution than monitoring script, imho.andrisllnoreply@blogger.com