jbuchermn / newm

Wayland compositor
MIT License
961 stars 31 forks source link

Cannnot resume from suspend. #68

Closed Alan-Kuan closed 2 years ago

Alan-Kuan commented 2 years ago

Hi, I found that every time after my computer resumed from suspension, the view of my desktop showed up a little while and then the WM just crashed.

Does this have something to do with my display manager or anything else?

jbuchermn commented 2 years ago

I've seen issues like this related to seat management. However it is quite hard to tell.

Can you upload a log file (~/.config/newm_log) after such a crash?

Alan-Kuan commented 2 years ago

Sure, the following is the log it generated. newm_log

jbuchermn commented 2 years ago

Thanks, I've seen the same issue on my machine. Latest pywm commit appears to fix it - can you update and verify?

Alan-Kuan commented 2 years ago

Hello, I tried updating newm with yay. However, when it started to build, I encountered an error and it printed a bunch lines of unformatted error message.

Here is the log of it. error_log.txt

jbuchermn commented 2 years ago

That's a weird error unrelated to the latest commit. It looks like pywm and / or wlroots are not checked out properly. You are on master I assume?

In any case, can you try clean-building with yay?

Alan-Kuan commented 2 years ago

May I ask you which branches of newm and pywm should I use to build and install?

I tried checkout to debug of both; although newm was successfully installed, it could not get started.

BTW, I tried clean-building with yay, but I still encountered previous error.

jbuchermn commented 2 years ago

Can you try with master? The fix is on master.

We can try and solve install issues later - btw, debug is no longer in use. You should be able to use v0.3 branches on both news and pywm as well, although care needs to be taken that wlroots submodule is checked out correctly.

Alan-Kuan commented 2 years ago

Oh, I see. However, I couldn't build pywm on master. The followings is the steps I used to build:

git clone https://github.com/jbuchermn/pywm && cd pywm
git submodule init
git submodule update
python3 setup.py build

After I executed the last line, the error occurred.

jbuchermn commented 2 years ago

Ah I see now - I accidentally updated the subproject commit in my last commit on master which is obvious bullshit.

So, what you're doing is correct, but master was (I just pushed) broken. Can you try again?

Alan-Kuan commented 2 years ago

I tried and it worked perfectly! Thank you so much.

Alan-Kuan commented 2 years ago

Oops, although I could resume from suspension, there's another problem that caused the WM crashed right after resuming.

After resuming, I exited the terminal I opened before suspension, and then it crashed. I also found that if it resumed with only a terminal, it would not happen. However, if it resumed with a terminal and Firefox, the problem would occur.

Here is the log. I take the part related to the issue. newm_log.txt

Alan-Kuan commented 2 years ago

I found that the issue is related to the display manager I used.

I encountered it when I used lightdm, but it disappeared if I simply used greetd.

jbuchermn commented 2 years ago

Hey,

it seems, lightdm is doing something weird with the seat, which pywm does not expect, causing the segfault in pywm - probably this is not a big issue to fix.

However, as I'm not running any display manager and I'm not really interested in a login screen which requires the xserver to start, I can't debug that on my machine. (As a matter of fact I did try to get lightdm with newm running on my nixOS but couldn't within 15mins). So I suppose I'm going to follow sway in not officially supporting display managers (https://github.com/swaywm/sway/pull/3634#issuecomment-462779163).

I'll leave this open for now, in case someone is able to find the bug.

Alan-Kuan commented 2 years ago

Hey,

I see. I'll look for other work arounds or perhaps just go with greetd.

Again, thank you for fixing the bug that it could not resume from suspension!

Pandademic commented 2 years ago

@jbuchermn should we close this issue?