laris 发表于 2023-12-30 18:28

【求助】联想Yoga本AMD5800U Yoga休眠自动重启

各位大佬好,笔记本sleep唤醒以后自动重启,找不到问题所在,求助。


1. 现象:点击苹果-》sleep,本子会休眠,风扇停转,然后按键盘唤醒,登陆密码登陆到桌面,过30秒-1分钟,系统自动重启到opencore

2. 笔记本配置: AMD Ryzen 5800U + 16G + 1TB KIOXIA NVMe SSD + AX210, 3 x USB TypeC ports
3. Opencore v0.9.7, macOS Sonoma v14.2 Product set to MBP16,3. opencore config.list附件

-- group1 lilu + nootedred + bfixup for gpu, tested only with lilu (only lilu cannot sleep), lilu+nootedred, reproduce same issue
-- group2 usb: GenericUSBXHCI(AMD ryzen version) + USBToolBox + UTBMap (under win, enable usb2/3 and internal, disable others, list below), test disable all 3 kexts and reproduce same issue.
-- group3 NVMeFix + REstrictEvents + AppleMCEReportDisabler + CpuTscSync + ECEnabler
-- group4 VirtualSMC + SMCBatteryManager+SMCLightSensor+BrightnessKey+SMCSuperIO +RadeonSensor+SMCRadeonGPU+SMCProcessorAMD+YogaSMC
-- group5 VoodooPS2Controller+VoodooI2C+VoodooI2CHID
-- group6 AppleALC
-- group7 AirportItlwm 2.3.0 alpha for intel
-- group8 BlueToolFixup + IntelBTPatcher + IntelBluetoothFirmware v2.3.0

-- spec
Yoga Slim7 Carbon 14ACN6 spec
https://psref.lenovo.com/syspool/Sys/PDF/Yoga/Yoga_Slim_7_Carbon_14ACN6/Yoga_Slim_7_Carbon_14ACN6_Spec.pdf
https://www.lenovo.com/lv/lv/laptops/yoga/yoga-slim-series/Yoga-Slim-7-Carbon-Gen-6-14-inch-AMD/p/LEN101Y0006/

USB map:
--------------------------------------------------------------------------------
XHC0
port 1 u2
port 2 u2/2.0 --> usbc3(right)          3----FS/type-9(usbc usb2/3.x w/i switch)
port 3 u2/2.0 --> internal cam                  ------FS/type-255(internal-usb-ports-like-bt)
port 4 u2
port 5 u3/10G --> usbc1(left-1) 1----SS/10G/type-9(usbc usb3.x w/i sw, 5G cannot flip, 10 can)
port 6 u3/10G --> usbc3(right)          3----SS/5G/type-9(usbc usb2/3.x w/i switch)

XHC1
port 1 u2/2.0 --> usbc2(left-2)    2----FS/type-9(usbc usb2/3.x w/i switch)
port 2 u2
port 3 u2/2.0 --> internal Zephyr for ZhanLu    ------type-255(internal-usb-ports-like-bt)
port 4 u2/1.1 --> internal wifi nic's bt      ------type-255(internal-usb-ports-like-bt)
port 5 u3/10G --> usbc2(left-2)    2----SS/10G/type-9(usbc usb2/3.x w/i switch)
port 6 u3

#######################################################
#                  Edit USB Ports                     #
#######################################################

    ----- XHC0@0,3 Controller -----
[ ]1. HS01 | AppleUSB20XHCIPort |1 (01000000) | 60100000 | Type 3
[#]2. HS02 | AppleUSB20XHCIPort |2 (02000000) | 60200000 | Type 9
    - Cruzer Fit
    - Frescologic USB2.0 HUB
      - AppleUSB20Hub
            - Dell DA310
            - Cruzer Fit
    - DataTraveler 3.0
    - USB 2.0 Hub
            - USB Receiver
            - USB Gaming Keyboard
[#]3. HS03 | AppleUSB20XHCIPort |3 (03000000) | 60300000 | Type 255
    - Integrated Camera
[ ]4. UK04 | AppleUSB20XHCIPort |4 (04000000) | 60400000 | Type 3
[#]5. SS01 | AppleUSB30XHCIPort |5 (05000000) | 60500000 | Type 9
    - DataTraveler 3.0
    - Frescologic USB3.1Gen2 HUB
      - AppleUSB30Hub
            - Cruzer Glide 3.0
            - DataTraveler 3.0
[#]6. SS02 | AppleUSB30XHCIPort |6 (06000000) | 60600000 | Type 9
    - DataTraveler 3.0
    - Frescologic USB3.1Gen2 HUB
      - AppleUSB30Hub
            - USB 10/100/1000 LAN
            - DataTraveler 3.0
            - Cruzer Glide 3.0
    ----- XHC1@0,4 Controller -----
[#]7. UK01 | AppleUSB20XHCIPort |1 (01000000) | 80100000 | Type 9
    - Cruzer Fit
    - DataTraveler 3.0
    - USB 2.0 Hub
      - AppleUSB20Hub
            - USB Receiver
            - USB Gaming Keyboard
[ ]8. UK02 | AppleUSB20XHCIPort |2 (02000000) | 80200000 | Type 3
[#]9. UK03 | AppleUSB20XHCIPort |3 (03000000) | 80300000 | Type 255
    - Zephyr for ZhanLu
[#] 10. UK04 | AppleUSB20XHCIPort |4 (04000000) | 80400000 | Type 255
    - Bluetooth USB Host Controller
[#] 11. UK05 | AppleUSB30XHCIPort |5 (05000000) | 80500000 | Type 9
    - DataTraveler 3.0
[ ] 12. UK06 | AppleUSB30XHCIPort |6 (06000000) | 80600000 | Type 3

Populated:
XHC0: 4, XHC1: 4
------------------------------------------------------------------------------

pmset -g custom
Battery Power:
lowpowermode         1
standbydelayhigh   86400
standbydelaylow      10800
standby            0
proximitywake      0
ttyskeepawake      0
hibernatemode      3
powernap             0
gpuswitch            2
hibernatefile      /var/vm/sleepimage
highstandbythreshold 50
displaysleep         2
sleep                1
tcpkeepalive         0
halfdim            1
lessbright         0
disksleep            10
AC Power:
lowpowermode         0
standbydelayhigh   86400
standbydelaylow      10800
standby            0
proximitywake      0
ttyskeepawake      0
hibernatemode      3
powernap             0
gpuswitch            2
hibernatefile      /var/vm/sleepimage
highstandbythreshold 50
displaysleep         10
womp               0
networkoversleep   0
sleep                0
tcpkeepalive         0
halfdim            1
disksleep            10

tsepangching 发表于 2023-12-30 18:38

崩溃报告呢

laris 发表于 2023-12-30 19:27

本帖最后由 laris 于 2023-12-30 19:40 编辑

关键重启以后没有崩溃报告
现在怀疑是usb的问题
two UTBMap.txt plist files. the *.bak is initial one, the Info.plist is the update one (remove one extra usb ports and Zehpyer device, decrease ports number)

laris 发表于 2023-12-30 20:27

log about wake

pm set -g log | e grep "\b(Sleep |Wake|DarWake|Start)\s{2,}"
2023-12-30 20:15:42 +0800 Start                   powerd process is started                                                      
2023-12-30 20:19:07 +0800 Sleep                   Entering Sleep state due to 'Software Sleep pid=176':TCPKeepAlive=disabled Using AC (Charge:100%) 44 secs
2023-12-30 20:19:51 +0800 Wake                  Wake from Normal Sleep : due to PWRB/User Using AC (Charge:100%)

log show --last 10m | grep -i "Wake reason" | grep -v "not found"2023-12-30 20:18:53.020534+0800 0x3997   Error       0x0                  103    8    powerd: PID 2584 is not entitled to set wake reason
2023-12-30 20:18:53.031727+0800 0x396a   Default   0x0                  90   0    UserEventAgent: (PerfPowerServicesEventListenerPlugin) Could not get wake reason (errno: 2)
2023-12-30 20:19:11.896444+0800 0x79       Default   0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: PWRB (User)
2023-12-30 20:19:11.896446+0800 0x79       Default   0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: PWRB (User)
2023-12-30 20:19:51.004000+0800 0x4a1      Default   0x0                  243    0    airportd: (IO80211) Info: <airport> systemWokenByWiFi: System wake reason: <PWRB>, was not woken by WiFi

laris 发表于 2023-12-30 20:30

更新了log中关于wake的信息
日志代码竟然有关键词,神奇了

laris 发表于 2023-12-31 11:43

顶一下,在discord蹲了一晚上,有哥们帮着查了下也没找出来啥毛病。
关于usb,用UMAF工具禁止xhci0/xhci1,分别禁止,依旧会出现休眠唤醒自动重启,猜测可能不是usb的问题
ResizeGpuBars 查过,AMD5800U应该是不支持,设置默认的-1 disable

没啥思路了

laris 发表于 2024-1-1 16:56

Finally I find I change the BIOS "S3" to "Moderm standby", looks like will not reboot. I remember I changed it for test.

tsepangching 发表于 2024-1-3 09:41

standby是0 怎么能休眠呢?其实笔记本没必要搞休眠,用睡眠就行。

liebao98 发表于 2024-1-3 15:04

每天坚持打卡回贴。

yuning 发表于 2024-1-3 15:28

laris 发表于 2024-1-1 16:56 https://bbs.pcbeta.com/static/image/common/back.gif
Finally I find I change the BIOS "S3" to "Moderm standby", looks like will not reboot. I remember I...

有效?                  

laris 发表于 2024-1-5 16:19

事实上没有效果,还得改成s3才行,改成现代模式其实就是windows支持,macos不支持
s3下,打了GPRW的布丁,还是会自动重启
查了日志,重启以前kernel没有明显crash日志

国外看到一个post也说过5800u有这个问题

ifuyan 发表于 2024-1-18 17:24

3500u开启NootedRed就黑屏怎么处理 不开插件就7MB也加了参数-NRedDPDelay

laris 发表于 2024-5-23 11:11

[[求助USB休眠]修复AMD5800u集显Yoga14sc笔记本-远景论坛-微软极客社区](https://bbs.pcbeta.com/forum.php?mod=viewthread&tid=2003586&page=1&extra=#pid55317295)
页: [1]
查看完整版本: 【求助】联想Yoga本AMD5800U Yoga休眠自动重启