Sound not working anymore after unplugging HDMI cable

I recently experienced a weird behaviour of the sound system on my laptop.

I connect my laptop via HDMI on a TV and choose to use the sound system of the TV in Parameters > Sound. Then I unplug the HDMI cable and I am unable to listen to anything on my computer.

To get the sound back on the laptop I have to connect my laptop the TV again and choose to use the internal sound system. And then only unplug the computer.

Is there a way to switch to the internal sound system without having to perform the previous procedure ?

Cannot create/destroy Azure VMs anymore (OSProvisioningInternalError)

I’m using Jenkins to run my terraform scripts. It worked fine for a few days, but after destroying & (re-)creating my VM multiple times, it does not work anymore. On Creation, I get:

* Code="OSProvisioningInternalError" Message="OS Provisioning failed for VM 'e2r2s08ibld0001' due to an internal error." 

Deletion also doesn’t work:

* Error deleting Network Interface "e2r2s08ibld0001-nic" (Resource Group "Buildslaves_rg"): network.InterfacesClient#Delete: Failure sending request: StatusCode=400 -- Original Error: Code="NicInUse" Message="Network Interface /subscriptions/****/resourceGroups/Buildslaves_rg/providers/Microsoft.Network/networkInterfaces/e2r2s08ibld0001-nic is used by existing resource /subscriptions/****/resourceGroups/Buildslaves_rg/providers/Microsoft.Compute/virtualMachines/e2r2s08ibld0001. In order to delete the network interface, it must be dissociated from the resource. To learn more, see" Details=[] 

OK it says “nic in use” but I expected terraform to delete all resource in the correct order? I can successfully delete my resources using the Azure Portel.

But then, again I get the same error when I try to (re-)create the VM via terraform.

I also tried to delete my tfstate file, but the error stays the same.

Here is the relevant part of my

resource "azurerm_network_interface" "windows" {   name                          = "$  {var.vm_windows["name"]}-nic"   location                      = "$  {azurerm_resource_group.main.location}"   resource_group_name           = "$  {}" #  network_security_group_id     = "$  {}"   tags                          = "$  {var.tags}"   enable_accelerated_networking = true    ip_configuration {     name                          = "ipconfig1"     subnet_id                     = "$  {}"     private_ip_address_allocation = "Dynamic" #    private_ip_address            = "$  {var.vm_windows["private_ip_address"]}"   } }  resource "azurerm_virtual_machine" "windows" {   name                  = "$  {var.vm_windows["name"]}"   location              = "$  {azurerm_resource_group.main.location}"   resource_group_name   = "$  {}"   network_interface_ids = ["$  {}"]   vm_size               = "$  {var.vm_windows["size"]}"   tags     = "$  {var.tags}"    # This means the OS Disk will be deleted when Terraform destroys the Virtual Machine   # NOTE: This may not be optimal in all cases.   delete_os_disk_on_termination = true   delete_data_disks_on_termination = true    storage_image_reference {     publisher = "MicrosoftWindowsServer"     offer     = "WindowsServer"     sku       = "2019-Datacenter"     version   = "latest"   }    storage_os_disk {     name              = "$  {var.vm_windows["name"]}-os"     caching           = "ReadWrite"     create_option     = "FromImage"     managed_disk_type = "$  {var.vm_windows["disk_os_type"]}"   }    storage_data_disk {     name              = "$  {var.vm_windows["name"]}-data"     caching           = "ReadOnly"     create_option     = "Empty"     disk_size_gb      = "$  {var.vm_windows["disk_data_size"]}"     lun               = 0     managed_disk_type = "$  {var.vm_windows["disk_data_type"]}"   }    os_profile {     computer_name  = "$  {var.vm_windows["name"]}"     admin_username = "$  {var.vm_admin_username}"     admin_password = "$  {var.vm_admin_password}" #    custom_data    = "$  {local.custom_data_content}"   }    os_profile_windows_config {     provision_vm_agent        = true     enable_automatic_upgrades = true      # Auto-Login's required to configure WinRM     additional_unattend_config {       pass         = "oobeSystem"       component    = "Microsoft-Windows-Shell-Setup"       setting_name = "AutoLogon"       content      = "<AutoLogon><Password><Value>$  {var.vm_admin_password}</Value></Password><Enabled>true</Enabled><LogonCount>1</LogonCount><Username>$  {var.vm_admin_username}</Username></AutoLogon>"     }      # See     additional_unattend_config {       pass         = "oobeSystem"       component    = "Microsoft-Windows-Shell-Setup"       setting_name = "FirstLogonCommands"       content      = "$  {file("./files/FirstLogonCommands.xml")}"     }   } } 

Thread-safe “singleton” that destroys object when not used anymore

I’m working on some legacy code which uses the singleton pattern. The problem I have with the traditional singleton is that the instance lives until the program terminates. This is messing up the order in which things need to get destroyed and makes it difficult to write independent unit tests. Unfortunately, I can’t get rid of the singleton by constructing a single instance and passing it around since this would break APIs.

I wrote the following wrapper around a class T that hands out shared pointers to a single instance of T. When the last shared pointer goes out of scope the object gets destroyed.

#include <memory> #include <type_traits> #include <mutex>  template <class T> class refCountedSingleton {   static_assert(!std::is_default_constructible<T>::value, "T must have a private/protected constructor to ensure it can only be constructed by epics::refCountedSingleton");   static_assert(!std::is_copy_constructible<T>::value, "T must have a private/protected copy constructor to ensure instances handed out by epics::refCountedSingleton cannot be copied");   static_assert(!std::is_copy_assignable<T>::value, "T must have a private/protected copy assignment operator to ensure instances handed out by epics::refCountedSingleton cannot be copied");   static std::weak_ptr<T> p;   static std::mutex mu; public:   static std::shared_ptr<T> getShared(); };  template <class T> std::weak_ptr<T> refCountedSingleton<T>::p; template <class T> std::mutex refCountedSingleton<T>::mu;  template <class T> std::shared_ptr<T> refCountedSingleton<T>::getShared() {     std::lock_guard<std::mutex> lock(mu);     std::shared_ptr<T> temp = p.lock();     if (!temp) {       temp.reset(new T());       p = temp;     }   return temp; } 

The following class could be used as T:

class obj { private:   obj() {}   obj(obj const&);   obj& operator=(obj const&); }; 

Example use case:

{   std::shared_ptr<obj> pm1 = refCountedSingleton<obj>::getShared();   {     // calling getShared() multiple times yields pointers to the same object     std::shared_ptr<obj> pm2 = refCountedSingleton<obj>::getShared();   } } // instance of obj gets destroyed here {    // a new instance of obj gets greated    std::shared_ptr<obj> pm3 = refCountedSingleton<obj>::getShared(); } 

My singleton needs to be thread safe which is why I’m locking the mutex in getShared(). With the traditional singleton pattern performance can be improved by avoiding the expensive locking most of the time by leveraging double-checked locking. I’m wondering if something similar could be done here as well.

After updating bind from 9.8 to 9.12, it does not start anymore with dnssec-validation auto

I used bind 9.8 on gentoo for monthes. After updating the system, bind is now at 9.12.3_p4 but it does not start anymore unless I comment dnssec-validation auto.

I get nothing in named.log.

I get this in message.log :

Jun 27 17:08:16 ns3079610 named[29268]: obtaining root key for view _default from '/etc/bind/bind.keys'     Jun 27 17:08:16 ns3079610 named[29268]: obtaining root key for view _default from '/etc/bind/bind.keys'     Jun 27 17:08:16 ns3079610 named[29268]: /etc/bind/bind.keys:28: ignoring managed key for '.': no crypto support     Jun 27 17:08:16 ns3079610 named[29268]: root key not loaded     Jun 27 17:08:16 ns3079610 named[29268]: loading configuration: failure     Jun 27 17:08:16 ns3079610 named[29268]: exiting (due to fatal error)     Jun 27 17:08:16 ns3079610 /etc/init.d/named[29266]: start-stop-daemon: failed to start `/usr/sbin/named'     Jun 27 17:08:16 ns3079610 /etc/init.d/named[29242]: ERROR: named failed to start 

Thanks for any help.

CoreResultsWebPart not working anymore in 2019

I am currently working on a migrated 2019-farm. Migration was 2010->2013->2016->2019 in one flow.

Now, I find the old CoreResultsWebPart not showing any results at all. Search is working fine and if I remove the CoreResultsWebPart and replace by using the new ResultScriptWebPart results are displayed.

Is it possible that the old CoreResultsWebPart is not working at all in 2019?

I can’t find my .nomedia folder or the folder it is in anymore, but the files still seem to be there

So i recently followed the advice posted here: How do I keep audiobook separate from Google Music? by @Tzunki in order to keep my audiobooks out of Google Play Music. I made a .Audiobooks folder and put them all in there and then added a .nomedia folder for good measure. It worked great, but now I’m trying to delete out an old audiobook and add a new one, and i can’t find the folder or any of the audiobooks.
I’ve tried searching for the files and the folder names, etc, but it looks like they are all hidden somehow and i can’t find any of them in order to edit them. I went back to my audiobook player to make sure they are still there and played them and they play. I checked the rood folder for the files in my audiobook player and it shows /storage/emulated/0/.audiobooks (which is not where i told it to look when i created the .Audiobooks folder) but i looked there and there is some data file instead of the audiobooks, so i’m thinking it is just like a bookmark so it knows where in the audiobook i left off?
anyways, any help you can offer would be great, thanks.

*edit with a little more info: I’ve tried to just type in Computer\Galaxy S6\Phone.Audiobooks, but it says Windows cant find it. Also, i thought i might try to re-create it, and see if it repopulated with my files but when I try to change the name of my New Folder to .Audiobooks it won’t change. Just reverts back to New Folder.

Can’t get search results on Google anymore

Since this morning, it appears that I can’t get any search results anymore when I am logged in myaccount. If search anything, all I will get is “did not match any results”. The only thing I eventually get is when my search query matches some Google Places (shops, business, …).

I am using Google Search in a traditional way, not programatically. All the other Google services I am using work fine: calendar, mail, keep, maps, …

When I log out, everything works fine too. I did a security check on my account and nothing particular showed up. I am pretty stuck here, any clues on how to solve this would be appreciated, thanks !

Cannot add content anymore

As the title says, i cannot add content from the FileBrowser (a dir_listing) module anymore. My error.log gives me the following message:

[php7:notice] [pid 5640:tid 1816] [client] Uncaught PHP Exception Drupal\Core\Entity\EntityStorageException: “The “” plugin does not exist. Valid plugin IDs for Drupal\activity_creator\Plugin\ActivityContextManager are: community_activity_context, content_in_my_group_activity_context, group_activity_context, group_content_in_my_group_activity_context, organizer_activity_context, owner_activity_context, profile_activity_context, follow_content_activity_context, vote_activity_context, mention_activity_context, private_message_activity_context” at D:\xampp\htdocs\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php line 847, referer:

What do i have to change in order to make it work again?

USB port not functionning anymore on Samsung Galaxy Tab S3i

After installing software for an endoscope USB device, my USB port stopped functionning (no more tethering, no battery charging from adapter, tablet icon doesn’t appear in Windows explorer). The software worked fine with device connected. Uninstalled it, but still can’t use the port. Is there a way to reinitialise the port? When the tablet is off and I plug it into the charger, I can see te circled animation for the battery, but no percentage is displayed.

ubuntu does not know my resolution anymore

My computer shut down by itself. After launching it again the display was flashing while booting, in ubuntu and in windows.

After some time and restarts, it is running properly, but ubuntu thinks my display has half of the resolution it really has. Any source i found for listing possible resolutions (hardinfo, xrandr -q) does not show the tru resolution. For example:

$ xrandr -q Screen 0: minimum 320 x 200, current 2880 x 1200, maximum 8192 x 8192 eDP-1 connected primary 960×540+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 960×540 59.82* 864×486 59.92 59.57
640×480 59.94
480×270 59.82
432×243 59.92 59.57
320×240 60.05

I have found some methods how to set the resolution to the correct one, even if not listed. But I don’t know, if its somehow broken and ubuntu runs it in a “safe mode”.

Thank you for any reply.