uConsole-Sleep v1.3

mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
nano .config/sway/config

and

set $mod Mod1

and what physical key is it? what do you press to switch workplace?

fn + alt + 1 ?

mod1 - Alt (left and right)

alt+1 switch 1 workspace

alt + 2 ….

1 Like

Would this work with Rex’s Trixie 6.12.y?
My uConsole hasn’t arrived yet, so I haven’t been able to test it, but wondering if anyone else has tried it.

I’m going to be setting up my main daily card to trixie tomorrow. I’ll post here if I had to make any changes. Might just turn it into a package for bookworm and trixie for easy install.

4 Likes

Works great on my CM3 running on top of Rex’s Trixie image! Power consumption went from 3.2W idle to just over 2W. A 50% increase in idle time is nothing to be laughed at, even though it doesn’t really compare to the sleep mode on a laptop which to my understanding is impossible to implement on the RPi platform.

2 Likes

Thank you! Just tested on Rex’s Trixie. Works as expected.

Question: can I change config so it will ask password on wake up? Like it does when I hold the power key and choose Lock Screen

you can add swaylock -p to the script that gets activated to “sleep” the device.

1 Like

just tested it on the Rex’s Trixie + Gnome. On button hold it shows only Power Off option. On short press it works as expected + asks for the password without additional edits

Tested it now on CM4 with Rex’s Trixie image. The screen turns off and the keyboard locks. However the max CPU frequency is not adjusted. The value in cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq stays in my case at 2000000. HTOP also shows 2000Mhz.

checked it with SSH connection to the device while putting it to sleep, is this maybe preventing the adjustment of that value?

Update:

Seems like something is wrong with the keyboard detection part of the script. Chatgpt solved it for me with this change:

From:
def find_internal_kb(ids=[“feed:0000”, “1eaf:0003”]):
To:
def find_internal_kb(ids=[“1eaf:0024”,“1eaf:0003”,“feed:0000”]):

2 Likes

After some invetigation I found this errors:

clockworkpi sleep_power_control[816]: File "sleep_power_control.py", line 62, in <module> clockworkpi sleep_power_control[816]: Exception: there's no matched kb

The above mentioned fix is available in this fork:

And the deb file can be downloaded here:

2 Likes

Which compute module have you tried this with?