You are not logged in.

#1 2013-11-25 18:59:47

sjrp
Member
Registered: 2013-11-21
Posts: 9

[SOLVED] System hangs on suspend

Hi!
Recently moved from Ubuntu to Arch, and I'm really pleased with the result. I've only got one problem. I have KDE 4.11.3 installed, and when I suspend the computer it hangs/freezes on the lockscreen almost every time, without actually suspending. The same thing happens if I run "systemctl suspend" (from another non-gui TTY, or from Konsole), minus the freezed lockscreen.

If I've understood things right, KDE should work correctly with systemd's "inhibited" commands and therefore powerdevil should be able to suspend with the default /etc/systemd/logind.conf values. Still, I've messed around a bit with different values in that config file, but with no result. Suspending the system, from KDE or with systemctl, hangs the system now matter what.

Looking at the output from journalctl, I haven't been able to find anything out of the ordinary. The same goes for the xorg server logs.

So, is anyone experiencing the same thing? Does anybody know the source of the problem, or what might be? I'm unsure of which logs to look at, and if it's even possibly to trace anything since I have to do a hard reboot after the system hangs/freezes every time. "systemctl suspend" gives no output so I can't really follow the process.

I run Arch (all packages up to date) on an Alienware M14XR2, Intel i7 and hybrid graphics (Intel 3or4000 + Nvidia GeForce 650GTM). I use bumblebee + nvidia drivers. I've installed acpid to be able to suspend on lid close, and the "lid close event" gets registered, but the system freezes exactly like described above.

Thanks for your help in advance. Sorry if this question is silly, but I've spended many hours trying to troubleshoot this without any result, so I thought I might as well ask you guys. Any pointers to what I should try to do would be golden!

EDIT: With kernel 3.12.9-1 suspend finally works again! Thanks for all help, you're awesome!

Last edited by sjrp (2014-01-28 10:40:01)

Offline

#2 2013-11-28 01:37:30

LimaSierra
Member
Registered: 2011-04-26
Posts: 41

Re: [SOLVED] System hangs on suspend

Hi,

After reading this
https://bbs.archlinux.org/viewtopic.php?id=157583
and this
https://github.com/Bumblebee-Project/bbswitch/issues/9
post, I would suggest stopping the "bumblebeed" service before suspending so we can isolate the problem.

Also, does this help?

only if nvidia driver in use by optirun, suspend hangs. I do not know why. Looks like that nvidia module must be unloaded before suspend, but bumblebee does not give a chance for it with working optirun.

Regards,
Laurent

Offline

#3 2013-11-28 20:46:18

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

Thanks for the help LimaSierra! Maybe I also should've mentioned that I use bbswitch, because based on the things I've tried bbswitch seems highly relevant:

  • Disabled bumblebeed.service -> Suspend works

  • With bumblebeed enabled, I manually (with bbswitch) turned the discrete card on/off (works) before trying to suspend -> Suspend doesn't work regardless of the state of the discrete card

  • Uninstalled (and therefore disabled) bbswitch -> Suspend works!

So, it seems that bbswitch is causing the system to hang upon suspend somehow, but I really can't figure out why.

When the system suspends, does the x-server try to unload kernel modules such as nvidia? Considering this from the github website for bbswitch:

Before suspend, the card is automatically enabled. When resuming, it's disabled again if that was the case before suspending.

maybe there is some kind of conflict between some service/program trying to disable the nvidia module while bbswitch still needs it? On the other hand, with bumblebeed.service disabled, I think that the nvidia module was still loaded, and the discrete card was definitely powered on (more fan noise, higher temp), but I could suspend anyway.

Another, maybe irrelavant question: Why does bbswitch enable the discrete card upon suspend/shut down?

Offline

#4 2013-11-30 00:22:02

LimaSierra
Member
Registered: 2011-04-26
Posts: 41

Re: [SOLVED] System hangs on suspend

Hi,

Unfortunately, I don't have enough knowledge on this topic to provide serious help, so I can only start guessing...

I installed bumblebeed + bbswitch myself today, and everything went smooth. Suspend still works, without further configuration.

  • I have a 730M, and installed the proprietary driver ("nvidia" package). Furthermore, I tried configuring an X11 config file, following the "NVIDIA" wiki page, but then my system was unable to boot. I removed the X11 config files again, and realized they were not necessary, because the "primusrun" command worked fine when invoking glxgears. What about you? nvidia or nouveau? Have you created some X11 config files that could cause the trouble?

  • Whats the output of

    sudo systemctl status bumblebeed

    ? There's a short log excerpt in the output, does it provide any clues?

  • Have you tried what's described in this section of the wiki article? https://wiki.archlinux.org/index.php/Bu … management

  • Have you found this thread? http://ubuntuforums.org/showthread.php?t=2027329 ...Especially, have a look at comment #9: may removing xfce4-power-manager help?

  • I assume you have already found this thread, but just in case... https://bbs.archlinux.org/viewtopic.php?id=157583

  • What suspend utility do you use? pm-utils, probably? I use the built-in (out-of-the-box) suspend

What concerns your other question, namely why the discrete card is enabled before suspend... I don't know for sure, but I suppose it has something to do with this:

The NVIDIA card may not correctly initialize during boot if the card was powered off when the system was last shutdown.

(taken from the Arch wiki page I linked earlier)

Hope this helps!

Offline

#5 2013-12-01 21:38:47

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

Hi again. First of all, thank you for helping me out!

What about you? nvidia or nouveau? Have you created some X11 config files that could cause the trouble?

I use nvidia for the discrete card, nouveau not installed. I have not created any X11 config file myself (created a config file some days ago to try using nvidia without bumblebee, but I've removed it).

The output of "sudo systemctl status bumblebeed" is:

Dec 01 21:55:58 AW-M14XR2 bumblebeed[9656]: [  521.388014] [INFO]/usr/bin/bumblebeed 3.2.1 started
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696428] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696444] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696457] [WARN][XORG] (WW) Warning, couldn't open module mouse
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696462] [ERROR][XORG] (EE) Failed to load module "mouse" (module does not exist, 0)
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696467] [WARN][XORG] (WW) Unresolved symbol: fbGetGCPrivateKey
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696474] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696479] [WARN][XORG] (WW) Warning, couldn't open module mouse
Dec 01 22:07:08 AW-M14XR2 bumblebeed[9656]: [ 1185.696481] [ERROR][XORG] (EE) Failed to load module "mouse" (module does not exist, 0)
Dec 01 22:07:13 AW-M14XR2 bumblebeed[9656]: [ 1190.460186] [ERROR][XORG] (EE) Server terminated successfully (0). Closing log file.

Have you tried what's described in this section of the wiki article? https://wiki.archlinux.org/index.php/Bu … management

Yes, and it didn't make any difference.

Have you found this thread? http://ubuntuforums.org/showthread.php?t=2027329 ...Especially, have a look at comment #9: may removing xfce4-power-manager help?

Yup, I don't have that package installed. I only make use of kde's powerdevil powermanagement software.

I assume you have already found this thread, but just in case... https://bbs.archlinux.org/viewtopic.php?id=157583

I have looked at it but I actually never gave it a spin, for some unknown reason. After doing this:

sudo systemctl stop bumblebeed
sudo modprobe bbswitch
sudo tee /proc/acpi/bbswitch <<<OFF
cat /proc/acpi/bbswitch # should say OFF, if not check your dmesg

I'm able to suspend. AND if I re-enable bumblebeed afterwards, I'm still able to suspend correctly. So, it seems that restarting the bumblebeed service when my laptop is powered on does the trick, but I don't know why... Maybe bumblebeed gets started too early in the boot process or something? Maybe I'm just dumb for asking, but could the fact that I'm using an SSD mess things up during boot with timings etc?

What suspend utility do you use? pm-utils, probably? I use the built-in (out-of-the-box) suspend

I'm using the built in suspend as well.


Again, huge thanks for your help. Feels like I'm close now! But at the same time, I have no clue of what to do next. Feels logical to try figuring out what goes different when bumblebeed is started during the boot process vs after the boot process, but how?

Offline

#6 2013-12-09 14:14:50

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

A little update:
The problem seems to be when bbswitch tries to enable the discrete card right before suspending. Writing this in /etc/bumblebee/bumblebee.conf solves the problem, and suspend works as it should:

# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=true

If was defaulted to false, leaving bbswitch to try and enable the discrete card on every suspend/shutdown. I never experienced any problem when shutting down, only when suspending. Any ideas on that? Feels like the suspend procedure is "too fast" and therefore doesn't let bbswitch finnish its work with enabling the card.. Or maybe my computer just can't suspend when the discrete card is powered on.

So, to sum it up, this is almost solved now. But if I have bumblebee.conf configured as above, boots into arch, then reboots into Windows 7, the fan (probably on the discrete card) gets really loud, as if the card is powered on even though it shouldn't on a fresh Windows 7 boot. So setting TurnCardOffAtExit to true might cause some problems with the discrete card not being initialized properly or something.

Offline

#7 2013-12-12 16:36:42

LimaSierra
Member
Registered: 2011-04-26
Posts: 41

Re: [SOLVED] System hangs on suspend

Hi,

First of all: sorry for not answering for so long. I'm quite busy at the moment. Glad you made some progress on the issue!

Concerning your Win7 problem: are you sure you got the drivers installed? Maybe there's a different / second driver for the Optimus technology?

Regards,
Laurent

Offline

#8 2013-12-21 13:39:31

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

Hi again! After I used my laptop some more I noticed that the system still hung up on suspend, even with the above mentioned "method". So, I got tired of it and installed Linux Mint. I really want it to work, but it seems to be such a rare problem so getting help is really hard. And the problem could be VERY hardware specific...

I've started to think that maybe its the combination of systemd and bumblebee. Because in both the other distributions I've tested, systemd is not used, and bumblebee+bbswitch+nvidia+suspend works great.

I noticed that, when installing bumblebee in Mint, bbswitch-dkms got installed instead of the "non-dkms" version. Maybe switching to the dkms package could do the trick even in Arch Linux?

Anyway, a huge thanks for all the help. Will try Arch Linux again later on, when the problem might have been fixed. But for now I need a fully working computer.

Offline

#9 2013-12-21 23:11:14

grabbexi
Member
Registered: 2013-05-12
Posts: 51

Re: [SOLVED] System hangs on suspend

Switching to LTS-kernel fixed this issue for me on my laptop. You'll need Nvidia-lts also. Otherwise same settings work.

I didn't really try doing anything with bbswitch and bumblebee on mine, like you did.

Last edited by grabbexi (2013-12-21 23:12:50)

Offline

#10 2013-12-28 19:32:10

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

grabbexi wrote:

Switching to LTS-kernel fixed this issue for me on my laptop. You'll need Nvidia-lts also. Otherwise same settings work.

I didn't really try doing anything with bbswitch and bumblebee on mine, like you did.

Thanks for the help!
That almost worked 100%. Switching to LTS-kernel and nvidia-lts made me able to suspend correctly. I also had to install bbswitch-dkms. bbswitch didn't get modprobed with the lts kernel otherwise.

Doing

tee /proc/acpi/bbswitch <<<ON (or OFF)

.
seemed to work, at least according to the output of

 cat /proc/acpi/bbswitch 

.

However, I could not use optirun anymore. It gave me:

[    36.144] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
[    36.144] (EE) NVIDIA(GPU-0):     check your system's kernel log for additional error
[    36.144] (EE) NVIDIA(GPU-0):     messages and refer to Chapter 8: Common Problems in the
[    36.144] (EE) NVIDIA(GPU-0):     README for additional information.
[    36.144] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
[    36.144] (EE) NVIDIA(0): Failing initialization of X screen 0
[    36.144] (II) UnloadModule: "nvidia"
[    36.144] (II) UnloadSubModule: "wfb"
[    36.144] (II) UnloadSubModule: "fb"
[    36.144] (EE) Screen(s) found, but none have a usable configuration.
[    36.144] (EE) 
Fatal server error:
[    36.144] (EE) no screens found(EE) 
[    36.144] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    36.144] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[    36.144] (EE) 
[    36.145] (EE) Server terminated with error (1). Closing log file.

but that problem seems related to another hardware specific bug. The really unfortunate thing is that this specific bug seems to be fixed in kernel 3.11 and later.

So, with lts-kernel I can suspend, but I cannot use my discrete card. And with the non-lts kernel I cannot suspend but I can use the discrete card.

And about bbswitch working properly with lts kernel or not: If the second line of code above returns the "correct" value, is that "proof" enough for the real power state of the discrete card? Or could it be that bbswitch reports back the wrong power state value?

I don't really use the discrete card that much. For me, being able to suspend is a lot more important. So I could run the lts kernel, and just be happy with suspending but not being able to run any program using the discrete card. But to do that, I want to be sure that at least bbswitch is working properly (and that the discrete card is indeed turned off). And I think it's a bit weird that bbswitch seems to work with the lts kernel, but optirun does not. If the discrete card isn't recognized, how can bbswitch be able to work at all?

Last edited by sjrp (2013-12-29 14:35:02)

Offline

#11 2014-01-28 10:38:15

sjrp
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] System hangs on suspend

With latest kernel 3.12.9-1 everything works fine again, I can now suspend. Just updated and voilà!

Offline

Board footer

Powered by FluxBB