mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	systemd: system-mode: preserve /run/pipewire after the daemon stops
/run/pipewire is initially created by pipewire.socket when it creates the socket file, but it is owned by root with mode 0755. In the .service unit, RuntimeDirectory=pipewire re-creates /run/pipewire for user pipewire (owned by pipewire:pipewire, 0755) when this unit starts. This is necessary for the pipewire daemon to be able to write the .lock file. By default, when the service unit stops, systemd deletes this runtime directory and therefore it also deletes the socket that is owned by pipewire.socket. When this happens, the service is no longer socket-activateable even though pipewire.socket is active. RuntimeDirectoryPreserve=yes prevents the service unit from removing this runtime directory and socket activation still works as expected
This commit is contained in:
		
							parent
							
								
									2491f56355
								
							
						
					
					
						commit
						32512a8962
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -25,6 +25,7 @@ Type=simple
 | 
				
			||||||
ExecStart=@PW_BINARY@
 | 
					ExecStart=@PW_BINARY@
 | 
				
			||||||
Restart=on-failure
 | 
					Restart=on-failure
 | 
				
			||||||
RuntimeDirectory=pipewire
 | 
					RuntimeDirectory=pipewire
 | 
				
			||||||
 | 
					RuntimeDirectoryPreserve=yes
 | 
				
			||||||
User=pipewire
 | 
					User=pipewire
 | 
				
			||||||
Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
 | 
					Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue