mirror of
https://github.com/KDE/kde-linux.git
synced 2026-04-18 05:29:01 -04:00
Don't disable user session freezing if nvidia module isn't loaded
nvidia-utils from Arch ships a blanket rule that disables user session freezing on suspend. While this might be necessary on NVIDIA hardware, it's actively warned against by systemd and hence should not be set for everyone else.
This commit is contained in:
committed by
Nate Graham
parent
ebc501b72a
commit
3767ae6262
@@ -0,0 +1,9 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: none
|
||||
|
||||
# This shadows the file of the same name provided by NVIDIA and instead reads the below environment
|
||||
# file every time suspend is attempted. This is so SYSTEMD_SLEEP_FREEZE_USER_SESSIONS is only set to
|
||||
# false when the nvidia kernel module is loaded, unlike the blanket rule shipped by NVIDIA.
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/run/nvidia-no-freeze-session
|
||||
@@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
# SPDX-FileCopyrightText: none
|
||||
|
||||
# Only runs if the nvidia kernel module is loaded
|
||||
ACTION=="add", SUBSYSTEM=="module", KERNEL=="nvidia", RUN+="/usr/bin/sh -c 'echo SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false > /run/nvidia-no-freeze-session'"
|
||||
|
||||
# Clean up if the module is unloaded
|
||||
ACTION=="remove", SUBSYSTEM=="module", KERNEL=="nvidia", RUN+="/usr/bin/rm -f /run/nvidia-no-freeze-session"
|
||||
Reference in New Issue
Block a user