mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Balbir Singh <balbirs@nvidia.com>
To: Bert Karwatzki <spasswolf@web.de>
Cc: Ingo Molnar <mingo@kernel.org>, Kees Cook <kees@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: commit 7ffb791423c7 breaks steam game
Date: Wed, 12 Mar 2025 09:10:19 +1100	[thread overview]
Message-ID: <fdea59fe-f570-489f-bf88-1ffd47119cac@nvidia.com> (raw)
In-Reply-To: <9a5df5627d3d72b2a97f501dfb7d944cc1e9920f.camel@web.de>

On 3/12/25 05:24, Bert Karwatzki wrote:
> Am Dienstag, dem 11.03.2025 um 12:15 +0100 schrieb Bert Karwatzki:
>> Am Dienstag, dem 11.03.2025 um 18:19 +1100 schrieb Balbir Singh:
>>> On 3/11/25 08:48, Balbir Singh wrote:
>>>> On 3/10/25 22:22, Bert Karwatzki wrote:
>>>>> Using linux next-20250307 to play the game stellaris via steam I noticed that
>>>>> loading the game gets sluggish with the progress bar getting stuck at 100%.
>>>>> In this situation mouse and keyboard inputs don't work properly anymore.
>>>>> Switching to a VT and killing stellaris somewhat fixes the situation though in
>>>>> one instance the touchpad did not work after that. I bisected this between
>>>>> v6.14-rc5 and next-20250307 and got this as the first bad commit:
>>>>>
>>>>> 7ffb791423c7c518269a9aad35039ef824a40adb is the first bad commit
>>>>> commit 7ffb791423c7c518269a9aad35039ef824a40adb (HEAD)
>>>>> Author: Balbir Singh <balbirs@nvidia.com>
>>>>> Date:   Fri Feb 7 10:42:34 2025 +1100
>>>>>
>>>>>     x86/kaslr: Reduce KASLR entropy on most x86 systems
>>>>>
>>>>> Reverting commit 7ffb791423c7 in next-20250307 fixes the issue for me.
>>>>>
>>>>
>>>> Thanks for the report! Could you also share the dmesg? Do you have any proprietary
>>>> modules loaded? Could you also share the output of /proc/iomem (captured as sudo)?
>>>> The lspci output is useful, lspci -vvv (captured with sudo) would help see where
>>>> the BAR regions are, specifically before and after the patch. Could you also share
>>>> the kernel config?
>>>>
>>>> I assume your config has CONFIG_PCI_P2PDMA enabled. Did the system ever work with
>>>> nokaslr for you?
>>>>
>>>> I am a little surprised that reducing the entropy causes these issues and having
>>>> a larger direct map causes these issues.
>>>
>>> Hi, Bert
>>>
>>> I tried to reproduce the issue at my end, but could not. I am new to Steam and my
>>> hardware/games are also different. From what I could gather, Steam is a 32 bit
>>> application that uses SDL. For my testing I used Xorg, not wayland
>>>
>>> In addition to the above?
>>>
>>> 1. Could you confirm if the mouse/keyboard work outside of Steam?
>>> 2. Does evtest /dev/input/<mouse device> show anything?
>>> 3. We could run the kernel with nokaslr and see if the issue reproduces?
>>> 4. As a test, we could try disabling CONFIG_PCI_P2PDMA in the kernel config,
>>> build boot and test, this has the same effect has not having the patch
>>>
>>> Balbir
>>>
>>
>> 1. The problem is not with steam but specifically with the game stellaris (which
>> can be started without steam). As long as stellaris is running there is a ~2s
>> delay in keyboard and mouse input (for everything), killing stellaris restores
>> input to normal.
>> 2 evtest /dev/input/event{1,3,4} (keyboard, touchpad, mouse) seems to show the
>> same output whether stellaris is running or not, only if it's running there's
>> the mentioned delay.

Thanks, so the issue is specific to the game and running it?

>> 3. For some weird reason my kernel does not recongnize the nokaslr cmdline
>> parameter, so I build a kernel without CONFIG_RANDOMIZE_BASE and this does NOT
>> fix the issue.

Can you clarify if you're booting with the compressed image bzImage/vmlinuz or
with vmlinux?

>> 4. Most surprisingly removing CONFIG_PCI_P2PDMA also does NOT fix the issue.
>>


> 
> I've done more experimenting regarding 4.:
> next-20250307 with "CONFIG_RANDOMIZE_BASE=y" AND "CONFIG_PCI_P2PDMA is not set"
> works as expected (i.e. no input lag when stellaris is running)
> 
> next-20250307 with "CONFIG_RANDOMIZE_BASE is not set" AND "CONFIG_PCI_P2PDMA is
> not set" also shows the buggy behaviour (i.e. input lag when stellaris is
> running) (this was the configuration I tested before)

This is an interesting experiment, I am beginning to wonder if the system relies
on a reduced direct map for the game to work correctly. Can you also check in this
scenario if CONFIG_RANDOMIZE_MEMORY is disabled?

Can you please share the dmesg
1. output before and after the changes?
2. Do you see any warnings/errors in journalctl or game specific log files?
3. lspci -vvv output before and after the changes?


> 
> As a sidenote, I've tested several kernel with nokaslr as command line parameter
> (6.1.128, 6.8.12, 6.12.17 (the debian sid distributional kernel)) and nokaslr is
> not recognized as a command line parameter in any of them
> 

Please see my comment above about booting. How did you check if nokaslr is being
recognized, is it via looking up dmesg?

Thanks!
Balbir Singh

  reply	other threads:[~2025-03-11 22:10 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 11:22 Bert Karwatzki
2025-03-10 21:48 ` Balbir Singh
2025-03-11  7:19   ` Balbir Singh
2025-03-11  7:28     ` Ingo Molnar
2025-03-11 11:15     ` Bert Karwatzki
2025-03-11 18:24       ` Bert Karwatzki
2025-03-11 22:10         ` Balbir Singh [this message]
2025-03-11 23:09           ` Bert Karwatzki
2025-03-12  0:26             ` Bert Karwatzki
2025-03-12  2:23               ` Balbir Singh
2025-03-12  1:24             ` Balbir Singh
2025-03-13  9:22               ` Bert Karwatzki
2025-03-13 10:40                 ` Balbir Singh
2025-03-13 10:53                   ` Bert Karwatzki
2025-03-13 11:47                     ` Balbir Singh
2025-03-13 18:12                       ` Bert Karwatzki
2025-03-13 21:54                         ` Balbir Singh
2025-03-13 22:22                           ` Bert Karwatzki
2025-03-14  6:14                             ` Balbir Singh
2025-03-14 13:34                               ` Balbir Singh
2025-03-14 14:18                                 ` Bert Karwatzki
2025-03-15  0:16                                   ` Balbir Singh
2025-03-15 17:40                                     ` Alex Deucher
2025-03-16 13:09                                       ` Bert Karwatzki
2025-03-16 20:06                                         ` Bert Karwatzki
2025-03-17  9:13                                         ` Balbir Singh
2025-03-20  9:01                                           ` Ingo Molnar
2025-03-20 23:55                                             ` Balbir Singh
2025-03-21 10:24                                               ` Ingo Molnar
2025-03-21 11:05                                                 ` Balbir Singh
2025-03-22  8:04                                                   ` Ingo Molnar
2025-03-22  9:40                                                     ` Balbir Singh
2025-03-20 23:43                                           ` Bert Karwatzki
2025-03-21  4:55                                             ` Balbir Singh
2025-03-21 12:26                                               ` Bert Karwatzki
2025-03-22  2:06                                                 ` Balbir Singh
2025-03-22 12:23 Bert Karwatzki
2025-03-23  6:51 ` Balbir Singh
2025-03-24 11:23   ` Bert Karwatzki
2025-03-24 12:14     ` Christian König
2025-03-24 22:48       ` Balbir Singh
     [not found]         ` <938c2cbd-c47f-4925-ba82-94eef54d9ebc@amd.com>
2025-03-25 22:45           ` Balbir Singh
2025-03-25 23:21             ` Bert Karwatzki
2025-03-25 23:43               ` Balbir Singh
2025-03-26  1:50                 ` Balbir Singh
2025-03-26 10:10                   ` Bert Karwatzki
2025-03-26 10:36                     ` Balbir Singh
2025-03-26 11:14                       ` Bert Karwatzki
2025-03-27 10:53                       ` Ingo Molnar
2025-03-27 22:03                         ` Balbir Singh
2025-03-24 21:43     ` Balbir Singh
2025-03-24 23:07 Bert Karwatzki
     [not found] ` <634e77d7-4f3c-4d1a-8aa3-1978896f9bf2@amd.com>
2025-03-25 10:25   ` Balbir Singh
2025-03-25 10:14 Bert Karwatzki
2025-03-25 12:23 ` Christian König
2025-03-26 22:00   ` Bert Karwatzki
2025-03-26 22:58     ` Linus Torvalds
2025-03-27  0:57       ` Balbir Singh
2025-03-27  0:58       ` Bert Karwatzki
2025-03-27 10:40       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdea59fe-f570-489f-bf88-1ffd47119cac@nvidia.com \
    --to=balbirs@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=spasswolf@web.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®