Turning on a notebook with a docking station without a switch


I bought a new dock: from ivanky.

It works perfectly with my Thinkpad X1 Carbon 6.gen. The problem is turning on the notebook. The docking station does not have a power switch. I would like to start the notebook without opening the lid. Now I have activated the “bios power on when ac detected” function in the UEFI, which also works well. However, I noticed that when the notebook is shut down, it also switches off. As soon as I turn off the power for all devices (e.g. dock, 2 monitors, speakers, etc.) on my socket with a toggle switch, the notebook switches on again. It is still connected to the dock’s Thunderbolt port via USB-C. Does anyone have a solution without me having to deactivate the “bios power on when ac detected” function again?

My guess is that this function is usually used when a system has to be run 24/7 and in case of power loss, it will start immediately again. Perfect for remote work.

Well, only way then would be WoL (Wake on Lan) over Network Cable? Anything else would not be possible when the system is powered off.

Thanks, but what shell I do? Are there instructions? I still have no idea how it works with Manjaro!

No - you cannot turn your computer on without opening the lid and pressing the power button.

Wake-on-LAN - ArchWiki will not do what you think - it can only be used to send a wake-up packet from another device - it is most commonly used to wake computers for scheduled updates or to accept an incoming remote connection.

I just learned that some WiFi cards support a similar wakeup function - in any case it requires the system to be in some form of active state.

  1. The target computer’s motherboard and Network Interface Controller has to support Wake-on-LAN.
  2. The target computer has to be physically connected (with a cable) to a router or to the source computer for WoL to work properly unless your wireless card has support for Wake on Wireless (WoWLAN or WoW).

Search for wifi cards supporting WoWLAN - sx.nix.dk

WoL may not work here anyway, due to the network interface being on a USB dongle, and Wireless WoL support is exceptionally rare on laptops as it requires a constant connection to the AP, which eats into standby power.

In any case, wouldn’t the actual solution be a smart switch? Something like this?. If the dock is powered through a smart switch, you can control if it’s getting power independently from the other devices from your phone, which should solve the issue?

Thank you for your arguments! Is very helpful for me! Wake on LAN is therefore eliminated!

OK. So if I can switch the dock separately, what’s the difference? My problem is that the NB shuts down with the key command “shutdown -h now”. As soon as I switch off all devices with AC detected activated in the UEFI (with a normal socket with a toggle switch), the NB somehow gets power for a short time so that it starts in battery mode. Would it be different if I switched the docking station separately using the intelligent switch? I already have this in my shopping cart on Amazon, but it doesn’t seem like a solution to me yet!?

If the laptop is powered through the dock and it does not turn on when power is applied to the dock - then what you want to do cannot be done.

Yes, the laptop switches on if “Power on AC detected” is activated in the UEFI.

Incidentally, I ordered the intelligent switch and am trying to see whether it works when it only switches the docking station. I then switch all other devices via a mains socket with a toggle switch.

Yes - I think that should work. It may be a bit awkward though, because the laptop shuts down via shutdown -h now and turns on by toggling the power to the dock.

You could set up a script so that the laptop automatically shuts down when it detects the AC power has turned off. However, if you do that then you’ll have to disable the script should you want to use the laptop away from the wall.

Thank you! I’ll try the socket first and then get back to you! I think the script is a good idea and would ask about it if it doesn’t work on its own with the intelligent socket!

The only way I can think of to turn on this notebook without opening lid would be to add a 2nd switch wired in parallel to the original power switch

I have seen 2 old (chunky) Thnkpads with additional switches. One to turn off WiFi and another to mute microphone
But It would be trickier to find a useable location for additional power switch on a thinner laptop
and probably less internal space for routing connection to original switch
and scarier to make a hole in a new shiny system

It won’t work on it’s own, I suspect, unless there’s an option in the UEFI for “Power off on AC removed” or similar. Remember, all the socket does is control power, and we’re using the laptops “power on when wall power is detected” behaviour to turn it on. So, unless you’re happy waiting for the battery to run down sufficiently, or perhaps removing the battery altogether, it won’t turn off automatically (although that would result in a “yank the power cable out” style shutdown, which is suboptimal).

I can suggest a quick script if it’s necessary - the gist of it would be to use the acpi command every five minutes to determine if the laptop battery is discharging, and if it is then shutdown. Set that up via a systemd service, and you’re good to go.

Unfortunately the notebook behaves the same way! Switching the dock separately using an intelligent socket did not produce any different results than before. As soon as I switch off the docking station, the notebook switches on again using the battery.

Thank you for offering a script. My goal was to leave the notebook switched off. So if it switches on again and the script should only shut it down when the battery is discharged, then I don’t want that. I’d rather bite the bullet and just open the notebook lid to get to the start button. I deactivated “Power on AC detedted” again.

You’re probably right! However, I don’t see myself technically or willingly able to go this route.

Well, I think the following is a systemd service to shutdown if it detects being offline.

Description=Shutdown if on battery


ExecStart=/bin/sh -c '[ "/usr/bin/acpi -a | /usr/bin/grep off" ] && /usr/bin/shutdown -h now'


(Disclaimer: don’t have access to proper testing right now, at a desktop - but I think this should work).

Save that to something like /etc/systemd/system/autoshutdown.service, and then run sudo systemctl daemon-reload (reload config files) followed by sudo systemctl enable --now autoshutdown

Thank you very much, I’d like to try it out!

I activated the script on another desktop PC with Manjaro XFCE. This PC does not have a battery. Unfortunately, the PC started up but switched off again before the login screen. Now I can’t judge that due to lack of knowledge!
I then had to boot and use a live USB stick

manjaro-chroot -a

delete the script file. Then the PC started up again.

I don’t dare activate the script on my notebook!

Firstly, the script wasn’t designed for systems without a battery, so it doesn’t have a check against that condition. My assumption was that you would only run it on a laptop. Second, double checking, I think that is the expected behaviour in that case.

If you’re nervous about running it, you can change the payload to something harmless - just replace /usr/bin/shutdown -h now with something like echo shutdown, and then check what’s reported in systemctl status autoshutdown.service.

However, by nature what you want is somewhat risky - you’re trusting a computer to determine if it should be on or off, and that’s a risk because a shutdown resets all state of the system. I’d actually recommend suspending the system, although that has it’s own tradeoffs (but it wouldn’t trigger the automatic shutdown loop you experienced; it would suspend, but then the script wouldn’t run for another 5 minutes. The only reason you had a loop was because every shutdown reset the countdown). That said, using a chroot is a bit overkill - you can just boot from a live USB, mount the drive, and delete the service file.

Thanks! I activated the script on my notebook, but the same behavior. Had to uninstall it again. I don’t want to experiment any further!
My new approach is to simply pull the USB-C cable out of the Thunderbold port. Then luckily the notebook stays off. This helps me because I have to swap it with my work notebook on the docking station anyway.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.