Story time. In a past life, I tried to open source code I wrote at work. My manager greenlit it, but obviously that wasn't enough. Next thing I know, I'm in a room with a lawyer trying to write a patent. In the end, no patent was filed, and the code was never open sourced. What a waste. Arguably, that was 15+ years ago, it would probably go down differently now...
I do academic research and write a ton of code to support this. In grad school (many years ago) at a Midwestern state school, I try to release some code under GPL and get blocked by the school's tech transfer department. It's a program that was designed to support the lab research we were doing (LIMS, ordering, etc). It wasn't much, but it very much made our lab run better. In the end, they licensed it out to a start up that flamed out. The entire process was messy, but all I really wanted was to release it with a GPL license and get on with my work. That office made my life quite difficult through grad school.
Fast forward a few years and I'm now at Stanford and then later UCSF. I email the tech transfer office about some code I'm planning on publishing, expecting a similar back and forth. It took all of two minutes to get back an email:
Are you planning on making money with this code? If so, let us know. If not, any open source license is fine with us.
It was a quite refreshing change to deal with institutions that knew what they were doing w.r.t. IP.