[BUG] Claude Code System Hang

Resolved 💬 4 comments Opened Sep 20, 2025 by GaryDean Closed Jan 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code System Hang Bug Report

Issue Summary

Claude Code CLI (v1.0.120) causes complete system hangs/freezes on hybrid Intel+NVIDIA GPU systems, forcing hard reboots.

Timeline

  • Issue started: Approximately 1 month ago (mid-August 2025)
  • Frequency: Occurs consistently when running claude command
  • Pattern: System hangs within minutes of starting Claude Code

System Information

Hardware

  • Model: Lenovo Legion Pro 5 16IRX8 (82WK)
  • CPU: 13th Gen Intel Core i9-13900HX (32 cores)
  • RAM: 32GB
  • GPU: Hybrid setup:
  • Intel Raptor Lake-S UHD Graphics (integrated)
  • NVIDIA GeForce RTX 4070 Laptop GPU (discrete)

Software

  • OS: Ubuntu 24.04.3 LTS
  • Kernel: 6.8.0-83-generic
  • NVIDIA Driver: 550.163.01
  • Display Manager: GDM3 46.2-1ubuntu1
  • Node.js: v22.19.0
  • Claude Code: v1.0.120
  • Graphics Mode: prime-select on-demand (hybrid)

Symptoms

  1. System Hangs: Complete system freeze requiring hard reboot
  2. Reboot Pattern: Multiple rapid reboots (3 reboots within 10 minutes observed)
  3. Trigger: Specifically occurs when running Claude Code CLI
  4. No other apps affected: System stable with all other applications

Root Cause Analysis

Critical Error Messages

[drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership

This error repeats 9+ times when Claude Code runs.

Additional Errors

(WW) NVIDIA(G0): Failed to set the display configuration
(WW) NVIDIA(G0):  - Setting a mode on head 0 failed: Insufficient permissions
(WW) NVIDIA(G0):  - Setting a mode on head 1 failed: Insufficient permissions
(WW) NVIDIA(G0):  - Setting a mode on head 2 failed: Insufficient permissions
(WW) NVIDIA(G0):  - Setting a mode on head 3 failed: Insufficient permissions

Technical Details

Process Information

  • Claude Code runs as Node.js application: /usr/lib/node_modules/@anthropic-ai/claude-code/cli.js
  • Process typically uses ~260MB RAM
  • No direct GPU memory allocation observed
  • Running under X11 (not Wayland)

Configuration Conflicts Found

Initially had conflicting kernel parameters:

  • /etc/modprobe.d/nvidia-graphics-drivers.conf: nvidia-drm modeset=1
  • /etc/default/grub: nvidia-drm.modeset=0

This was resolved but hangs persisted, indicating the issue is with Claude Code's GPU interaction.

Workarounds

Temporary Solutions That Work:

  1. Force Intel GPU only for Claude:

``bash
DRI_PRIME=0 claude
``

  1. Switch entire system to Intel-only (not ideal):

``bash
sudo prime-select intel
``

  1. Disable GPU acceleration for Node.js:

``bash
export NODE_OPTIONS='--disable-gpu'
``

Expected Behavior

A CLI tool should not trigger GPU switching or require GPU resources. Claude Code should:

  1. Run without GPU acceleration by default
  2. Not interfere with hybrid graphics systems
  3. Not cause DRM modeset ownership conflicts

Reproduction Steps

  1. Have Ubuntu 24.04 with hybrid Intel+NVIDIA graphics
  2. Set prime-select on-demand
  3. Run claude command
  4. System hangs within minutes

Impact

  • Makes Claude Code unusable on hybrid GPU laptops
  • Requires users to disable expensive discrete GPUs
  • Causes data loss from forced reboots
  • Affects productivity significantly

Suggested Fix

Claude Code should:

  1. Explicitly disable GPU acceleration in Node.js
  2. Not attempt to grab DRM modeset ownership
  3. Run in pure CPU mode for CLI operations
  4. Add --disable-gpu flag by default or detect hybrid graphics

Additional Notes

  • Issue may be related to recent Electron/Chromium components in Node.js
  • Problem appears specific to hybrid graphics configurations
  • Secure Boot status does not affect the issue (tested both enabled/disabled)

---
Reported: September 20, 2025
Claude Code Version: 1.0.120
Affected Systems: Hybrid Intel+NVIDIA GPU laptops running Ubuntu 24.04

What Should Happen?

System should not hang.

Error Messages/Logs

Steps to Reproduce

  1. Boot computer
  2. Run claude code
  3. Do a bit of work; can be minutes, can be hours.
  4. Hang

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.0.120

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗