Supposing I have a room currently occupied by Jedi Knights, or some other force that I can't defeat with battle droids and brute strength. I wish to incapacitate the occupants of this room with a gas, which I will pump in using the HVAC system.
I wish to capture the intruders alive, for torment purposes. What gas can I use that will quickly incapacitate the Jedi, but that also takes the longest to kill them?
For example, if I pump VX gas into the room, the occupants with be quickly incapacitated, and killed. I wish them to pass out unconscious quickly, but still leave me a few minutes to revive them (once safely restrained) before they die.
If you happen to be on a Space Station, you could simply vent the atmosphere. They may have some internal injuries, but they should revive when you pump the air back into the room.
The important thing to consider is that any "knockout" gas is a potential killer in a large enough dosage, and merely pumping it into the room is a very imprecise way of delivering the drug. Correct dosage can vary on any number of factors: age, weight race, recent activity, even what they had for breakfast that morning.
If your HVAC system is sophisticated enough you could simply replace the oxygen with nitrogen. It will cause them to fall unconscious quickly due to lack of oxygen for the brain, at which point you send in droids to restrain them. As you long as get to them within ~3 minutes and supply them with oxygen, you should be able to avoid permanent brain damage.
The advantage of this Inert Gas Asphyxiation is that there is no warning for the person, as the gas doesn't react with the body to give any sort of signal.
While perhaps not the quickest to render your enemies unconscious, the effects of low level exposure will considerably hinder their combat abilities, even if they don't get a dose high enough to knock them out.
Now while the force may be with them, so is the crippling headache and chest pain. Their ability to think up a cunning plan to negate your evil wiles is going to be significantly impaired.
Desflurane, isoflurane and sevoflurane are the most widely used volatile anaesthetics today. They are often combined with nitrous oxide. Older, less popular, volatile anaesthetics, include halothane, enflurane, and methoxyflurane. Researchers are also actively exploring the use of xenon as an anaesthetic. (wiki)
If its good enough for the docs, its probably good enough for your knights. I know some of that has worked on me, very quickly.
Orthochlorobenzalmalononitrile (AKA CS gas or 'tear' gas) - it won't actually knock them out but it will definitely incapacitate them very quickly unless they happen to have full-face respirators handy.
Holding their breath won't help them (ala Messers Kenobi and Qui-gon in Ep 1) as it doesn't need to be breathed in to do it's work - it's primarily an irritant and not even Jedi Knights do their best work when their nostrils, eyes and skin feel like they are on fire!
No worries about killing them (unless they are elderly or have a pre-existing respiratory or cardiac condition) and bonus points in that it's unpleasant enough to start the torment!
Lots of organic molecules, particularly those that feature benzenes, can cause incapacitation and unconsciousness extremely quickly without requiring that ambient oxygen be removed.
The problems noted in other answers still exist (HVAC delivery will be crazily imprecise for dosage, and a sufficient amount to ensure unconsciousness for everyone has a good chance of killing at least someone), plus exposure to benzenes can have a lot of long-term health consequences (which may not matter for your needs here).
I don't recall the exact molecule, I remember one time when I was in an organic chemistry lab and got too close (my face was ~2 feet away, distance mostly but not entirely vertical) to the open top of a flask full of a benzene-containing liquid. My muscles gave out in a heartbeat and I immediately collapsed to the floor and had no physical ability to resist in any way and nearly lost consciousness. From a single, incomplete inhalation!
How about using oxygen?
The Jedi will likely notice you reducing the oxygen, but if you increase pressure in the room and change the air to a higher oxygen purity you'll induce hyperoxia or oxygen toxicity: https://en.m.wikipedia.org/wiki/Oxygen_toxicity
This causes disorientation, spasms, near-sightedness and more, more than 15 minutes of exposure is more than enough to incapacitate them. As far as I can tell age and bodyweight have little effect on the effects so this is indoscriminate as long as all subjects are equally active.
Otherwise there is almost nothing that will work. Here's the wiki about gasses that cause sleep, unconsciousness or other forms of incapacitation: https://en.m.wikipedia.org/wiki/Incapacitating_agent
It specifically states that the US for example looked at ways to knock out hijackers of aircraft but found none that guaranteed survival of the hostages as agression or hazards of the gas itself can kill, such as during the 2002 russian hostage situation where 15% of 800 hostages died after exposure to the (unknown) gas. Considering the amount of targets (2 Jedi), their similar physiology (both grown and trained adults) and that you can immediately offer proper medical assistance the chance of death can definitely be reduced.
I would discard the notions of some of your other advisors, mainly the one of "the dosage to knock out vs kill differs from person to person therefore you cannot use it". While true, the margin of error depends on your targets and gas used. If you have a 7 foot tall Jedi bodybuilder in the prime of his life with a 6 year old padawan the chance of over or underdosing either one is huge, if they are of similar build and age you calculate the potential dosage to knock out the one with the least bodyweight, reduce that dosage a little and use a gas that incapacitates or reduces capabilities before that to make sure neither one will die but they are easier to capture.
Edit: The only other solution is oxygen deprivation by sucking the air out, rather than deprivation by replacing oxygen. If you simply replace the oxygen and your oversensitive Jedi notice it, they put on those rebreather thingies and escape. But if you suck the air out to a low enough content then their best bet is to exhale as much air or their lungs might burst, and they'll lose consciousness quickly. (https://www.scienceabc.com/pure-sciences/what-happens-to-a-human-body-if-exposed-to-the-vacuum-of-space.html).
The beauty of this is ofcourse that you can announce it to your Jedi: "hey we'll suck the oxygen out now thank you". The Jedi will try to survive as long as possible and exhale. Now you'll lower the oxygen content slow enough that lung bursting won't be a problem as the Jedi will lose consciousness before that, but they won't know that! The best part is that if you get the room pressurised and oxynegated quickly they'll not have any permanent damage, as evidenced by both some rather nasty experiments with dogs and an unlucky astronaught who had an accident inside a chamber, lost consciousness and made a full recovery. Within that time period that your Jedi are still unconscious or recovering from it, you can easily sedate them with something in the bloodstream and then just hook them up to some aneastetics to keep them under until you have them bound, not gagged so they can make quips about their terrible situation and you fail to search their body's so they have something hidden to cut the ropes and make a daring escape as you leave them in a truly deadly situation but don't watch them die (ropes on your space station? Why ofcourse! I put them next to my goatee oil!). I was going to interrogate them? Oh I'll forget about all that as I'm practicing my moustache twirling and make some exposition about my masterplan of ruling the planet by forcing the queen to sign a peace treaty after having her walk through a city with minimal protection and using convoluted politics.
If you watch the movies, they put on gas masks as soon as the gas gets pumped.
The best solution is a nerve agent such as Sarin which only has to touch the skin. They have at best a few minutes and leaving the room won't even help
If you want them alive you administer the antidote (preferably by droid) otherwise just wait for them to drop dead.
You use your super ability to produce large volumes of noxious farts.
A typical fart is composed of about 59 percent nitrogen, 21 percent hydrogen, 9 percent carbon dioxide, 7 percent methane and 4 percent oxygen. Only about one percent of a fart contains hydrogen sulfide gas and mercaptans, which contain sulfur, and the sulfur is what makes farts stink.
As far as I know, no-one has ever died from breathing in a fart but in large amounts it would surely incapacitate almost anyone or at least make them surrender or want to run away.