jakeday / linux-surface

Linux Kernel for Surface Devices
2.6k stars 243 forks source link

System hangs after login from wake [qzed's fork] #602

Open StealthBadger747 opened 4 years ago

StealthBadger747 commented 4 years ago

I am running a fresh install of Ubuntu 19.10 on my Surface Book 2 with dGPU (I don't care about it being enabled). I did realize there was releases for qzed's fork so I ran: git clone --depth 1 https://github.com/jqzed/linux-surface.git ~/linux-surface I am not sure if this would have anything to do with the issue, but that is what I did. Later I realized that I still had to press the power button to wake. I then dug around and found that I needed to install from the releases. I installed the three .deb files from the latest release v5.3.8-1 and rebooted.

The issue is I close the lid, wait a few moments, then open the lid. I tap a few keys to wake it. Then I enter my password. It hangs and goes to a black screen. I can then press the power button and it will display a frozen screen. It then fully crashes after a moment and goes into a verbose mode, but it flashes by too quick to actually see what happened. It ends on "systemd-journald[295] : Failed to send stream file descriptor to service manager: Connection refused" "systemd-journald[295] : Failed to send stream file descriptor to service manager: Connection Transport endpoint is not connected"

EDIT: After further investigation I found the following problems:

Here are some relevant logs from one of the crashes.

5:39:09 PM wpa_supplicant: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1/Interfaces/1 5:39:09 PM gnome-session-b: CRITICAL: We failed, but the fail whale is dead. Sorry.... 5:38:41 PM systemd: Failed to start GNOME Wacom handling. 5:38:39 PM kernel: i915 0000:00:02.0: GPU reset not supported 5:38:39 PM kernel: [drm:intel_guc_send_mmio [i915]] ERROR MMIO: GuC action 0x3 failed with error -110 0x3 5:38:21 PM wpa_supplicant: bgscan simple: Failed to enable signal strength monitoring 5:38:15 PM kernel: debugfs: File 'force_bredr_smp' in directory 'hci0' already present! 5:38:15 PM kernel: ipts mei::3e8d0870-271a-4208-8eb5-9acb9402ae04:0F: touch enabled 4 5:38:15 PM kernel: surface_sam_san MSHW0091:00: ETWL(0x01, 0x02): RQST(19, 2, 0) error: 6 5:38:15 PM kernel: usb 1-1.3: device not accepting address 5, error -71 5:38:15 PM kernel: ipts mei::3e8d0870-271a-4208-8eb5-9acb9402ae04:0F: error in reading m2h msg 5:37:43 PM wpa_supplicant: dbus: wpa_dbus_property_changed: no property SessionLength in object /fi/w1/wpa_supplicant1/Interfaces/0 Nov 7 1:21:44 AM pkexec: gdm: The value for the SHELL variable was not found the /etc/shells file [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 1040] Nov 7 1:21:44 AM gdm-session-wor: gkr-pam: unable to locate daemon control file Nov 7 1:21:43 AM pkexec: gdm: The value for the SHELL variable was not found the /etc/shells file [USER=root] [TTY=unknown] [CWD=/var/lib/gdm3] [COMMAND=/usr/lib/gnome-settings-daemon/gsd-backlight-helper /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight 1040] Nov 7 1:21:36 AM kernel: Bluetooth: hci0: unexpected event for opcode 0x0000 Nov 7 1:21:33 AM kernel: ipts mei::3e8d0870-271a-4208-8eb5-9acb9402ae04:0F: touch enabled 4 Nov 7 1:21:33 AM kernel: Problem loading in-kernel X.509 certificate (-22)

EDIT: It seems IPTS related.

StealthBadger747 commented 4 years ago

I have done some more troubleshooting. I found out how to properly install Qzed's fork. I downloaded the source from the latest release. Then ran the setup script. I didn't let it download anything. Instead I downloaded those three .deb files and installed them, although they were already active. I also removed the old apt packages from the 5.3 that was installed.

I also had my laptop in my backpack and it overheated. Before I did this.

I am still able to turn on my laptop with the power button with the lid closed though which might be why the laptop overheats.

I also still have the same wake/suspend problems.

tmarkov commented 4 years ago

I don't really know what causes the error; the IPTS lines in the log saying error in reading m2h msg are normal. Does it happen if you boot into the stock kernel?

Being able to turn on your laptop by pressing power button is normal for linux even with lid closed. Not sure how Windows works there, but honestly wouldn't be surprised if it's the same.

I personally put this right after post) in the /lib/systemd/system-sleep/sleep script to immediately go back to sleep if I ever wake up while the lid is closed:

while [ $(cat /proc/acpi/button/lid/LID0/state | grep closed | wc -l) = 1 ]
    do
      echo $(date) >> /var/log/resuspend
      echo freeze > /sys/power/state
    done
StealthBadger747 commented 4 years ago

@tmarkov I'll look into those logs tomorrow and I'll try the stock kernel.

As to why I think it is IPTS, there were some other logs and crash messages that indicated something to do with it, but I could just be misinterpreting.

I've been using 18.04 for a few months now on Jakeday and if I press the power button with the lid closed it does nothing, so I thought this would be the ideal behavior. My surface book 2 has the power button exposed on the outside and it is easily bumped. I had this issue before with that install, but I forgot how I fixed it. I think part of my issues were solved by https://github.com/qzed/linux-surfacebook2-mshw0153 but this is already included in Qzed's fork to my understanding.