Erratic behaviour after resuming from sleep

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Zraster

Erratic behaviour after resuming from sleep

Unread post by Zraster » 2020-03-09, 03:32

Hi, everyone.

When putting my Linux computer into sleep with Pale Moon running, and then resuming from sleep, Pale Moon will behave erratically. Odd things like Pale Moon not responding to mouse and keyboard, links not opening, audio/video out of sync, and other odd things happen.

To remedy this issue, I restart Pale Moon and it seem to work fine again until my computer goes back into sleep and I wake it.

John connor

Re: Erratic behaviour after resuming from sleep

Unread post by John connor » 2020-03-09, 08:04

I have been a member of many tech help forums involving mostly Windows computers and I can tell you that even in a Windows computer using sleep of hibernation mode you run the possibility of erratic behavior.

It's just best to close the browser and power down and not use those low power OS state features.

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5174
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Erratic behaviour after resuming from sleep

Unread post by Night Wing » 2020-03-09, 10:19

@ Zraster

Do you get the same erratic behaviour when using a different browser, say Firefox? If you try Firefox and get the same results, then it isn't a bug in Pale Moon.

Two examples are below.

When using linux, switching to a different kernel "might" solve your problem. On my experimental laptop, I had installed a version of linux Debian. Sometimes my cursor would disappear. When I upgraded to a newer kernel, I never had my cursor disappear again.

At other times, erratic behaviour can be hardware related. I have two desktop tower computers. One was wireless and the other was not wireless. With the wireless computer, I had installed a version of linux Mint. The quirk with this tower computer, it started to turn itself back on when I shut it down.

I tried many different things to solve it. To make a long story short, this "turning itself back on" was due to the wireless card in it. I found out about it because my next door neighbor suggested removing the wireless card in it. After the wireless card was removed, it never turned itself back on after I shut it down. And I have never put back a different wireless card to replace it. So this desktop tower computer is no longer wireless.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Erratic behaviour after resuming from sleep

Unread post by adesh » 2020-03-09, 11:21

Just to chime in, I've never encountered such issues on my Linux machine. I keep Pale Moon open for at least a few weeks, and sometimes my machine is asleep for a few days. When I open it again, everything is back as it were, just after a couple of seconds. My computer is not very powerful also, in fact quite old.

I run Arch with XFCE DE.

So, your problems seems to be related to your distro/kernel/desktop environment/power manager etc.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Erratic behaviour after resuming from sleep

Unread post by Moonchild » 2020-03-09, 13:33

Pale Moon has specific code that responds to different power states and does a number of tasks waking up from sleep to make sure erratic behavior is avoided (most notably as a result of ghost network connections and paused timers, etc.). If this somehow doesn't work on your Linux, then it's very likely that switching to a low power state the O.S. doesn't properly signal applications about its power state, preventing the browser from responding properly to such state changes and hard-interrupted connectivity. Some "hardening" settings may prevent the required signalling.

What I'm saying is that this shouldn't happen, but it's possible that it does if not signaled by the OS properly. Solutions would be to restart the browser or figure out what's wrong with sleep mode.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Zraster

Re: Erratic behaviour after resuming from sleep

Unread post by Zraster » 2020-03-13, 04:48

I should mention that Pale Moon doesn't always behave erratic after I wake my computer from sleep. It's unpredictable. Sometimes it's fine, sometimes it acts up.

My hardware is:
ASRock 970M Pro3 motherboard
Athlon II X4 640 CPU
8 GB DDR3-1333 RAM
320 GB Seagate HDD with Xubuntu 18.04.4 LTS installed and running.

I have done some testing with Firefox and other web browsers, and no other web browser has any issues so far. Only Pale Moon, and only on occasion.

However; there is at least one setting in the UFEI that might have something to do with it.
An option to enable an Enhanced Halt State (C1E) for AMD processors.
This probably has something to do with it.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Erratic behaviour after resuming from sleep

Unread post by Moonchild » 2020-03-13, 07:42

Well it would be great if you can get certainty about that by disabling it in the computer's setup and seeing if it solves your issues, and reporting back?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Zraster

Re: Erratic behaviour after resuming from sleep

Unread post by Zraster » 2020-03-14, 07:28

Did some tests with the Enhanced Halt State (C1E) option in the UFEI. But nothing changed whether I enabled or disabled this option. I also checked some other settings. But nothing changed Pale Moon behavior. However; I did discover a way to create a minor abnormality in Pale Moon every time I resume from sleep.

If I start Pale Moon and open two tabs, put my computer to sleep, wake my computer, select the other tab, click on the address bar and type, it will only allow for one character to be in the address bar. And it will overwrite the first character with subsequently typed characters. If I do other things and then click on the address bar, or click on the address bar of the first tab that is already open, it will continue to operate as normal. Only if I select another tab, or a new tab, and start typing into the address bar of those tabs after resuming from sleep will this odd address bar behavior occur.

John connor

Re: Erratic behaviour after resuming from sleep

Unread post by John connor » 2020-03-14, 16:14

That sounds indicative of Pale Moon not responding to the low power states.

New Tobin Paradigm

Re: Erratic behaviour after resuming from sleep

Unread post by New Tobin Paradigm » 2020-03-14, 16:22

Or not getting the signals because they aren't being sent.

Zraster

Re: Erratic behaviour after resuming from sleep

Unread post by Zraster » 2020-03-17, 03:41

Another repeatable abnormality I have discovered. If Pale Moon is running with a YouTube video playing and I pause the video, put the computer to sleep, wake it, and then hit the Space bar to unpause the video, it will double input the space bar, and do a unpause/pause cycle instantly.

Normally, before sleep/resume, I can tap the space bar to pause YouTube videos, and hit it again to unpause. And if I hold it down, it will start pause/unpause cycling after about a 1.5 second delay. But after a sleep/resuming my computer with a YouTube video paused in Pale Moon, just tapping the space bar will perform a unpause/pause. And it will continue to do so repeatedly very quickly. I have to use the left click to unpause the video.

Also the right click context menu doesn't work on Pale Moon if it's left open while the computer is sleep/resumed. But it will start to work normally again if I open other program windows and then switch back to Pale Moon.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Erratic behaviour after resuming from sleep

Unread post by Moonchild » 2020-03-17, 08:26

If the appropriate timers aren't firing because Pale Moon isn't signalled about low power state/resume as expected then you can expect a whole lot of weird things to happen.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Zraster

Re: Erratic behaviour after resuming from sleep

Unread post by Zraster » 2020-03-18, 04:00

Must be a motherboard issue then. Based on what I've read around on the Internet, low power states tend to be problematic.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35647
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Erratic behaviour after resuming from sleep

Unread post by Moonchild » 2020-03-18, 09:34

Zraster wrote:
2020-03-18, 04:00
Must be a motherboard issue then. Based on what I've read around on the Internet, low power states tend to be problematic.
It's possible -- it's also possible there is a bug in Pale Moon's handling of all this but I don't have any idea where to start looking, since it does work as it is supposed to in just about all cases. If it was a browser bug impacting more people on common hardware then I'm sure we'd be flooded with reports.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: Erratic behaviour after resuming from sleep

Unread post by New Tobin Paradigm » 2020-03-18, 13:57

I can say I haven't had any issues with my 2014 laptop with sleep. Hibernation though, well that in general never worked properly for me on any system. I have seen systems where it did but never one I owned.. Sleep tho, seems fine on the Windows 7 64bit.