Air Conditioning and Heat cut off

Air Conditioning and Heat cuts off. When that happens, I think outside air blow instead.

More info please. Dues it cut off related to how you are driving? (coasting accelerating etc?)

What year Subaru, how many miles and other possible problems?

Thank you for responding. How I?m driving does not seem related. It?s a 2000 Subaru Legacy Outback with 135000 miles. Other problem (which I also would like to fix): Engine light on about 50% of time. I took it to a parts vendor (Auto Zone) for a free diagnostic. Below,is copy of info from the resulting printout which I also attached.

Thanks again for responding. Bob)

OEM Number to Cross: P0328
OEM Brand: SUBARU
Definition
BB Knock sensor (KS) 1 circuit high imput ? bank1 or
BB single sensor
Probable cause
BB1.? Engine mechanical condition
BB2.? Knock sensor Incorrectly mounted- loose
BB3.’ Faulty knock sensor ~~
TROUBLESHOOTING N/A
OEM Brand: DOMESTIC
Definition
BB Knoek sensor condition
Explanetion
BB The powertraln control module monitors the Knock
BB Sensor for errors.
Probable cause
BBI.’ Knack sensor defective
BB2.’ Check connector and wiring to sensor
BB3.? Engine mechanical condition-knock or rattle in
BB engine
BB4 low fuel pressure