Audacity 2.4.1 kills Line In

I have a new HP Pavilion Desktop TP01 PC with i7 and Windows 1909 newly installed.

Each time I attempt to use the line-in port with Audacity, the port the port becomes inoperative…
It no longer indicates/knows that the phone jack is inserted. (As shown on the Sound window Recording tab.)

After hours and hours of troubleshooting, I notified HP and they ultimately installed a new motherboard. The problem did not go away.

Upon the return of the HP Pavilion, I checked the port. The line-in port displayed as plugged in.

Using mmsys.cpl for the Sound display, and activating Audacity the Line in port switched to “not plugged in.” The port again closed!!! Permanently!!

The only way to reactivate the line-in port is to DEINSTALL the Realtek Audio device and reboot to have it reinstall Realtek driver/app, Then its available.

If I again run the latest Audacity (2.4.1) I can watch the port shut down.

I have spent hours localizing the problem to this situation, it is repeatable.

Simply, when you run Audacity, it removes line-input. This can be also observed by opening Device Manager to “Audio inputs and outputs” activating Audacity, and watching the Line-input entry disappear.

The Realtek must be uninstalled, rebooted and will again Line-in will appear, until Audacity is run.

Somehow, Realtek Audio with the latest driver (5/20/2020) and Audacity are fighting. There must be some Realtech(?) code that being overwritten by Audacity. Am I right?

Does anyone know of a fix for this?

BTW, I have another nine year old machine with Win 10 1909 and Audacity 2.4.1. The only difference is that it does not have Audio Loopback hardware. I have no problem recording with Line-in!!

If you change the recording device, you may need to “Rescan Audio Devices” (bottom of the “Transport” menu).

Whether or not this is required after plugging / unplugging a microphone depends on the sound card and it’s drivers, some require a rescan and some don’t. Unfortunately Audacity is not yet able to automatically detect if a rescan is required.

That sounds weird.
Audacity does “scan” the computer’s sound system, but only with valid Windows API calls to request a list of devices and supported features. It sounds like the driver is crashing.

Try using the “Rescan Devices” feature to see if that fixes the problem. If not, then we will need to dig deeper.

Steve, thanks for the quickcomback!
I tried your suggestion (At least I think I did, because there appeared to be no visible response) but line-in miraculously worked. (Your my hero, I think…)
I checked and was able to record from tape player. But shortly afterwards I was cleaning my record player and broke the stylus, thus requiring a difficult search to acquire a new stylus 
Upon setting up for recording using line in, again was unable to activate line in after running Audacity.
I’ve again spent many hours/days trying to “debug” the problem.
Here are my findings:
Uninstalling Realtek(R) Audio (and also deleting the driver) and restarting Windows I arrive at a full list in the Device Manager/“Audio inputs and outputs” list including line in.
Upon just clicking on Audacity from the start menu and observing the Device Manager, the Line in entry disappears!
Viewing “Audio inputs and outputs” list by “Show hidden devices”, there are two Line in presentations! The properties selection of each Line in states: “Currently, this hardware device is not connected to the computer. (Code 45)…” WTF!
My device IS connected to the Line in port.
I’ve even investigated the registry entries before and after activating Audacity:
But I don’t really know where to look to determine any irregularities…
Since I DID get it to work once, I know that it isn’t a hardware problem and probably not a sw problem either but what is it? I must have deinstalled Realtek 50 times and each time I fire up Audacity it cuts out. I’m having troubles w/ Stereo-mix also, but that’s another issue. Although it may be related…
Finally, I used VLC Media Player and can record from Line in OK…
Any leads in this area would be helpful.

Where did you download the Realtek driver from?

The drivers for the audio as per the Device Manager

Audio inputs and outputs:
Line in: From Microsoft Corp. dtd: 3/8/2019 Version 10.0.18362.1
Sound, video and game controllers:
Realtek Audio: From Realtek Corp. dtd: 3/24/2020 Version 6.0.8923.1

Steve, are there any other software updates I need?

You might try getting another soundcard (if you have an available slot) or a USB audio interface with line inputs. A regular soundcard will probably be cheaper than a USB interface if that’s a consideration. (Don’t get a regular “USB soundcard” because they only have mic-in and headphone out.)

Finally, I used VLC Media Player and can record from Line in OK…

Weird! But, you could record with VLC and then edit in Audacity.

I’ve already considered all three of your suggestions but they are workarounds and I am looking for a solution.
The first two are “patching” a brand new i7 PC that would cost and would possibly have their own config problems.
MY point of illustrating the VLC recording is that recording with my PC is possible.
VLC would be OK for a few recordings but would probably be reduced quality, and require more steps.
Finally, Audacity is an excellent and powerful recording and audio manipulation application and I feel
that it is important to have it as bug free as possible. And anything that I can do to add to that is my objective

Those are probably generic drivers.
It’s best to use the manufacturers drivers:

HP Pavilion Desktop TP01

Are [u]these specs[/u] wrong? They don’t mention a line input.

Ports - 1 USB 3.1 Gen 1 Type-C™; 4 USB 3.1 Gen 1 Type-A; > 1 headphone/microphone combo >