You are not logged in.

#1 2023-09-23 17:38:13

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Games performance change each time I boot

Sometimes, I boot and get good performance. Other times, when I boot, games are unplayable (since the fps is so low). What I have to do is to keep rebooting until I get lucky.
I had this same bug when I was daily driving debian 12. I fixed it by compiling an older kernel (5.10.186). That fixed it. However, on arch, if I try that kernel, I just simply can't boot. I know it's not the way I'm compiling my kernel, because I even tried to use the pre-compiled one in the arch linux archives (https://archive.archlinux.org/packages/l/linux).
So that means I can't just simply use an older kernel to fix this (like I did on debian 12).
What I thought I could do, It's to compile a bleeding edge kernel with the right settings. Perhaps I could get rid of this bug if I disable or enable a specific setting in a modern kernel. Do you guys have an idea for what setting that could be?

Here's the dmesg output of a GOOD boot: (https://pastebin.com/1URzEHHN)

Here's the dmesg output of a BAD boot: (https://pastebin.com/XKAvSvkj)

My gpu is a AMD R7 240 4GB (amdgpu drivers)
My cpu is a AMD RYZEN 3 2200G

I don't know if you guys will find this useful, but here's a reddit thread of me trying to boot from an old kernel on arch (https://www.reddit.com/r/linux4noobs/co … es_on_boot)


tldr: I have issues with gaming performance on modern kernels. Though I can't boot with old kernels on arch. What setting could I enable/disable on a modern kernel to fix this?

If you guys need more information, like logs, lmk

Last edited by Sempiternal-Futility (2023-09-23 17:38:32)

Offline

#2 2023-09-23 21:51:21

jonno2002
Member
Registered: 2016-11-21
Posts: 856

Re: Games performance change each time I boot

lines present in GOOD that arent in BAD:

jitterentropy: Initialization failed with host not compliant with requirements: 9
systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
systemd[1]: Finished Load Kernel Module dm_mod.

lines present in BAD that arent in GOOD:

thermal cooling_device0: hash matches

heres the rest of the diff, just minor/irrelevent differences from what i can see, the lines are NOT IN ORDER, i stripped the timestamps and sorted the output and diff'd it.

1d0
< 
92c91
< ACPI: thermal: Thermal Zone [THRM] (44 C)
---
> ACPI: thermal: Thermal Zone [THRM] (46 C)
149c148
< audit: type=2000 audit(1694099552.156:1): state=initialized audit_enabled=0 res=1
---
> audit: type=2000 audit(1694100212.156:1): state=initialized audit_enabled=0 res=1
175c174
< Calibrating delay loop (skipped), value calculated using timer frequency.. 6989.95 BogoMIPS (lpj=11644733)
---
> Calibrating delay loop (skipped), value calculated using timer frequency.. 6989.92 BogoMIPS (lpj=11644686)
185,186c184,185
< clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x325b08e8824, max_idle_ns: 440795218849 ns
< clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x325b1901053, max_idle_ns: 440795306184 ns
---
> clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x325afbe86ed, max_idle_ns: 440795235573 ns
> clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x325b1adc776, max_idle_ns: 440795244864 ns
364d362
< jitterentropy: Initialization failed with host not compliant with requirements: 9
394,395c392,393
< memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=427 'sddm-greeter'
< Memory: 7946332K/8334672K available (16384K kernel code, 2107K rwdata, 12804K rodata, 3368K init, 3976K bss, 388080K reserved, 0K cma-reserved)
---
> memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=407 'sddm-greeter'
> Memory: 7946344K/8334672K available (16384K kernel code, 2107K rwdata, 12804K rodata, 3368K init, 3976K bss, 388068K reserved, 0K cma-reserved)
644,645c642,643
< PM:   Magic number: 7:303:234
< PM: RTC time: 15:12:32, date: 2023-09-07
---
> PM:   Magic number: 7:956:385
> PM: RTC time: 15:23:32, date: 2023-09-07
713c711
< rtc_cmos 00:03: setting system clock to 2023-09-07T15:12:32 UTC (1694099552)
---
> rtc_cmos 00:03: setting system clock to 2023-09-07T15:23:32 UTC (1694100212)
716c714
< sched_clock: Marking stable (326583761, -19994879)->(308706448, -2117566)
---
> sched_clock: Marking stable (323022691, -19994469)->(306209087, -3180865)
758c756
< smpboot: Total of 4 processors activated (27958.83 BogoMIPS)
---
> smpboot: Total of 4 processors activated (27958.71 BogoMIPS)
825d822
< systemd[1]: Finished Load Kernel Module dm_mod.
835d831
< systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
872,880c868,876
< systemd-fstab-generator[190]: Mount point  is not a valid path, ignoring.
< systemd-fstab-generator[190]: Mount point  is not a valid path, ignoring.
< systemd-fstab-generator[190]: Mount point  is not a valid path, ignoring.
< systemd-fstab-generator[190]: Mount point  is not a valid path, ignoring.
< systemd-journald[211]: Collecting audit messages is disabled.
< systemd-journald[211]: Received client request to flush runtime journal.
< systemd-journald[211]: Rotating system journal.
< systemd-journald[211]: /var/log/journal/3c0ef48132e948aebc0b2a16844b0dac/system.journal: Boot ID changed since last record, rotating.
< systemd-journald[211]: /var/log/journal/3c0ef48132e948aebc0b2a16844b0dac/user-1000.journal: Boot ID changed since last record, rotating.
---
> systemd-fstab-generator[188]: Mount point  is not a valid path, ignoring.
> systemd-fstab-generator[188]: Mount point  is not a valid path, ignoring.
> systemd-fstab-generator[188]: Mount point  is not a valid path, ignoring.
> systemd-fstab-generator[188]: Mount point  is not a valid path, ignoring.
> systemd-journald[209]: Collecting audit messages is disabled.
> systemd-journald[209]: Received client request to flush runtime journal.
> systemd-journald[209]: Rotating system journal.
> systemd-journald[209]: /var/log/journal/3c0ef48132e948aebc0b2a16844b0dac/system.journal: Boot ID changed since last record, rotating.
> systemd-journald[209]: /var/log/journal/3c0ef48132e948aebc0b2a16844b0dac/user-1000.journal: Boot ID changed since last record, rotating.
886a883
> thermal cooling_device0: hash matches
897c894
< tsc: Detected 3493.420 MHz processor
---
> tsc: Detected 3493.406 MHz processor
900c897
< tsc: Refined TSC clocksource calibration: 3493.437 MHz
---
> tsc: Refined TSC clocksource calibration: 3493.439 MHz

Last edited by jonno2002 (2023-09-23 22:00:14)

Offline

#3 2023-09-24 05:00:37

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Games performance change each time I boot

@jonno2002 I don't think that the "dm_mod" module has anything to do with this. Just coincidence. I tested it right now by rebooting until I got a bad boot, and checked dmesg, and both good and bad boots had it loaded the same way.
Same goes for "jitterentropy" and the "thermal cooling_device0".

What I thought about doing next is compiling a kernel and just mess around with the settings. What do you think about me disabling the "HSA kernel driver for AMD GPU devices" and also "secure display support"?

Last edited by Sempiternal-Futility (2023-09-24 05:01:34)

Offline

#4 2023-09-24 05:09:40

jonno2002
Member
Registered: 2016-11-21
Posts: 856

Re: Games performance change each time I boot

sorry i dont know, i was just trying to help by finding the difference in those logs, tbh i didnt think any of them would be the cause either.
will be a fun job finding out what it is.

Offline

#5 2023-09-24 06:57:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,472

Re: Games performance change each time I boot

dmesg is likely not helpful here, assuming you're using X11, check/post/compare "glxinfo -B" and your xorg log.
In doubt add "initcall_blacklist=simpledrm_platform_driver_init" to the https://wiki.archlinux.org/title/Kernel_parameters

Offline

#6 2023-09-25 05:34:47

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Games performance change each time I boot

@seth I could not find anything weird on these logs.

BAD xorg log (https://pastebin.com/q4hkYGud)
GOOD xorg log (https://pastebin.com/xn9RZk1j)

BAD glxinfo (https://pastebin.com/FvpznTVU)
GOOD glxinfo (https://pastebin.com/LME04SW2)

Offline

#7 2023-09-25 07:25:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,472

Re: Games performance change each time I boot

[     8.245] (EE) open /dev/dri/card0: No such file or directory

the simpledrm device is there (in both logs) but the only change is really

[ 18152.509] (II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/js0)
[ 18152.509] (II) No input driver specified, ignoring this device.
[ 18152.509] (II) This device may have been added with another device file.
[ 18152.511] (II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/event6)
[ 18152.511] (II) No input driver specified, ignoring this device.
[ 18152.511] (II) This device may have been added with another device file.

Compare the performance of

time echo "scale=5000; a(1)*4" | bc -l

on a good and a bad boot (single core CPU limited, don't post the resulting number - it should look familiar)
If this is too fast on even bad boots (difference becomes indistinguishable) raise the (non-linear!) scale slightly (try 6000)

What's your desktop environment?

Offline

#8 2023-09-26 16:37:51

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Games performance change each time I boot

@seth Ok. Here's the times (scale=6000)

GOOD boot:
real    0m28.206s
user    0m28.168s
sys     0m0.004s


BAD boot:
real    0m28.367s
user    0m28.345s
sys     0m0.004s

There's a difference, but a very small one...
My DE is KDE, however I have this same bug on other DE's too.

Also, another thing I just found out: The performance can change by just simply sleeping/awaking (doesn't need to be a reboot).

Offline

#9 2023-09-26 18:51:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,472

Re: Games performance change each time I boot

That's not a difference - it's not the CPU.
Did you try to suspend the compositor (SHIFT+Alt+F12) when it's bad?

Offline

#10 2023-09-27 05:33:54

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Games performance change each time I boot

@seth suspending the compositor didn't work.

Offline

#11 2023-09-27 06:45:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,472

Re: Games performance change each time I boot

So not hte GPU & not the compositor failing to sync or handle damage events.

Get rid of xf86-video-amdgpu and add the "initcall_blacklist=simpledrm_platform_driver_init" kernel parameter.
If the problem shows up again, compare https://wiki.archlinux.org/title/AMDGPU#Manually to baseline values you drew at a "good" state (this has to happen while the game is running because otherwise you'll just compare the GPU in powesaving mode)
The kernel parameters

amdgpu.runpm=0 amdgpu.bapm=0 amdgpu.aspm=0

might help you to keep the GPU busy.
If it is the GPU power management, the cause might be some runtime powermanagement daemon like TLP.

Offline

Board footer

Powered by FluxBB