Showing posts with label Hardware. Show all posts
Showing posts with label Hardware. Show all posts

Sunday, September 27, 2026

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX 1050 / 1050 Ti (Pascal architecture), you may have encountered an infuriating problem: putting the laptop to sleep causes an abrupt reboot, either about 14 seconds into sleep or the moment you open the lid to wake it up.

For months, the standard advice across Linux forums has been to "switch to hibernate," "disable sleep entirely," or "turn off the NVIDIA card." None of those are real fixes. Instead of giving up on proper S3 sleep, I paired with Google Antigravity—an agentic AI assistant capable of running system diagnostics and kernel-level debugging—to investigate the root cause down to the ACPI firmware bytecode. Here is what was actually causing the failure, and the permanent 4-step fix that resolved it.


The Symptoms: Unclean Reboots During Sleep

Analyzing system logs across 24 boots on Ubuntu with kernel 7.0.0-generic and the NVIDIA proprietary driver (580 series) revealed 15 boots that ended in an unclean hard reset:

  • Pattern A (14-second watchdog reset): The laptop entered S3 deep sleep (PM: suspend entry (deep)). Exactly 14.3 seconds later, the hardware watchdog tripped an immediate reset. The laptop would reboot and sit unattended at the GDM login screen for hours.
  • Pattern B (Overnight wake reset): The laptop stayed asleep in S3 through the night, but the instant the lid was opened or power button pressed in the morning, the machine suffered a hard reset during S3 resume.

The Culprit Found by Antigravity: Dell BIOS ACPI AML Bug

Antigravity inspected the kernel journal, PCI subsystem states, and decompiled the laptop's ACPI tables (DSDT and SSDT3 / PegSsdt). It uncovered a critical firmware bug in Dell's CBX3 BIOS when Linux transitions the PCIe Root Port (0000:00:01.0 / \_SB.PCI0.PEG0) into D3cold:

  1. Entering D3cold: When putting the machine to sleep, Linux places the PCIe root port into D3cold, evaluating Dell's ACPI method PG00._OFF(), which cuts GPU rail GPIO power and marks the power resource as off (PG00._STA = 0).
  2. The Infinite Loop on Resume: Upon waking, Linux calls PG00._ON() during early device resume (dpm_resume_noirq) with interrupts disabled. In Dell's bytecode, PGON(0) checks if the power rail GPIO is high. Because firmware already re-powered the rail, it returns early without re-enabling or retraining the PCIe link!
  3. Immediately after, PG00._ON() executes:
    While ((VEID != 0x10DE))
    {
        Sleep (One)
    }
    Because the link was never retrained, reading VEID (the NVIDIA PCI Vendor ID) over MMIO returns 0xFFFF. The kernel hangs forever in this infinite loop until the Linux NMI watchdog resets the system ~14 seconds later!
Why doesn't this happen in Windows? Windows does not transition the parent PCIe root port into ACPI D3cold during S3 sleep; it leaves it in D3hot, keeping PG00 powered on and completely avoiding the buggy BIOS AML loop.

Additionally, Antigravity identified two secondary conflicts on modern Ubuntu:

  • systemd-sleep user session freezing: systemd-sleep freezes user.slice before suspend and keeps it frozen while NVIDIA's post-resume scripts try to switch virtual terminals (chvt 2), deadlocking against gnome-shell under Wayland.
  • Conflicting DRM framebuffers: The NVIDIA module defaulted to nvidia_drm.fbdev=1, creating a competing fb0: nvidia-drmdrmfb alongside Intel's i915drmfb during atomic KMS modesetting.

The 4-Step Solution

To eliminate these issues cleanly and permanently, Antigravity implemented four targeted adjustments:

1. Prevent D3cold via Persistent Udev Rule

By forcing d3cold_allowed=0 and power/control=on across the PCIe Root Port and the NVIDIA devices, Linux keeps them in D3hot during S3 suspend. ACPI power resource PG00 remains on, completely bypassing the buggy While (VEID != 0x10DE) code path.

Create /etc/udev/rules.d/80-nvidia-pm-fix.rules:

# Prevent D3cold (buggy ACPI PG00._OFF / PG00._ON infinite VEID loop in SSDT3)
# on Intel PCIe Root Port PEG0 (0000:00:01.0) and NVIDIA GTX 1050 Ti (0000:01:00.0 / 0000:01:00.1)
ACTION=="add|bind|change", SUBSYSTEM=="pci", KERNEL=="0000:00:01.0", ATTR{d3cold_allowed}="0", ATTR{power/control}="on", ATTR{power/wakeup}="disabled"
ACTION=="add|bind|change", SUBSYSTEM=="pci", KERNEL=="0000:01:00.0", ATTR{d3cold_allowed}="0", ATTR{power/control}="on"
ACTION=="add|bind|change", SUBSYSTEM=="pci", KERNEL=="0000:01:00.1", ATTR{d3cold_allowed}="0", ATTR{power/control}="on"

2. Disable Spurious PEG0 ACPI Wakeups via Systemd

Create a oneshot systemd service at /etc/systemd/system/disable-peg0-wakeup.service:

[Unit]
Description=Disable ACPI wakeup on PEG0 and keep NVIDIA power states consistent
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'if grep -q "^PEG0.*\*enabled" /proc/acpi/wakeup; then echo PEG0 > /proc/acpi/wakeup; fi; for dev in 0000:00:01.0 0000:01:00.0 0000:01:00.1; do [ -d "/sys/bus/pci/devices/$dev" ] && echo 0 > "/sys/bus/pci/devices/$dev/d3cold_allowed" 2>/dev/null && echo on > "/sys/bus/pci/devices/$dev/power/control" 2>/dev/null; done'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable --now disable-peg0-wakeup.service

3. Prevent User Session Freezing Before NVIDIA Resume

Prevent systemd-sleep from deadlocking frozen user sessions during VT switches:

for svc in systemd-suspend.service systemd-hibernate.service systemd-suspend-then-hibernate.service; do
    sudo mkdir -p "/etc/systemd/system/${svc}.d"
    echo -e '[Service]
Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"' | sudo tee "/etc/systemd/system/${svc}.d/override.conf"
done

4. Set nvidia_drm fbdev=0 and Update Initramfs

In /etc/modprobe.d/nvidia-graphics-drivers-kms.conf, set:

options nvidia_drm modeset=1 fbdev=0
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var

Then rebuild initramfs and reboot:

sudo update-initramfs -u -k all
sudo reboot

Verification: 11+ Hours of Clean Overnight Sleep

After applying the fix and rebooting into kernel 7.0.0-34-generic, we ran multiple sleep tests. The system journal confirmed:

  • Test 1 (Short sleep): Slept 35 seconds → resumed cleanly.
  • Test 2 (Medium sleep): Slept 1 hour 38 minutes → resumed cleanly.
  • Test 3 (Overnight test): Slept in S3 deep sleep for 11 hours and 20 minutes continuously → woke up instantly with zero crashes, zero resets, and both internal display and external HDMI functioning perfectly!

Final Thoughts on AI-Assisted Troubleshooting

Hardware power management issues on Linux often feel like impenetrable black boxes. Working with Google Antigravity showed the real power of pairing with an autonomous AI: rather than relying on generic recommendations, it analyzed the exact system journal timestamps, decompiled Dell's ACPI tables, identified the exact assembly instruction causing the hang, and generated a tailored, verified fix.

If you are struggling with unexplained sleep reboots on a Dell Inspiron 7567 or similar Pascal-era hybrid graphics laptop, give this 4-step configuration a try!

Monday, June 7, 2021

TD-LTE Router In-Depth Comparison: AirMaster 3100V vs GreenPacket DT-350

Evaluating indoor TD-LTE desktop modems for Band 42 (3500 MHz) deployments requires comparing RF sensitivity, throughput stability under weak signal conditions, and hardware VoIP capabilities. Here is an empirical comparison between the AirMaster 3100V and the GreenPacket DT-350.

Tested Models: AirMaster 3100V (Firmware V2.0.0B31) • GreenPacket DT-350 (Unlocked Band 42 SIMs)

Key Findings and Benchmark Summary

Feature AirMaster 3100V GreenPacket DT-350
VoIP Hardware No FXS RJ-11 port Built-in SIP client & RJ-11 port
Wi-Fi Performance 802.11n 300Mbps 802.11n 300Mbps
Weak Signal Stability Superior antenna gain (RSRP stability) Moderate gain; benefits from external SMA antennas
Firmware Flexibility Clean web management Requires unlocking for full VoIP/APN menus

Recommendation: If telephone VoIP handset integration is required, the GreenPacket DT-350 is the clear choice. For raw RF reception in fringe coverage areas, the AirMaster 3100V delivers more consistent speeds.

Tuesday, May 11, 2021

Building a Dedicated Jitsi Meet Video Conferencing Station on Raspberry Pi 4

Using a Raspberry Pi 4 connected directly to an HDMI living room TV with an external USB webcam creates a dedicated, affordable family video-conferencing terminal. However, running WebRTC in standard Chromium on ARM without optimizations often causes CPU throttling, audio noise, and meeting lag.

Optimal Hardware Choices: Raspberry Pi 4 (4GB) • Logitech C920 / C922 / C270 USB Webcam • Micro-HDMI to HDMI audio

Critical Hardware & Audio Points

  • Microphone Input: The Raspberry Pi 4's 3.5mm onboard jack is output only (no microphone input pin). Connecting standard headset microphones requires either an external USB audio dongle or a webcam with integrated noise-cancelling microphones (e.g. Logitech C920).
  • Audio Routing: Configure ALSA/PulseAudio to output conference sound through HDMI to your TV speakers while capturing voice from the USB webcam microphone.

Chromium Performance Optimizations for WebRTC

Launch Chromium in kiosk mode with hardware GPU acceleration flags:

chromium-browser --kiosk --start-fullscreen   --enable-accelerated-video-decode   --use-gl=egl   --ignore-gpu-blocklist   --autoplay-policy=no-user-gesture-required   "https://meet.jit.si/YourPrivateRoom#config.startWithVideoMuted=false"

Tuesday, December 22, 2020

[Solved] Proxmox 6.3 DHCP Error on Huawei RH2288 V3 Servers: No Working Lease in Persistent Database

When booting the Proxmox VE 6.x installer on enterprise Huawei FusionServer RH2288 V3 rack servers, the graphical installation aborts and drops into a debug shell with the error: No working lease in persistent database.

Root Cause: Kernel framebuffer conflict with Huawei integrated server graphics (BMC) and IOMMU initialization.

Step-by-Step Resolution

  1. At the Proxmox GRUB boot menu, press e to edit the boot entry.
  2. Locate the linux kernel line and append the following kernel parameters:
    modprobe.blacklist=nouveau amd_iommu=on video=efifb:off
  3. Press Ctrl+X or F10 to boot.

Assigning Static IP in Debug Shell (If DHCP is Unavailable)

If your datacenter environment does not offer DHCP on the management network, configure network parameters directly in the debug prompt:

ip addr add 192.168.1.50/24 dev enp2s0f0
ip route add default via 192.168.1.1 dev enp2s0f0
echo "nameserver 1.1.1.1" > /etc/resolv.conf

Sunday, December 13, 2020

Connecting USB GSM / 3G / 4G Dongles to Raspberry Pi 4 (Huawei E303, usb-modeswitch, and Gammu)

USB cellular modems (such as the ubiquitous Huawei E303, E173, and E3372) enable Raspberry Pi 4 projects to send SMS notifications, handle emergency alerts, and provide cellular backup connectivity. However, modern USB modems initially boot into a virtual CD-ROM storage mode (ZeroCD) to deliver Windows drivers, requiring usb-modeswitch to toggle them into serial modem mode.

Hardware: Raspberry Pi 4 • Huawei E303 USB Dongle • usb-modeswitch • Gammu SMS Gateway

1. Installing usb-modeswitch and Gammu

sudo apt-get update
sudo apt-get install usb-modeswitch usb-modeswitch-data gammu minicom -y

2. Switching from Mass Storage to Modem Mode

Check lsusb to identify your device vendor and product ID:

# Example: ID 12d1:1f01 (Mass Storage Mode)
lsusb | grep Huawei

# Mode-switch into serial modem mode (12d1:1001 or 12d1:14db):
sudo usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000011062000000100000000000000000000'

Confirm the modem serial nodes are created under /dev/ttyUSB0, /dev/ttyUSB1, and /dev/ttyUSB2.

3. Sending a Test SMS via Gammu

Configure ~/.gammurc:

[gammu]
port = /dev/ttyUSB0
connection = at115200

Send an automated test message:

echo "Alert: Raspberry Pi online!" | gammu sendsms TEXT +1234567890

Wednesday, April 15, 2020

How to Configure VoIP SIP Settings on GreenPacket DT-350 4G Routers

The GreenPacket DT-350 TD-LTE indoor router includes an integrated hardware VoIP FXS port (RJ-11) for connecting analog telephone handsets directly to SIP servers (such as Asterisk, FreePBX, or telecom IMS gateways). However, on many telecom-branded firmwares (such as Irancell), the VoIP menu is hidden from standard administrative accounts.

Hardware: GreenPacket DT-350 TD-LTE Router • RJ-11 POTS Handset • SIP Protocol

1. Accessing Hidden VoIP Menus

Log in with the root/operator credentials (or inspect the web GUI source to reveal hidden navigation items under /voip_settings.html or /sip.html).

2. SIP Account Configuration

SIP Proxy / Registrar: YOUR.PBX.SERVER.IP
Port: 5060
SIP Transport: UDP
Outbound Proxy: (Optional, set if behind telecom NAT)
Account / Display Name: 101
Authentication Username: 101
Secret / Password: YOUR_SIP_SECRET
Codec Priority: G.711u (PCMU), G.711a (PCMA), G.729

Save and apply settings. Once registered, the Phone LED on the router faceplate illuminates solid green, and connected analog handsets will receive dial tone.

Sunday, March 29, 2020

Fixing Lantronix Spider KVM Java Security Errors: Using the Native Standalone Client

When accessing remote datacenter servers via Lantronix Spider KVM-over-IP devices, modern Java Runtime Environments (Java 7, 8, and newer) block the JNLP applet with strict security exceptions like "unsigned application requesting unrestricted access to system". Adjusting Java deployment security rules and exception lists frequently fails.

Solution: Replace browser-based Java Web Start with Lantronix's official SpiderControl native standalone client.

Direct Native Client Download

Lantronix provides native standalone binaries that connect directly to the Spider KVM without requiring Java or browser plugins:

  • Download the official SpiderControl standalone application for Windows, Linux, or macOS from Lantronix support.
  • Launch the client, enter the Spider's IP address, username, and password.
  • The native client supports virtual media mounting (ISO redirection), low-latency mouse synchronization, and native resolution scaling without certificate validation errors.

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...