You are not logged in.

#1 2023-03-15 21:56:03

terminalmage
Member
Registered: 2022-10-19
Posts: 3

Using physlock, "^@" is printed to console on resume from suspend

I recently installed Arch on a new laptop, and I'm using physlock on suspend to lock the screen, just like on my other laptop. But on the new laptop (a Lenovo ThinkPad 11e), every time I resume from suspend, there is a ^@ in the top left of the console. So if my physlock command has a message Enter password..., then the console will read:

^@Enter password...

Password:

If the physlock command does not use -p (i.e. no message), it reads:

^@Password:

acpi_listen is only showing a single event on resume:

ibm/hotkey LEN0268:00 00000080 00006032

This same exact event shows up on resume from sleep and resume from hibernate. However, this null character (^@) only gets written to the console on resume from sleep.

Are there further troubleshooting steps I should be taking to find what is causing this character to be written to the console? It doesn't break resume in any way, it's just an annoyance that I'd like to fix.

Last edited by terminalmage (2023-03-15 21:57:36)

Offline

#2 2023-03-16 14:23:50

terminalmage
Member
Registered: 2022-10-19
Posts: 3

Re: Using physlock, "^@" is printed to console on resume from suspend

Well I don't know the root cause of this, but I have solved it nonetheless.

I had been using a shell script as my ExecStart, so that I could shell out to fortune to get a random message to pass to physlock. This method worked just fine on my other laptop, but apparently not on this new one. I was able to fix it by replacing the shell script with sh -c like so:

[Unit]
Description=Lock screen
Before=sleep.target suspend.target hibernate.target

[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/sh -c '/usr/bin/physlock -dmsp "$(/usr/bin/fortune /etc/fortune/funny_quotes)"'

[Install]
WantedBy=sleep.target suspend.target hibernate.target

If anyone has insight on what might have caused this, I would appreciate their input. The command string the sh -c is exactly what was in the shell script I was previously using in my ExecStart.

Last edited by terminalmage (2023-03-16 14:27:17)

Offline

Board footer

Powered by FluxBB