<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fox</title>
    <description>The latest articles on DEV Community by Fox (@foxes).</description>
    <link>https://dev.to/foxes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3703231%2Ff0cbe965-67cb-4954-9490-36b8637bc04b.png</url>
      <title>DEV Community: Fox</title>
      <link>https://dev.to/foxes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/foxes"/>
    <language>en</language>
    <item>
      <title>How to fix inconsistent Play-Pause behaviour with Bluetooth Headsets on Linux</title>
      <dc:creator>Fox</dc:creator>
      <pubDate>Sun, 15 Feb 2026 20:25:23 +0000</pubDate>
      <link>https://dev.to/foxes/how-to-fix-inconsistent-play-pause-behaviour-with-bluetooth-headsets-on-linux-1oa8</link>
      <guid>https://dev.to/foxes/how-to-fix-inconsistent-play-pause-behaviour-with-bluetooth-headsets-on-linux-1oa8</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Some Bluetooth headsets (or from my limited experience, all of them) handle Play-Pause behaviour internally instead of relying on the OS to tell whether media is playing or not. This can easily lead to a de-sync between the host and the device, where the device will either end up constantly trying to Play while media is playing, or Pause while media is paused.&lt;/p&gt;

&lt;p&gt;This can be verified by running &lt;code&gt;xev&lt;/code&gt; (sorry Wayland users, get gud :p) with and without media playing, then seeing if eventually the wrong signals are sent (&lt;code&gt;XF86AudioPlay&lt;/code&gt; when the device is supposed to pause or &lt;code&gt;XF86AudioPause&lt;/code&gt; when it's supposed to play).&lt;/p&gt;

&lt;p&gt;It is worth mentioning that this issue does not occur on Android, I wasn't able to manually verify the reason myself as it was too complex for me to look into, but investigating with Google Gemini reveals that Android has a way to communicate with Bluetooth devices to sync playback state.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;The solution is to redirect both &lt;code&gt;XF86AudioPause&lt;/code&gt; &amp;amp; &lt;code&gt;XF86AudioPlay&lt;/code&gt; to &lt;code&gt;XF86AudioPlayPause&lt;/code&gt;, bypassing the whole internal state issue, this is most easily done through your Desktop Environment's shortcut settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup in KDE Plasma:
&lt;/h3&gt;

&lt;p&gt;Go to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;System Settings&lt;/li&gt;
&lt;li&gt;Keyboard&lt;/li&gt;
&lt;li&gt;Shortcuts&lt;/li&gt;
&lt;li&gt;Media Controller&lt;/li&gt;
&lt;li&gt;Disable shortcuts for "Pause media playback" &amp;amp; "Play media playback"&lt;/li&gt;
&lt;li&gt;Set the following two keys for the "Play/Pause media playback" shortcut (you might need to manually play or pause media, or even reconnect the device, to get the right key to fire when you press on your device):

&lt;ul&gt;
&lt;li&gt;"Media Play" (This one is the default shortcut, so you can just enable it using the check mark)&lt;/li&gt;
&lt;li&gt;"Media Pause"&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Some programs might not respond to the shortcuts correctly until they're relaunched.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>bluetooth</category>
      <category>linux</category>
      <category>headphones</category>
      <category>multimedia</category>
    </item>
    <item>
      <title>How to get virtual display outputs on Linux without using a dummy plug</title>
      <dc:creator>Fox</dc:creator>
      <pubDate>Fri, 09 Jan 2026 21:53:22 +0000</pubDate>
      <link>https://dev.to/foxes/how-to-get-virtual-display-outputs-on-linux-without-using-a-dummy-plug-50d3</link>
      <guid>https://dev.to/foxes/how-to-get-virtual-display-outputs-on-linux-without-using-a-dummy-plug-50d3</guid>
      <description>&lt;p&gt;This guide is mainly for Xorg, on Wayland there are easier way of achieving this, for example KDE's virtual monitor implementation in Krfb: &lt;a href="https://tldr.inbrowser.app/pages/linux/krfb-virtualmonitor" rel="noopener noreferrer"&gt;krfb-virtualmonitor | tldr InBrowser.App&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A useful way to troubleshoot while working on this is to use OBS Studio to take a peek at the virtual output by adding a new source screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method #1: Sacrificing one of your existing outputs
&lt;/h2&gt;

&lt;p&gt;Use Xrandr to check for free outputs on your system.&lt;/p&gt;

&lt;p&gt;Follow &lt;a href="https://www.azdanov.dev/articles/2025/how-to-create-a-virtual-display-for-sunshine-on-arch-linux" rel="noopener noreferrer"&gt;How to Create a Virtual Display for Sunshine on Arch Linux - Anton Ždanov&lt;/a&gt; and stop before the Sunshine section:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regarding EDID files, you can add modes later using xrandr, so you don't need to choose one that matches your desired specifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Step 1: Get an EDID File
&lt;/h3&gt;

&lt;p&gt;An EDID (Extended Display Identification Data) file simulates a monitor. You can download pre-made EDID files from the &lt;a href="https://git.linuxtv.org/v4l-utils.git/tree/utils/edid-decode/data" rel="noopener noreferrer"&gt;v4l-utils repository&lt;/a&gt;. Choose one that matches your desired resolution and features (e.g., 4K, HDR).&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Place the EDID File
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a directory for EDID files:&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /usr/lib/firmware/edid
&lt;/code&gt;&lt;/pre&gt;


&lt;ol&gt;
&lt;li&gt;Copy your chosen EDID file to this directory. For example:&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo cp &lt;/span&gt;samsung-q800t-hdmi2.1 /usr/lib/firmware/edid/
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;
  
  
  Step 3: Configure Kernel Parameters
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Identify your GPU's free HDMI or DP output:&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;p &lt;span class="k"&gt;in&lt;/span&gt; /sys/class/drm/&lt;span class="k"&gt;*&lt;/span&gt;/status&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;&lt;span class="nv"&gt;con&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;p&lt;/span&gt;&lt;span class="p"&gt;%/status&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;con&lt;/span&gt;&lt;span class="p"&gt;#*/card?-&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: "&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Replace &lt;code&gt;HDMI-A-1&lt;/code&gt; in the next step with the appropriate output.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add the following kernel parameters (see &lt;a href="https://wiki.archlinux.org/title/Kernel_parameters" rel="noopener noreferrer"&gt;arch wiki&lt;/a&gt; or &lt;a href="https://discovery.endeavouros.com/installation/systemd-boot/2022/12/" rel="noopener noreferrer"&gt;endeavour os discovery&lt;/a&gt;):&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;drm&lt;/span&gt;.&lt;span class="n"&gt;edid_firmware&lt;/span&gt;=&lt;span class="n"&gt;HDMI&lt;/span&gt;-&lt;span class="n"&gt;A&lt;/span&gt;-&lt;span class="m"&gt;1&lt;/span&gt;:&lt;span class="n"&gt;edid&lt;/span&gt;/&lt;span class="n"&gt;samsung&lt;/span&gt;-&lt;span class="n"&gt;q800t&lt;/span&gt;-&lt;span class="n"&gt;hdmi2&lt;/span&gt;.&lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="n"&gt;video&lt;/span&gt;=&lt;span class="n"&gt;HDMI&lt;/span&gt;-&lt;span class="n"&gt;A&lt;/span&gt;-&lt;span class="m"&gt;1&lt;/span&gt;:&lt;span class="n"&gt;e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;ol&gt;
&lt;li&gt;Update your mkinitcpio.conf file to include the EDID file:&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;FILES&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;/usr/lib/firmware/edid/samsung-q800t-hdmi2.1&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;ol&gt;
&lt;li&gt;Regenerate the initramfs:&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mkinitcpio &lt;span class="nt"&gt;-P&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;ol&gt;
&lt;li&gt;Reboot your system.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;You might afterwards need to enable the display in your Display Settings before it starts working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method #2: Abusing the EVDI Linux driver &lt;em&gt;before&lt;/em&gt; adding the output in kernel parameters
&lt;/h2&gt;

&lt;p&gt;From &lt;a href="https://github.com/DisplayLink/evdi" rel="noopener noreferrer"&gt;DisplayLink/evdi: Extensible Virtual Display Interface&lt;/a&gt; on Github:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Extensible Virtual Display Interface (EVDI) is a Linux® kernel module that enables management of multiple screens, allowing user-space programs to take control over what happens with the image. It is essentially a virtual display you can add, remove and receive screen updates for, in an application that uses the &lt;code&gt;libevdi&lt;/code&gt; library.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;This driver is usually used for DisplayLink devices, which are basically external USB graphics cards used to obtain more display outputs from a system than it physically has, it even works for Macbooks. The cost being the software requirement and additional CPU overhead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;a href="https://wiki.archlinux.org/title/Extreme_Multihead#Using_a_virtual_output" rel="noopener noreferrer"&gt;Using the EVDI driver - Extreme Multihead - ArchWiki&lt;/a&gt;, it is suggested that this driver can be (ab)used to create virtual outputs without a DisplayLink dock. You will lose out on GPU acceleration that way, but the result is still usable for general tasks. The ArchWiki links to &lt;a href="https://unix.stackexchange.com/questions/585069/unable-to-add-a-virtual-display-to-xorg" rel="noopener noreferrer"&gt;nvidia - Unable to add a VIRTUAL display to Xorg - Unix &amp;amp; Linux Stack Exchange&lt;/a&gt;, but the &lt;a href="https://etam-software.eu/blog/2021-01-09-virtual-screen.html" rel="noopener noreferrer"&gt;Etam Software - Virtual screen&lt;/a&gt; guide is clearer and lets you know that the current Xorg session will freeze during initial configuration. Although I've had luck deploying this solution for a long time on my machine, an update to EVDI suddenly now results in an unusable black screen, even tho this was supposedly patched in &lt;a href="https://github.com/DisplayLink/evdi/issues/523" rel="noopener noreferrer"&gt;Monitor blank but detected as connected · Issue #523 · DisplayLink/evdi&lt;/a&gt;, I was never able to get it working again just using EVDI.&lt;/p&gt;

&lt;p&gt;Either way, the pure EVDI solution is less elegant the solution presented here, as it does not play nicely with Desktop Environment screen management (eg. having to disable the Screen Management background service KScreen2 in KDE Plasma using the Background Services GUI Program, rendering the Display Configuration page in KDE System Settings unusable.)&lt;/p&gt;

&lt;p&gt;From &lt;a href="https://etam-software.eu/blog/2021-01-09-virtual-screen.html" rel="noopener noreferrer"&gt;Etam Software - Virtual screen&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For Arch Linux the EVDI module is available in the AUR&lt;/li&gt;
&lt;li&gt;You can get more than one extra output this way by changing the number for &lt;code&gt;initial_device_count&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Install evdi kernel module
&lt;/h3&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/DisplayLink/evdi.git
&lt;span class="nb"&gt;cd &lt;/span&gt;evdi/module

make &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;span class="c"&gt;# or&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;make install_dkms
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;
  
  
  Add &lt;code&gt;evdi&lt;/code&gt; to &lt;code&gt;/etc/modules-load.d/local.conf&lt;/code&gt;.
&lt;/h3&gt;
&lt;h3&gt;
  
  
  Add &lt;code&gt;options evdi initial_device_count=1&lt;/code&gt; to &lt;code&gt;/etc/modprobe.d/local.conf&lt;/code&gt;.
&lt;/h3&gt;

&lt;p&gt;WARNING! This next step will freeze your Xorg, so you might want to reboot instead or be clever about killing your Xorg or something.&lt;/p&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;modprobe evdi
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;After rebooting there should be new DVI outputs present in Xrandr&lt;/p&gt;

&lt;p&gt;You will probably see that your new outputs don't have any modes listed in Xrandr, you should add those manually.&lt;/p&gt;

&lt;p&gt;Now that you have extra outputs, you are able to use them to follow the steps in &lt;strong&gt;Method #1&lt;/strong&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Using your newly obtained virtual outputs
&lt;/h2&gt;

&lt;p&gt;It is straightforward now to use VNC or other screen sharing solutions to get your virtual outputs on your desired devices, remember that by default VNC traffic is unencrypted.&lt;/p&gt;

&lt;p&gt;If you're planning on using and Android device, consider using adb reversing for better latency and easier connection without having to set up the target IP:&lt;/p&gt;

&lt;p&gt;From &lt;a href="https://etam-software.eu/blog/2021-01-09-virtual-screen.html" rel="noopener noreferrer"&gt;Etam Software - Virtual screen&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;4) (optional) Attach Android device through USB cable&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adb reverse tcp:5900 tcp:5900
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Now you can point your VNC client application like &lt;a href="https://f-droid.org/packages/com.coboltforge.dontmind.multivnc/" rel="noopener noreferrer"&gt;MultiVNC&lt;/a&gt; to localhost:5900.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>linux</category>
      <category>archlinux</category>
    </item>
  </channel>
</rss>
