New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the automatically wake up on surface pro6 #525
Comments
BTW, if you want hibernate to work properly, you need to set the swap file or swap partition big enough to handle this task(double size of your physical RAM is usually recommanded), and follow the instruction in the |
For the wifi and bluetooth problems, we can simply add systemctl restart NetworkManager to the #!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution bits.
#
# By default this script does nothing.
# Disable the XHC device in the wakeup list.
echo XHC | tee /proc/acpi/wakeup
# Restart the NetworkManager service after each suspend or hibernate.
systemctl restart 'NetworkManager*'
exit 0 PS: Don't use the Gnome way to suspend your system, it might cause some problem due to delay(that's Gnome's fault). the Gnome way means at the menu(when you click the right top of your top panel, it shows up) where you press Alt, so that the power icon becomes a suspend icon(see the picture below), don't use this way to suspend plz. You can suspend your surface by using the systemctl suspend command, and if you want to hibernate, just through the systemctl hibernate command, or replace syspend with hibernate, but that's another story. Whatever ways you choose, you can easily wake up your device by a single press of your power button, remember the keyboard can no longer wakes it up. |
After using the kernel, everything works like a charm on my surface pro6 except the hibernate or suspend, my device wakes up automatically for no reason. But after some googling(thanks to #396), I may have found the key to solve the issue. It turns out to be the problem of the keyboard, which is seen as a XHC device(I don't know what XHC device is, but it is exactly what caused the problem). Due to the particularity of the 2 in 1 device, it makes the kernel to misunderstand the structure of your device, something like this:
Let's see what can wake your device up. Run the following command:
Here's what I got from my surface pro6:
In the line 3,there is something like this, and that's what we gonna disable:
XHC S4 *enabled pci:0000:00:14.0
To disable it permanently, We shall edit the
/etc/rc.local
file, create it if not exits:Write something down like the followings:
And set it's permissions to 775:
Then we create a custom service named
rc-local
:Here's it's content:
Then we enable the service, so that it can start on boot:
sudo systemctl enable rc-local.service
We should then reboot to test the service:
After reboot we can check the status of our service:
And it is active! Which means it's working:
Then we re-check the
/proc/acpi/wakeup
file to see the output:It's clear that the XHC device has been disabled:
Then we can test the suspend or hibernate, through any of the command:
systemctl suspend
Theoretically, we can see that when suspend or hibernate, we're unable to wake up our device by any click through the keyboard, nor can the lid wakes our device up when suspend(as mentioned, the kernel doesn't regard our device as laptop, so there is no lid anyway). The only way you can wake your device up is through a single press of the power button.
And some may encounter the situation that after wake up(I did), our wifi and bluetooth are both out of function, we can solve it by simple running:
sudo systemctl restart 'NetworkManager*'
The solution above is tested on my surface por6, it may be a solution for all 2 in 1 devices.
Hoping it can help you guys!
The text was updated successfully, but these errors were encountered: