我是一个相对较新的用户,我正在尝试对 Everspace 安装进行故障排除。游戏大约 30 分钟后,《Everspace》崩溃了。我的 dmesg 日志如下:
[ 1192.925982] [ 4766] 1000 4766 52023 10117 409600 0 200 apt-check
[ 1192.925984] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/[email protected]/session.slice/[email protected],task=RSG-Linux-Shipp,pid=4644,uid=1000
[ 1192.926065] Out of memory: Killed process 4644 (RSG-Linux-Shipp) total-vm:9695404kB, anon-rss:3881560kB, file-rss:448kB, shmem-rss:128kB, UID:1000 pgtables:16948kB oom_score_adj:100
[ 1194.072896] rfkill: input handler enabled
[ 1194.951973] kauditd_printk_skb: 6 callbacks suppressed
[ 1194.951976] audit: type=1400 audit(1702657465.534:162): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/20290/usr/lib/snapd/snap-confine" pid=4866 comm="snap-confine" capability=12 capname="net_admin"
[ 1194.951981] audit: type=1400 audit(1702657465.534:163): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/20290/usr/lib/snapd/snap-confine" pid=4866 comm="snap-confine" capability=38 capname="perfmon"
[ 1195.649519] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 1195.802107] rfkill: input handler disabled
[ 1204.153520] rfkill: input handler enabled
[ 1205.055782] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 1205.381611] rfkill: input handler disabled
[ 1206.403436] audit: type=1107 audit(1702657476.987:164): pid=625 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.8" pid=5910 label="snap.snap-store.ubuntu-software" peer_pid=636 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 1206.403826] audit: type=1107 audit(1702657476.987:165): pid=625 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.8" pid=5910 label="snap.snap-store.ubuntu-software" peer_pid=636 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 1206.406283] audit: type=1107 audit(1702657476.987:166): pid=625 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.8" pid=5910 label="snap.snap-store.ubuntu-software" peer_pid=636 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 1206.406597] audit: type=1107 audit(1702657476.987:167): pid=625 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.8" pid=5910 label="snap.snap-store.ubuntu-software" peer_pid=636 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 1206.720225] audit: type=1400 audit(1702657477.303:168): apparmor="DENIED" operation="open" class="file" profile="snap.snap-store.ubuntu-software" name="/etc/appstream.conf" pid=5910 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1210.416153] audit: type=1326 audit(1702657480.999:169): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.opera.opera pid=6742 comm="opera" exe="/snap/opera/279/usr/lib/x86_64-linux-gnu/opera/opera" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7fb469f4d4e7 code=0x50000
[ 1210.416321] audit: type=1326 audit(1702657480.999:170): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.opera.opera pid=6741 comm="opera" exe="/snap/opera/279/usr/lib/x86_64-linux-gnu/opera/opera" sig=0 arch=c000003e syscall=330 compat=0 ip=0x7f6bd435d4e7 code=0x50000
[ 1212.157575] audit: type=1107 audit(1702657482.739:171): pid=625 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name="org.bluez" pid=6489 label="snap.opera.opera" peer_pid=623 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
我最初的研究表明 systemd-oomd 是罪魁祸首,所以我杀死了它:
sudo systemctl status systemd-oomd
○ systemd-oomd.service
Loaded: masked (Reason: Unit systemd-oomd.service is masked.)
Active: inactive (dead)
这是我的系统详细信息:
System:
Host: geary-Aspire-A315-59 Kernel: 6.2.0-39-generic arch: x86_64 bits: 64
Desktop: GNOME v: 44.3 Distro: Ubuntu 23.04 (Lunar Lobster)
Machine:
Type: Laptop System: Acer product: Aspire A315-59 v: V1.22
serial: <superuser required>
Mobo: ADL model: Callisto_ADU v: V1.22 serial: <superuser required>
UEFI: Insyde v: 1.22 date: 05/31/2023
Battery:
ID-1: BAT1 charge: 21.7 Wh (54.5%) condition: 39.8/39.9 Wh (99.8%)
volts: 11.4 min: 11.6
CPU:
Info: 10-core (2-mt/8-st) model: 12th Gen Intel Core i5-1235U bits: 64
type: MST AMCP cache: L2: 6.5 MiB
Speed (MHz): avg: 2500 min/max: 400/4400:3300 cores: 1: 2500 2: 2500
3: 2500 4: 2500 5: 2500 6: 2500 7: 2500 8: 2500 9: 2500 10: 2500 11: 2500
12: 2500
Graphics:
Device-1: Intel Alder Lake-UP3 GT2 [Iris Xe Graphics] driver: i915 v: kernel
Device-2: Quanta ACER HD User Facing type: USB driver: N/A
Display: wayland server: X.Org v: 1.22.1.8 with: Xwayland v: 22.1.8
compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev,vesa
dri: iris gpu: i915 resolution: 1920x1080~60Hz
API: OpenGL v: 4.6 Mesa 23.0.4-0ubuntu1~23.04.1 renderer: Mesa Intel
Graphics (ADL GT2)
Audio:
Device-1: Intel Alder Lake PCH-P High Definition Audio
driver: sof-audio-pci-intel-tgl
Sound API: ALSA v: k6.2.0-39-generic running: yes
Sound Server-1: PipeWire v: 0.3.65 running: yes
Network:
Device-1: MEDIATEK driver: N/A
Device-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter type: USB
driver: r8188eu
IF: wlx40ed001396e7 state: up mac: 40:ed:00:13:96:e7
Bluetooth:
Device-1: IMC Networks Wireless_Device type: USB driver: btusb
Report: hciconfig ID: hci0 rfk-id: 2 state: down
bt-service: enabled,running rfk-block: hardware: no software: no
address: 00:00:00:00:00:00
RAID:
Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
Drives:
Local Storage: total: 238.47 GiB used: 65.13 GiB (27.3%)
ID-1: /dev/nvme0n1 vendor: Kingston model: OM8SEP4256Q-AA size: 238.47 GiB
Partition:
ID-1: / size: 86.21 GiB used: 65.07 GiB (75.5%) fs: ext4 dev: /dev/nvme0n1p5
ID-2: /boot/efi size: 256 MiB used: 65.2 MiB (25.5%) fs: vfat
dev: /dev/nvme0n1p1
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 52.8 MiB (2.6%) file: /swapfile
Sensors:
System Temperatures: cpu: 45.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 325 Uptime: 34m Memory: 7.46 GiB used: 2.54 GiB (34.0%)
Shell: Bash inxi: 3.3.25
任何帮助将不胜感激,如果我发现罪魁祸首,我一定会回复。我目前的理论是,我确实内存不足,这就是它死掉的原因。当它崩溃时,它需要 GNOME,强制 UI 重新启动,我必须重新登录。我不断地关闭图形选项,但它似乎没有帮助。我现在已经脱离了我的联盟。
非常感谢您的参与!
要么是程序中的内存管理错误,要么是您需要交换空间。
当程序分配所有实际内存并需要更多内存时,可以使用交换空间来控制发生的情况。当所有可释放的缓存(某些缓存块“正在使用”,无法释放)被释放后,系统进入 Out-Of-Memory 状态。在内存不足的情况下,通过交换,某些任务的内存会被写入磁盘,释放以供重用,然后在任务运行时返回到内存(换入)。如果没有交换,系统可能会冻结,可怕的 OOM-Killer(一个伪进程,硬编码在内核中)运行,并选择一个进程来杀死,以释放内存。OOM-Killer 以不方便的选择而闻名。
系统休眠需要 RAM 大小的连续交换区域。
读
man mkswap fallocate filefrag swapon fstab
。如果添加交换空间只是延迟问题的发生,那么它就是一个错误。向游戏开发者报告。
好的,所以我遵循了建议并研究了提供的链接和手册页。我发现了这个名为 Swapspace 的可爱程序,它可以创建动态交换文件。我的设置中有一个我没有提到的部分,那就是我是双启动的,所以我所有的 HDD 空间都挂在我的 Windows 端。所以我用以下命令安装了交换空间,
sudo apt install swapspace
安装了驱动器,然后运行sudo swapspace -s /media/geary/Acer
田田!不再发生崩溃,性能也很棒。对于将来使用此功能的任何人,请注意:我在 SDD 上使用此功能,这是一个很大的禁忌,因为 SDD 的读写次数不如传统盘片驱动器那么多。由于我只有一个硬盘,所以我为了玩游戏而让这个可怜的东西经历了很多。我知道这一点并且对此表示同意,但其他任何人都应该自己做出这个决定。接下来我必须自学如何将其设置为一直运行,但这个问题已经解决了。