Steam Deck OLED: permanent hang in ttm_global_swapout under GPU memory pressure, 7.2.8 TTM bulk_move fix missing in linux-neptune-72 7.2.7

Aperta
#3,070 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
46/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, linux

Direzione di ricerca

Start by comparing ttm_bo_swapout_cb() in linux-neptune-72 7.2.7 with upstream commits fcfe64715b425262af1b36f498f9197f3537ceed and 1169fe8c11ca45e3f91d59a73eb271d0ca8a7fb0; the issue identifies the skipped bulk-move bookkeeping and provides disassembly of ttm.ko. Check which SteamOS kernel package includes the fix, then verify the reported hang under GPU memory pressure or ask the reporter to test a Beta or Preview image.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Your system information
  • Hardware: Steam Deck OLED (DMI product Galileo, family Sephiroth, BIOS F7G0114)
  • SteamOS 3.9.5 stable, BUILD_ID 20261023.100. No newer Beta or Preview image was offered in Settings > System after the failure, so this is the newest kernel available to me.
  • Kernel 7.2.7-valve2-2-neptune-72-g31504582a073, package linux-neptune-72 7.2.7.valve2-2
  • Mesa 26.1.2.221562.radeonsi_26.1.2-2.1, gamescope 3.16.30.1-2
  • Steam client 1794424036
  • Opted into Steam client beta?: Yes (steamdeck_publicbeta)
  • Opted into SteamOS beta?: No
  • Have you checked for updates in Settings > System?: Yes
  • Steam ID: 76561199163978993 ([U:1:1203713265])
  • Kernel command line: amd_iommu=off amdgpu.lockup_timeout=5000,10000,10000,5000 ttm.pages_min=2097152 amdgpu.sched_hw_submission=4 amdgpu.dcdebugmask=0x20000
Please describe your issue in as much detail as possible:

Long Cyberpunk 2077 sessions end in a permanent kernel lock convoy in the TTM swapout path. The game stops rendering (gpu_busy_percent 0, GPU clock 200 MHz), the process keeps burning kernel CPU, and the kernel prints INFO: task ... blocked for more than N seconds warnings that grow from 122 to 368 seconds and never resolve. There is no GPU reset, no Oops, no OOM kill and no thermal or power-limit message. The session never recovers and the game has to be killed. While it is stuck, the Steam client process also sits in __access_remote_vm against the game, which makes ps, pgrep -a and reading smaps_rollup hang on the device.

At the moment of the hang the device looked like this:

mem_info_gtt_used      8183 MB of 8192 MB
mem_info_vram_used     1001 MB of 1024 MB
game DRM/GEM total     9178 MB  (from /proc/<pid>/fdinfo drm-total-*)
game RSS               3419 MB, game swap 1774 MB
MemAvailable            470 MB, zram swap 3533 MB used
gpu_busy_percent        0
pp_dpm_sclk             0: 200Mhz *

The game settings are already minimal: textures Low, FSR2 Performance at 1024x768, no ray tracing, no frame generation, FPS uncapped, display at 90 Hz with the gamescope limiter disabled. The device has 16 GB shared between CPU and GPU with a 1 GB VRAM carve-out and 8 GB GTT, so the game's GPU buffers alone take more than half of system RAM.

It happened twice:

  • Boot ending 2026-11-12 01:13: redDispatcher7 blocked on vkd3d_queue:11818, khugepaged blocked in the same TTM path.
  • Boot ending 2026-11-12 22:00: redDispatcher1/2/3 blocked on vkd3d_queue:4281.

Kernel log from the second occurrence, full excerpt in the gist:

Nov 12 21:20:24 INFO: task redDispatcher1:4152 blocked for more than 122 seconds.
task:redDispatcher1  state:D  pid:4152  tgid:4132  ppid:4003
Call Trace:
 __mutex_lock.constprop.0+0x3dc/0x920
 ttm_global_swapout+0x21/0xd0 [ttm]
 ttm_tt_populate+0x91/0x160 [ttm]
 ttm_bo_populate+0x4f/0xe0 [ttm]
 ttm_bo_vm_fault_reserved+0x271/0x4a0 [ttm]
 amdgpu_gem_fault+0x95/0x100 [amdgpu]
 __handle_mm_fault+0x9d4/0x1110

INFO: task redDispatcher1:4152 is blocked on a mutex likely owned by task vkd3d_queue:4281.
task:vkd3d_queue  state:S  pid:4281  tgid:4132  ppid:4003
Call Trace:
 __ww_mutex_lock.constprop.0+0x7d2/0xd10
 __drm_exec_lock_obj+0x75/0x130 [drm_exec]
 __ttm_bo_lru_cursor_next+0xfa/0x330 [ttm]
 ttm_device_swapout+0x104/0x180 [ttm]
 ttm_global_swapout+0x50/0xd0 [ttm]
 ttm_tt_populate+0x91/0x160 [ttm]
 ttm_bo_populate+0x4f/0xe0 [ttm]
 ttm_bo_handle_move_mem+0x16f/0x180 [ttm]
 ttm_bo_bounce_temp_buffer+0x9b/0xc0 [ttm]
 ttm_bo_validate+0xd6/0x240 [ttm]
 amdgpu_cs_bo_validate+0x1bb/0x2d0 [amdgpu]
 amdgpu_vm_validate+0x312/0x470 [amdgpu]
 amdgpu_cs_ioctl+0x1412/0x2140 [amdgpu]

This path matches the upstream TTM bulk_move regression from b2ed01e7ad3d ("drm/ttm: Fix ttm_bo_swapout() infinite LRU walk on swapout failure", v7.1+). That commit moved the bookkeeping in ttm_bo_swapout_cb() under if (!ret), but ttm_tt_swapout() returns the number of swapped pages on success and a negative error code on failure, so it never returns zero. The ttm_resource_del_bulk_move_unevictable() / ttm_resource_move_to_lru_tail() pair is therefore skipped on every successful swapout, a swapped-out resource stays inside its BO's bulk_move range while it is unevictable, and later freeing it or dropping it from the bulk_move through amdgpu_vm_bo_del() leaves a dangling endpoint in the LRU cursor.

Upstream fix: fcfe64715b425262af1b36f498f9197f3537ceed, public commit 1169fe8c11ca45e3f91d59a73eb271d0ca8a7fb0, in Linux 7.2.8 (2026-09-25) and 7.3-rc4, CVE-2026-98166. The 7.2.6 and 7.2.7 stable trees still carry the old condition. The 6.18 series does not contain b2ed01e7ad3d at all, which fits the fact that these hangs started after the SteamOS 3.9 kernel rebase.

ttm.ko in linux-neptune-72 7.2.7.valve2-2 still contains the unfixed branch. Disassembly of /usr/lib/modules/7.2.7-valve2-2-neptune-72-g31504582a073/kernel/drivers/gpu/drm/ttm/ttm.ko, immediately after call ttm_tt_swapout:

2cfb: call   ttm_tt_swapout
2d00: cltq
2d02: test   %rax,%rax
2d05: jne    <error path>        ; skips bookkeeping when ret != 0
2d0c: (spin_lock)
2d1c: call   ttm_resource_del_bulk_move_unevictable
2d2b: call   ttm_resource_move_to_lru_tail

Related public reports: amd-gfx "[REGRESSION] drm/ttm: NULL dereference in ttm_resource_add_bulk_move after OOM on Navi32", Ubuntu bug 2168554 ("any amdgpu system that swaps out GPU memory is exposed, APU or dGPU") and drm/amd issue 5387, which has APU reporters. Those are Oops cases on other hardware. On this APU the same defect shows up as a permanent lock convoy without an Oops.

Additional observation, probably a separate bug but part of the same user impact: after the hung game process was killed, the session did not recover. The last game frame stayed on screen, and at 22:47:43 gamescope aborted:

gamescope-session[1543]: gamescope: types/seat/wlr_seat_keyboard.c:309: wlr_seat_keyboard_notify_enter: Assertion `surface' failed.
systemd-coredump[97733]: Process 1543 (gamescope-wl) of user 1000 terminated abnormally with signal 6/ABRT

The device then showed a frozen image and needed a full power cycle. Filed separately with the coredump and stack traces: #3071.

Steps for reproducing this issue:
  1. Start Cyberpunk 2077 (AppID 1091500) through Proton 11.0 with textures Low, FSR2 Performance at 1024x768, no RT, no frame generation, uncapped FPS on a 90 Hz display with the limiter disabled.
  2. Play for roughly an hour while the game's GPU buffers grow.
  3. Watch /sys/class/drm/card0/device/mem_info_gtt_used reach about 8.2 GB of 8.2 GB and mem_info_vram_used reach about 1 GB of 1 GB. MemAvailable falls below 0.5 GB with several GB in zram swap.
  4. Frame rate degrades from 60-90 FPS to 30 and then 20 in the same scene.
  5. The game freezes permanently. journalctl -k prints the hung task reports above and the GPU stays idle at 200 MHz.
Request

Please backport fcfe647 / 1169fe8c11ca into linux-neptune-72, or tell me which linux-neptune-72 package first carries it. I can test a Beta or Preview image on this Deck and report whether the hang still reproduces, and I can build a patched ttm.ko out of tree for a direct before/after comparison if that helps.

Gist with the full journalctl -k -b excerpt around the hung task reports, lspci -v, lsb_release -a, package versions and journalctl -b -u earlyoom (no OOM kill): https://gist.github.com/basuev/25ef7c42979163726c4c59afa9a784c3

I have not uploaded a Steam system report yet. Tell me if you need one and I will create it from this device.

Lingua principale
Nessun dato sulla lingua
Stelle
2.7k
Fork
89
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ValveSoftware/SteamOS

Tutte le issue di ValveSoftware/SteamOS

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.