Skip to content
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

power management is dysfunctional on Acer Swift 3 #715

Open
davidthewatson opened this issue Mar 4, 2024 · 8 comments
Open

power management is dysfunctional on Acer Swift 3 #715

davidthewatson opened this issue Mar 4, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@davidthewatson
Copy link

branch

stable

Architecture

x86_64

Description

I installed manjaro sway from USB a few days ago. Everything seems great as it was when I ran manjaro sway last year, except power management now seems broken on my acer swift 3 with Ryzen CPU.

The behavior I've observed is that I boot, login, do some work, walk away to get coffee, and when I come back the machine has shut down completely and worse, when it boots, all my work is gone and we're in a freshly booted clean state.

I've run laptop mode tools (#660) and I see that there are some things that are enabled by default, but what can I disable to turn off this over-reaching power management that's killing my beloved manjaro sway when I walk away? Do I need to do the ACPI switches at boot or something similar? I've not seen this particular problem on any modern linux on this box before, i.e. fedora, ubuntu, and even other arch-derivatives. I suspect it may be the Ryzen chipset, but that's purely speculative.

Thanks!

Reproduction steps

Install manjaro sway on acer swift 3 with Ryzen processor. Boot, login, wait for power management to take over.

Screenshots

No response

Logs

No response

@davidthewatson davidthewatson added the bug Something isn't working label Mar 4, 2024
@boredland
Copy link
Member

Install manjaro sway on acer swift 3

That is not a realistic reproduction step.

You could uninstall Laptop-Mode-Tools and check if then it behaves not that odd. On my notebooks it does nothing like what you described, but bugs happen..

@davidthewatson
Copy link
Author

Overnight, the behavior changed.

Root cause remains a mystery but it seems better now. I had done pamac update and sudo pacman -Syyu manjaro-sway-settings yesterday so it's difficult to be sure which may have tweaked the behavior for sure, but you can close this as it seems fine now. Thanks!

@davidthewatson
Copy link
Author

Closing at my own recommendation. Chortle.

@davidthewatson davidthewatson closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@davidthewatson
Copy link
Author

I was premature in closing this issue.

Worked on the box this morning, left it sit to make coffee and it powere off completely when I was away. When it came back after a key press, all the pre-reboot state was gone, i.e. terminals, tmux, firefox, etc.

@boredland Do you want me to actually remove Laptop-Mode-Tools? I didn't believe that was causal here. Thought it was just GUI displaying the state, shouldn't have any impact on the state without interaction. Correct?

@boredland boredland reopened this Mar 4, 2024
@boredland
Copy link
Member

I think there are just two tools influencing power-management: poweralertd and laptop-mode-tools. Both have been installed for quite some time by default. My bets are on laptop-mode-tools.

@davidthewatson
Copy link
Author

davidthewatson commented Mar 5, 2024

Thanks for your response.

I tested this by removing laptop-mode-tools as you suggested and rebooting. Same problem. Walked away for a while, system powered off, all state was gone upon touch of a key after it booted. That leaves poweralertd from your list. In the meantime, I did the following:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target                                      
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.

so that I could function without issue.

I tested this by stepping away for a few moments and indeed, it went to sleep as it should shutting off the screen and my attached monitor and invoking the login circle upon key press when I returned. It's worth noting that this is EXACTLY the same behavior I saw Sunday night while I slept before I had changed anything from the default install, which suggests to me that there may be conditions under which the installation defaults are correct and perform as I expect them to perform, i.e. not behaving too aggressively with regard to power, particularly when the machine is on AC.

Happy to pursue any further debugging. I'm just not sure where to go from here since I understand poweralertd may be the source of the eventing but I don't have much more mental model than that outside the quick workaround I did here.

@boredland
Copy link
Member

Happy to pursue any further debugging. I'm just not sure where to go from here

Sadly: me neither. Just pointers coming to mind for tools, that mingle with the power management:

I have no particular idea how they might interfere.

@davidthewatson
Copy link
Author

Thanks for the update.

Let me know if you'd like me to document the workaround:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target                                      
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.

In the FAQ.

My system has functioned great with this in place for several days now.

I've seen no issues with power since masking sleep, suspend, hibernate, and hybrid-sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants