linuxmint / linuxmint/cinnamon-session

Cinnamon shutdown fails to leave system in a restartable power state when OpenRazer daemon is running

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
31
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Distribution

Mint 22.3

Package version

6.6.9

Graphics hardware in use

No response

Frequency

Always

Bug description

On Linux Mint 22.3 Cinnamon, using Cinnamon menu → Shut Down leaves my PC in a bad power state when openrazer-daemon is running.

The machine appears to shut down completely, but afterwards pressing the physical power button does nothing. I must unplug and reconnect the AC power cable before the machine can boot again.

The same machine shuts down and powers back on correctly when using:

sudo systemctl poweroff

or:

sudo shutdown -h now

The Cinnamon shutdown problem also disappears completely if openrazer-daemon.service is stopped or masked before shutdown.

I believe OpenRazer is likely the primary trigger, but I am reporting this here because the failure only occurs through the Cinnamon session shutdown path.

System information
  • Linux Mint 22.3 Zena
  • Cinnamon 6.6.9
  • Kernel: 7.0.0-31-generic
  • OpenRazer: 3.12.4~ubuntu24.04.1
  • Mouse: Razer Basilisk V3 Pro 35K
  • USB ID: 1532:00cd

Actual result:

The PC does not start until AC power is disconnected and reconnected.

A/B test

With OpenRazer running:

Cinnamon menu → Shut Down    FAIL
sudo systemctl poweroff      OK
sudo shutdown -h now         OK

If I first run:

systemctl --user stop openrazer-daemon.service

then:

Cinnamon menu → Shut Down    OK
sudo systemctl poweroff      OK
sudo shutdown -h now         OK

I have now masked the service:

systemctl --user mask --now openrazer-daemon.service

and Cinnamon shutdown works reliably again.

Relevant Cinnamon/systemd shutdown log

During the failed shutdown, Cinnamon correctly appears to request a systemd shutdown:

cinnamon-session-binary: Requesting system shutdown...
cinnamon-session-binary: Attempting to shutdown using systemd...
systemd-logind: The system will power off now!
systemd-logind: System is powering down.

The shutdown then continues all the way through:

systemd[1]: Reached target poweroff.target - System Power Off.
systemd[1]: Shutting down.
systemd-shutdown[1]: Syncing filesystems and block devices.
systemd-shutdown[1]: Sending SIGTERM to remaining processes...

So the Cinnamon shutdown request itself appears successful.

Relevant OpenRazer behavior

While openrazer-daemon is active, the kernel repeatedly reports:

razermouse: Command timed out. status: 04
transaction_id.id: 1f
command_class: 07
command_id.id: 80

During Cinnamon shutdown, the user OpenRazer service also sometimes exits with:

openrazer-daemon.service: Main process exited, code=exited, status=1/FAILURE
openrazer-daemon.service: Failed with result 'exit-code'.

When the OpenRazer daemon is masked, those repeated timeout messages disappear and Cinnamon shutdown works normally.

Steps to reproduce

With openrazer-daemon.service running:

  1. Boot Linux Mint and log into Cinnamon.
  2. Use Cinnamon menu → Shut Down.
  3. The system visually powers off.
  4. Press the physical PC power button.
Expected behavior

The machine should power off into a normal state where the physical power button can start it again.

Additional information

This PC previously had a separate firmware-related shutdown problem, which was fixed by updating the BIOS.

The current issue appeared again after installing/using the Razer mouse with OpenRazer and is reproducibly controlled by whether openrazer-daemon is running.

The OpenRazer kernel module can remain installed. Disabling only the userspace daemon is sufficient to eliminate the shutdown problem.

I am also reporting this to the OpenRazer project https://github.com/openrazer/openrazer/issues/2907.

Please let me know if additional Cinnamon session logs or a comparison trace between Cinnamon shutdown and systemctl poweroff would be useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no source file or test; start at the Cinnamon session manager's systemd shutdown path and reproduce the A/B comparison with openrazer-daemon.service running versus masked. Compare the reported Cinnamon, systemd-logind, and OpenRazer behavior, with done meaning the shutdown path reliably leaves the machine restartable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.