Simulate headphone disconnect & reconnect?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jessexknight
Level 1
Level 1
Posts: 6
Joined: Thu Sep 16, 2021 9:05 pm

Simulate headphone disconnect & reconnect?

Post by jessexknight »

I dual boot Linux Mint 20.1 & Windows 10. Every time I boot into Mint after windows, with my (wired) headphones remaining plugged in the whole time, the audio either gets routed to laptop speakers, or to headphones but the volume is way too high. Disconnecting & reconnecting the headphones solves the problem every time. So, is there a way to simulate this without physically doing it? Or another solution to this problem?

It's only an inconvenience of course, but since my laptop is new and my ports are tight, I'm kinda straining the headphone cable near the plug. Thanks in advance...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SuperJoker
Level 1
Level 1
Posts: 41
Joined: Tue Jun 22, 2021 11:32 am

Re: Simulate headphone disconnect & reconnect?

Post by SuperJoker »

I can't think of a real linux solution but you can buy a female jack y splitter and use it as a mini extension where you will plug and unplug easily your heaphones.
jessexknight
Level 1
Level 1
Posts: 6
Joined: Thu Sep 16, 2021 9:05 pm

Re: Simulate headphone disconnect & reconnect?

Post by jessexknight »

I think I found a solution -- after embarrassingly blasting music into my office this morning because I forgot to unplug/replug my headphones ...

Code: Select all

sudo echo 'pulseaudio -k' | sudo tee -a /etc/init.d/pulseaudio-reset && sudo chmod +x /etc/init.d/pulseaudio-reset
The sudo echo '...' | sudo tee -a is basically the same as sudo echo '...' > for protected files as described here.
Locked

Return to “Beginner Questions”