четверг

[Bug 2144854] Re: Charging, Samsung Galaxy Book4 (NP750XGK). regression?

** Tags added: kernel-daily-bug

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2144854

Title:
Charging, Samsung Galaxy Book4 (NP750XGK). regression?

Status in linux package in Ubuntu:
New

Bug description:
================================================================================
CANONICAL BUG REPORT
USB-C Power Delivery Regression on Samsung Galaxy Book4 (NP750XGK)
Kernel 6.17.0-19-generic / Ubuntu 25.10 (Questing)
================================================================================
Date: 2026-03-18
Reporter: Dr. Brian King
System: Samsung Galaxy Book4, NP750XGK-KS2US
OS: Ubuntu 25.10 (Questing)
Kernel: 6.17.0-19-generic
Last known good kernel: 6.17.0-12-generic

--------------------------------------------------------------------------------
EXECUTIVE SUMMARY
--------------------------------------------------------------------------------
USB-C Power Delivery (PD) negotiation is severely degraded under kernel
6.17.0-19-generic on the Samsung Galaxy Book4 (NP750XGK). The system charges
at approximately 27W instead of the rated 45W minimum, and the UCSI power
supply sysfs node reports VOLTAGE_NOW=0, VOLTAGE_MAX=0, and CURRENT_MAX=0.
The UCSI command/response cycle returns all zeros via debugfs. The regression
was introduced between kernel 6.17.0-12 and 6.17.0-19.

Extensive investigation revealed two separate bugs contributing to this
regression, both with identified patches. A third deeper issue — the UCSI
command/response cycle returning all zeros — remains unresolved and is the
primary blocker for full PD negotiation.

--------------------------------------------------------------------------------
HARDWARE
--------------------------------------------------------------------------------
System manufacturer: SAMSUNG ELECTRONICS CO., LTD.
Product name: 750XGK
Product family: Galaxy Book4
System version: P02CFP
BIOS: P02CFP.015.240409.HQ (04/09/2024)
Battery: SAMSUNG Electronics SR Real Battery
Design capacity: 3530 mAh / 54 Wh
Chemistry: Li-ion, Nominal voltage: 15.4V
Charger: Samsung OEM USB-C (65W rated, 20V/3.25A)
Charging port: USB-C (UCSI, PD and PPS capable)

--------------------------------------------------------------------------------
KERNEL VERSIONS
--------------------------------------------------------------------------------
Affected: 6.17.0-19-generic (installed 2026-03-16)
Not affected: 6.17.0-12-generic (removed 2026-03-18, no longer available)

--------------------------------------------------------------------------------
SYMPTOMS
--------------------------------------------------------------------------------
1. USB-C charging voltage negotiates to ~15.8V instead of 20V
- Actual power delivery: ~27W (observed: 1.7A x 15.8V)
- Expected power delivery: 45W minimum (20V x 2.25A)

2. UCSI power supply sysfs reports zeroed voltage data:
POWER_SUPPLY_VOLTAGE_MAX=0
POWER_SUPPLY_VOLTAGE_MIN=0
POWER_SUPPLY_VOLTAGE_NOW=0
POWER_SUPPLY_CURRENT_MAX=0
(Despite POWER_SUPPLY_CURRENT_NOW=2250000 and USB_TYPE=C [PD] PD_PPS)

3. UCSI debugfs interface returns all zeros:
/sys/kernel/debug/usb/ucsi/USBC000:00/vbus_voltage = 0 mV
/sys/kernel/debug/usb/ucsi/USBC000:00/avg_current = 0 mA
/sys/kernel/debug/usb/ucsi/USBC000:00/response = 0x0000...0000

4. Zero UCSI/typec messages in dmesg at boot — PD negotiation events are
not logged, indicating silent failure in the UCSI initialization path.

5. Slower-than-expected charging when system is powered off, suggesting
the embedded controller (EC) charging profile is not properly initialized
during shutdown/handoff.

6. samsung-galaxybook platform driver logs repeated unknown ACPI
notification events:
samsung-galaxybook SAM0430:00: unknown ACPI notification event: 0x71
(firing approximately every 60-90 seconds)

--------------------------------------------------------------------------------
ROOT CAUSE ANALYSIS
--------------------------------------------------------------------------------
The Samsung Galaxy Book4 uses a non-standard UCSI implementation that routes
all communication through the Embedded Controller (EC) via ACPI _DSM methods
(UUID: 6f8398c2-7ca4-11e4-ad36-631042b5008f). The DSDT defines a UBTC device
at \_SB.UBTC with:
- A shared memory region at physical address 0x40238E18
- DSM Case 1: OPM write (kernel -> EC via MGO registers)
- DSM Case 2: OPM read (EC -> kernel via MGI/CCI registers)
- A UCEV method that reads EC state and fires Notify(UBTC, 0x80)

Three issues were identified:

ISSUE 1: Missing Samsung DMI quirk in ucsi_acpi.c
The ucsi_acpi driver contains a quirk table for LG gram laptops
(ucsi_gram_ops) that handles bogus PDOS_CHANGE events after GET_PDOS.
Samsung Galaxy Book4 uses the identical EC-routed UCSI architecture and
exhibits the same bogus event behavior, but is absent from the quirk table.
Without ucsi_gram_ops, spurious POWER_LEVEL_CHANGE | PDOS_CHANGE events
after GET_PDOS cause the kernel to re-trigger connector status checks that
interfere with PDO data population.

FILE: drivers/usb/typec/ucsi/ucsi_acpi.c
FIX: Add Samsung Galaxy Book4 to ucsi_acpi_quirks[] DMI table

ISSUE 2: Unhandled ACPI notification event 0x71 in samsung-galaxybook driver
The samsung-galaxybook platform driver (SAM0430) handles ACPI notification
events 0x61, 0x6c, 0x6d, and 0x70, but does not handle 0x71. This event
fires repeatedly (~every 60-90 seconds) and appears to be a USB-C PD power
state change notification. When unhandled, the UCEV ACPI method (which
triggers UCSI connector status refresh) is never called in response to
charger state changes.

FILE: drivers/platform/x86/samsung-galaxybook.c
FIX: Add case for 0x71 that calls acpi_evaluate_object(UCEV)

ISSUE 3: UCSI command/response cycle returning all zeros (PRIMARY BUG)
Even with the above patches applied, the UCSI debugfs interface returns
all zeros for vbus_voltage, avg_current, and response. GET_CONNECTOR_STATUS
commands return no data. This indicates the DSM read path (Case 2) is not
functioning correctly — the EC response is either not being requested or
not being read back at the right time. This is the primary regression
between -12 and -19 and the root cause of src_pdos never being populated.

The likely location is in how ucsi_acpi_poll_cci() vs ucsi_acpi_read_cci()
are called, or a timing change in how the driver waits for EC responses
via the DSM interface. Without the -12 kernel source for comparison,
the exact commit introducing this regression could not be identified.

--------------------------------------------------------------------------------
PATCHES DEVELOPED
--------------------------------------------------------------------------------

PATCH 1: drivers/usb/typec/ucsi/ucsi_acpi.c
Add Samsung Galaxy Book4 to ucsi_acpi_quirks DMI table.

--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -146,6 +146,14 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
.driver_data = (void *)&ucsi_gram_ops,
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Galaxy Book4"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "750XGK"),
+ },
+ .driver_data = (void *)&ucsi_gram_ops,
+ },
{ }
};

PATCH 2: drivers/platform/x86/samsung-galaxybook.c
Add handling for ACPI notification event 0x71 (USB-C PD state change).

--- a/drivers/platform/x86/samsung-galaxybook.c
+++ b/drivers/platform/x86/samsung-galaxybook.c
@@ -199,6 +199,7 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = {
#define GB_ACPI_NOTIFY_HOTKEY_PERFORMANCE_MODE 0x70
+#define GB_ACPI_NOTIFY_USB_PD_STATE_CHANGED 0x71

@@ -1256,6 +1256,13 @@ static void galaxybook_acpi_notify(...)
case GB_ACPI_NOTIFY_HOTKEY_PERFORMANCE_MODE:
if (galaxybook->has_performance_mode)
platform_profile_cycle();
break;
+ case GB_ACPI_NOTIFY_USB_PD_STATE_CHANGED:
+ {
+ acpi_handle ubtc_handle;
+ if (ACPI_SUCCESS(acpi_get_handle(NULL, "\\_SB.UBTC", &ubtc_handle)))
+ acpi_evaluate_object(ubtc_handle, "UCEV", NULL, NULL);
+ break;
+ }
default:

--------------------------------------------------------------------------------
WORKAROUND
--------------------------------------------------------------------------------
Reloading the ucsi_acpi module after boot partially restores charging:

sudo modprobe -r ucsi_acpi && sudo modprobe ucsi_acpi

This brings charging to approximately 27W. It does not fully restore rated
wattage but is better than the initial degraded state. A systemd oneshot
service can automate this at boot:

[Unit]
Description=Reset UCSI ACPI for USB-C PD negotiation
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'modprobe -r ucsi_acpi && modprobe ucsi_acpi'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

--------------------------------------------------------------------------------
KEY SYSFS DATA
--------------------------------------------------------------------------------
BAT1 uevent (while charging):
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_VOLTAGE_NOW=16316000 (16.3V — should be ~20V under PD)
POWER_SUPPLY_CURRENT_NOW=1668000 (1.67A)
Calculated actual wattage: ~27.2W
Expected wattage: 45W minimum

ucsi-source-psy-USBC000:002 uevent:
POWER_SUPPLY_CHARGE_TYPE=Standard (should be Fast)
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_MAX=0 (BUG)
POWER_SUPPLY_VOLTAGE_MIN=0 (BUG)
POWER_SUPPLY_VOLTAGE_NOW=0 (BUG)
POWER_SUPPLY_CURRENT_MAX=0 (BUG)
POWER_SUPPLY_CURRENT_NOW=2250000 (correct — 2.25A rated)
POWER_SUPPLY_USB_TYPE=C [PD] PD_PPS (correct — PD/PPS supported)

Power supply nodes present:
ADP1 BAT1 ucsi-source-psy-USBC000:001 ucsi-source-psy-USBC000:002

UCSI debugfs (USBC000:00):
vbus_voltage = 0 mV
avg_current = 0 mA
response = 0x00000000000000000000000000000000

--------------------------------------------------------------------------------
DSDT ANALYSIS
--------------------------------------------------------------------------------
The UCSI device (\_SB.UBTC) uses HID USBC000 / CID PNP0CA0 and communicates
via a Samsung-specific _DSM (UUID 6f8398c2-7ca4-11e4-ad36-631042b5008f):
- Case 0: Capabilities (returns 0x0F)
- Case 1: OPM write — copies MGO/CTL registers to EC, sets UCIT=1
- Case 2: OPM read — copies MGI/CCI registers from EC to shared memory

The UCEV method reads EC state (MGI/CCI) and fires Notify(UBTC, 0x80),
which is the standard mechanism to trigger UCSI connector status refresh.
This method is currently never called because the 0x71 notification that
should trigger it is unhandled.

--------------------------------------------------------------------------------
SUGGESTED BISECT RANGE
--------------------------------------------------------------------------------
Good: 6.17.0-12-generic (Ubuntu package: 6.17.0-12.12)
Bad: 6.17.0-19-generic (Ubuntu package: 6.17.0-19.19)

Primary suspects:
drivers/usb/typec/ucsi/ucsi_acpi.c — DSM read/write sequencing
drivers/usb/typec/ucsi/ucsi.c — poll_cci vs read_cci usage
drivers/platform/x86/samsung-galaxybook.c — missing 0x71 handler

Upstream maintainer:
Heikki Krogerus <heikki.krogerus@linux.intel.com> (UCSI)
Joshua Grisham <josh@joshuagrisham.com> (samsung-galaxybook)

--------------------------------------------------------------------------------
HOW TO REPRODUCE
--------------------------------------------------------------------------------
1. Install kernel 6.17.0-19-generic on Ubuntu 25.10
2. Boot Samsung Galaxy Book4 NP750XGK with Samsung OEM 65W USB-C charger
3. Check:
cat /sys/class/power_supply/ucsi-source-psy-USBC000:002/voltage_now
# Returns 0 (expected: ~20000000)
cat /sys/kernel/debug/usb/ucsi/USBC000:00/response
# Returns all zeros (expected: connector status data)
4. Observe charging voltage ~15.8V instead of 20V via:
cat /sys/class/power_supply/BAT1/voltage_now
cat /sys/class/power_supply/BAT1/current_now
# Multiply: should be ~45W, actual ~27W

--------------------------------------------------------------------------------
ADDITIONAL CONTEXT
--------------------------------------------------------------------------------
- TLP 1.8.0 installed but charge thresholds unconfigured (not the cause)
- Battery health: 91.2% capacity at 258 cycles (not a factor)
- Secure Boot: enabled (patched modules require MOK signing)
- The samsung-galaxybook driver was new/significantly updated for this
hardware class — interactions between it and ucsi_acpi may not have
been fully tested on kernel -19
- Reporter is available to test patches, provide additional diagnostics,
or run bisect builds

--------------------------------------------------------------------------------
FILING INSTRUCTIONS
--------------------------------------------------------------------------------
Ubuntu Launchpad: ubuntu-bug linux (auto-collects system info)
Tag: regression, usb-c, charging, ucsi, samsung

Kernel bugzilla: https://bugzilla.kernel.org
Product: Drivers / Component: USB
CC: heikki.krogerus@linux.intel.com
CC: josh@joshuagrisham.com

================================================================================
END OF REPORT
================================================================================

ProblemType: Bug
DistroRelease: Ubuntu 25.10
Package: linux-image-6.17.0-19-generic 6.17.0-19.19
ProcVersionSignature: Ubuntu 6.17.0-19.19-generic 6.17.13
Uname: Linux 6.17.0-19-generic x86_64
ApportVersion: 2.33.1-0ubuntu3
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: brian 3875 F.... pipewire
brian 3897 F.... wireplumber
/dev/snd/seq: brian 3875 F.... pipewire
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 18 23:03:53 2026
InstallationDate: Installed on 2025-05-23 (299 days ago)
InstallationMedia: Ubuntu 25.04 "Plucky Puffin" - Release amd64 (20250415.3)
MachineType: SAMSUNG ELECTRONICS CO., LTD. 750XGK
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/usr/bin/zsh
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.17.0-19-generic root=UUID=67cdc73c-425b-47f6-a88c-636207de0da4 ro quiet splash lockdown=none resume=UUID=67cdc73c-425b-47f6-a88c-636207de0da4 resume_offset=103645184 i915.enable_dc=0 i915.enable_psr=0 i915.enable_fbc=0 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M vt.handoff=7
RelatedPackageVersions:
firmware-sof N/A
linux-firmware 20250901.git993ff19b-0ubuntu1.9
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/09/2024
dmi.bios.release: 5.27
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: P02CFP.015.240409.HQ
dmi.board.asset.tag: No Asset Tag
dmi.board.name: NP750XGK-KS2US
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: SAMSUNG_SW_REVISION_12345+10.0.22631
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrP02CFP.015.240409.HQ:bd04/09/2024:br5.27:svnSAMSUNGELECTRONICSCO.,LTD.:pn750XGK:pvrP02CFP:rvnSAMSUNGELECTRONICSCO.,LTD.:rnNP750XGK-KS2US:rvrSAMSUNG_SW_REVISION_12345+10.0.22631:cvnSAMSUNGELECTRONICSCO.,LTD.:ct10:cvrN/A:skuSCAI-A5A5-A5A5-RPLU-PCFP:
dmi.product.family: Galaxy Book4
dmi.product.name: 750XGK
dmi.product.sku: SCAI-A5A5-A5A5-RPLU-PCFP
dmi.product.version: P02CFP
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2144854/+subscriptions

Комментариев нет:

Отправить комментарий