Skip to content

Commit

Permalink
Suppress warning from systemd user session
Browse files Browse the repository at this point in the history
Anaconda is starting systemd --user for RDP session. This unfortunately,
will result in message:

```
Failed to adjust memory pressure threshold, ignoring: Device or resource
busy
```

This message is printed directly to terminal and bypassing stdout or
stderr.

Force this message to be logged to the journal instead of terminal.
  • Loading branch information
jkonecny12 committed Nov 5, 2024
1 parent d324578 commit ff6bb59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyanaconda/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def start_user_systemd():

# Start the user instance of systemd. This call will also cause the launch of
# dbus-broker and start a session bus at XDG_RUNTIME_DIR/bus.
childproc = util.startProgram(["/usr/lib/systemd/systemd", "--user"])
# Without SYSTEMD_LOG_TARGET variable the systemd is logging directly to terminal
# bypassing stdout and stderr
childproc = util.startProgram(["/usr/lib/systemd/systemd", "--user"],
env_add={"SYSTEMD_LOG_TARGET": "journal-or-kmsg"})
WatchProcesses.watch_process(childproc, "systemd")

# Set up the session bus address. Some services started by Anaconda might call
Expand Down

0 comments on commit ff6bb59

Please sign in to comment.