[BUG] Claude Code System Hang
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
claudecommand - 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
- System Hangs: Complete system freeze requiring hard reboot
- Reboot Pattern: Multiple rapid reboots (3 reboots within 10 minutes observed)
- Trigger: Specifically occurs when running Claude Code CLI
- 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:
- Force Intel GPU only for Claude:
``bash``
DRI_PRIME=0 claude
- Switch entire system to Intel-only (not ideal):
``bash``
sudo prime-select intel
- 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:
- Run without GPU acceleration by default
- Not interfere with hybrid graphics systems
- Not cause DRM modeset ownership conflicts
Reproduction Steps
- Have Ubuntu 24.04 with hybrid Intel+NVIDIA graphics
- Set
prime-select on-demand - Run
claudecommand - 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:
- Explicitly disable GPU acceleration in Node.js
- Not attempt to grab DRM modeset ownership
- Run in pure CPU mode for CLI operations
- Add
--disable-gpuflag 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
- Boot computer
- Run claude code
- Do a bit of work; can be minutes, can be hours.
- 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_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗