LXDE and repeated periodic sleep entries

Problems with hardware & laptops not being detected or supported during or after install.
Post Reply
bracecomputerlab
Posts: 1
Joined: Tue Oct 03, 2023 9:35 pm

LXDE and repeated periodic sleep entries

Post by bracecomputerlab »

I am cross posting this topic over from Gentoo Linux forum.

https://forums.gentoo.org/viewtopic-t-1 ... 9aa6aed67f

I recently bought a Zhaoxin x86 processor based laptop (KX-6640MA).
I have a USB storage device (SanDisk Extreme 64 GB) I mainly use for testing in development DRM code on 32-bit x86 platform.
It is a customized version of drm-next code base with still in development OpenChrome DRM code.
The Linux kernel is custom compiled to target 586 class processors.
The distribution is Gentoo Linux 32-bit x86.
For this Gentoo Linux installation, I use the default Version 17.0 profile and not desktop profile.
This is to avoid being forced to install Rust compiler to compile a newer version of librsvg.
I personally hate Rust language due to its default SSE2 instruction set requirement on a 32-bit x86 platform.

Due to low memory and graphics requirements, I exclusively use LXDE on this storage device.
But as soon as I get past LXDM based log in screen, as soon as I reach LXDE, forced entry into sleep happens every 60 or so seconds, and I need to press a key on the keyboard to get it out of a blank screen with a white cursor blinking on the top left hand corner.
To prevent a freeze, I need to set ACPI power state support to S1 state or no power state (probably means S0 state) setting (S3 state causes a freeze).
When the screen turns blank with a blinking white cursor on the top left hand corner, if I press a key on the laptop keyboard, I am able to get out of the blank screen 98%of the time.
The rest of 2% of the time, either I loose the screen or gets a distorted screen.
I can still recover from this situation, but it gets tricky since if I press the power button, the computer will enter a shutdown.

Anyway, how can I prevent this periodic forced entry into the sleep mode?
This issue appears to be an LXDE specific issue, is this a bug of LXDE?
I will appreciate if someone can help me on this issue.
Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com
christopher
Posts: 1
Joined: Sun Oct 29, 2023 5:35 am

Re: LXDE and repeated periodic sleep entries

Post by christopher »

bracecomputerlab wrote: Tue Oct 03, 2023 11:10 pm I am cross posting this topic over from Gentoo Linux forum.

https://forums.gentoo.org/viewtopic-t-1 ... 9aa6aed67f

I recently bought a Zhaoxin x86 processor based laptop (KX-6640MA).
I have a USB storage device (SanDisk Extreme 64 GB) I mainly use for testing in development DRM code on 32-bit x86 platform.
It is a customized version of drm-next code base with still in development OpenChrome DRM code.
The Linux kernel is custom compiled to target 586 class processors.
The distribution is Gentoo Linux 32-bit x86.bloxd io
For this Gentoo Linux installation, I use the default Version 17.0 profile and not desktop profile.
This is to avoid being forced to install Rust compiler to compile a newer version of librsvg.
I personally hate Rust language due to its default SSE2 instruction set requirement on a 32-bit x86 platform.

Due to low memory and graphics requirements, I exclusively use LXDE on this storage device.
But as soon as I get past LXDM based log in screen, as soon as I reach LXDE, forced entry into sleep happens every 60 or so seconds, and I need to press a key on the keyboard to get it out of a blank screen with a white cursor blinking on the top left hand corner.
To prevent a freeze, I need to set ACPI power state support to S1 state or no power state (probably means S0 state) setting (S3 state causes a freeze).
When the screen turns blank with a blinking white cursor on the top left hand corner, if I press a key on the laptop keyboard, I am able to get out of the blank screen 98%of the time.
The rest of 2% of the time, either I loose the screen or gets a distorted screen.
I can still recover from this situation, but it gets tricky since if I press the power button, the computer will enter a shutdown.

Anyway, how can I prevent this periodic forced entry into the sleep mode?
This issue appears to be an LXDE specific issue, is this a bug of LXDE?
I will appreciate if someone can help me on this issue.
To prevent this issue from happening, you can try disabling sleep and hibernation modes in your Linux system. To do this, you can disable the following systemd targets: sleep.target, suspend.target, hibernate.target, and hybrid-sleep.target.

Alternatively, you can try modifying the systemd configuration by setting the IdleAction to ignore in /etc/systemd/logind.conf.
andreen
Posts: 7
Joined: Thu Aug 03, 2023 6:43 am

Re: LXDE and repeated periodic sleep entries

Post by andreen »

Alternatively, you can modify the systemd configuration by editing the slither io /etc/systemd/logind.conf file. Look for the IdleAction parameter and set it to ignore. If the parameter doesn't exist, you can add it to the file.
JeanCosta
Posts: 1
Joined: Sun Aug 11, 2024 2:41 pm
Contact:

Re: LXDE and repeated periodic sleep entries

Post by JeanCosta »

It looks like you're dealing with a rather intricate issue with LXDE, potentially due to system configuration or a specific interaction between ACPI and LXDE on your machine. You've already received some helpful suggestions, but let me add a few insights that might assist further. ;)

1. Disabling Power Management in LXDE:
Since the problem seems to arise shortly after logging into LXDE, it could be related to LXDE's power management settings. You can try disabling the power management daemon specific to LXDE. :)

To do this, try the following:

Edit ~/.config/lxsession/LXDE/autostart: If the power manager is autostarted, you can comment it out or remove it. Look for entries like @lxde-pi-screensaver or @lxde-pi-power-manager.
Install and configure xfce4-power-manager: Although it's part of Xfce, it works well in LXDE and might offer better control over power management settings.
2. Kernel Parameters for ACPI:
Given that adjusting ACPI settings partially mitigates the issue, you might want to experiment with additional kernel boot parameters that could help stabilize power state management. For example, adding acpi=off (which disables ACPI entirely) or acpi_sleep=s1 to your boot parameters might resolve the periodic sleep entries. Modify your GRUB configuration to test these options:

bash

sudo nano /etc/default/grub
Then update the GRUB_CMDLINE_LINUX_DEFAULT line to include one of the parameters above, and update GRUB: :D

bash

sudo update-grub
3. Disabling Unnecessary Systemd Targets:
As mentioned, disabling certain systemd targets can be a solution. This can be done with:

bash

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Additionally, modifying /etc/systemd/logind.conf and setting IdleAction=ignore might prevent system sleep due to inactivity.

4. Investigating and Updating the OpenChrome DRM Code:
Since you are using a custom DRM module, it's possible that there could be a conflict or bug in the version of OpenChrome you are using. Ensure you are using the latest patches or consider reaching out to the OpenChrome maintainers if this issue persists even with all other potential fixes applied.

Given the specialized nature of your setup, especially with the custom DRM code and a non-standard processor, these steps may require some trial and error. If the issue persists, debugging further with logs from journalctl and reviewing the kernel logs for any ACPI-related errors right after the system resumes from sleep could provide more clues.

Feel free to share additional details if you need more targeted advice!
Hello, I'm Jean and I passionate of IT and SEO, follow my adventure on the website : https://saudade-seo.fr/
Post Reply