English
Ask Your Question
0

Fedora 19 will not shutdown if Laptop is closed

asked 2013-08-22 09:37:01 +0000

Domi78 gravatar image

updated 2013-08-22 10:37:28 +0000

I have a Dell Latitude E6510 laptop and a docking station. Without the Docking station everything works fine but if i connect an external monitor and close the laptop, Fedora will not shutdown probably. Instead of powering off the computer it just loggs off the current user, stays on the logon screen and switches to hibernate-mode. If i try to logon again, the network-connection is unavailable and i can't restart it. After i reboot the system (with laptop open) everything works fine again. Also i need to open the laptop to see the logon screen but this is not important because i just have one user on this machine.

edit retag flag offensive close delete

Comments

Do you mean that when you close the laptop lid, it hibernates straight away? Or do you mean that when you go to the menu and shutdown, it hibernates instead?

jamielinux ( 2013-08-22 12:52:14 +0000 )edit

What do you mean by 'close the laptop'? Shutdown or close the lid?

yanglifu90 ( 2013-08-22 13:31:11 +0000 )edit

OK, i need to explain it a little bit better: At the energyoptions i set the system to ignore the lid that i can close it. So I'm using my laptop with a closed lid. But while the lid is closed the system will not shutdown if I'm giving the comand via the menu.

Domi78 ( 2013-08-22 14:18:04 +0000 )edit

You use the laptop with lid closed? How do you type then? An external keyboard? What does the docking station do?

yanglifu90 ( 2013-08-22 14:46:41 +0000 )edit

Exactly. The docking station is just that i don't need to connect six cables to my laptop because they are all connected to the docking station. So i connect an external keyboard, external mouse, external monitor, network cable, power cable and an additional USB device by just putting my laptop on my docking station. the advantage is that i can remove my computer with just one button and take it with me without connecting and disconnecting everything each time.

Domi78 ( 2013-08-22 15:11:31 +0000 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-08-26 06:38:08 +0000

updated 2013-08-26 06:39:12 +0000

The output you posted in the comment above is revealing:

Aug 26 08:03:42 LATITUDE systemd-logind[411]: Lid closed.
Aug 26 08:05:17 LATITUDE systemd-logind[411]: Suspending...

Try editing /etc/systemd/logind.conf and changing the HandleLidSwitch to either lock or ignore. See man logind.conf for more information.

HandleLidSwitch=lock

The default for this option is suspend.

edit flag offensive delete publish link more
0

answered 2013-08-26 12:31:15 +0000

Domi78 gravatar image

This was a good idea and works in the beginning:

HandleLidSwitch=lock

But if i open the lid and close it while i'm logged in the system will still just hibernate.

The problem ist, that the logonuser (lightdm) has his own energy settings which i need to change. Therefore i need to run the control-center for the user lightdm. I solved it with these commands in the terminal (additional to HandleLidSwitch=lock in logind.conf):

su -
xhost +si:localuser:lightdm
sudo -u lightdm mate-control-center

There i could set the behavior at closing the lid in the energy options, select which monitor i want to use and also set the logon background wallpaper for the logon screen (but that last one does not work because LightDM disables the wallpaper and use that one configured in /etc/lightdm/lightdm-gtk-greeter.conf). I also put a script in /etc/lightdm/lightdm.conf by using this line:

display-setup-script=/usr/share/select-monitor.sh

That script is testing if my laptop is in the docking station and then disables the internal monitor and use the external one as primary:

#!/bin/sh
/usr/bin/xrandr --current | grep "DP-1 connected " | grep -v "eDP-1"
if [ $? -eq 0 ]; then
  echo "Monitor found at Docking-Station (Port 1)."
  sleep 1s
  /usr/bin/xrandr --output eDP-1 --off
  /usr/bin/xrandr --output DP-1 --auto --primary
fi

That also solve my problem that i can not see the logon screen while the lid is closed.

edit flag offensive delete publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers to your questions.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2013-08-22 09:37:01 +0000

Seen: 746 times

Last updated: Aug 26 '13