Problem wine stop shutdown or reboot

Greetings .
Wine stops shutting down or restarting the pc. :grimacing:
2 minute wait time:
a stop job is running for user manager for uid 1000
if I run:
wineserver --kill
fast shutdown or restart.
I appreciate any help.

Perhaps one way would be to create a systemd service to kill off the process before shutdown or reboot.

Something like the following perhaps:


 [Unit]
    Description= Kill wineserver before shutdown
    Before=shutdown.target halt.target poweroff.target reboot.target

    [Service]
    RemainAfterExit=true
    ExecStart=/usr/bin/true
    ExecStop=/usr/bin/pkill wineserver

    [Install]
    WantedBy=shutdown.target halt.target poweroff.target reboot.target multi-user.target

Call it kill_wineserver.service and put it in /etc/systemd/system.

Next run

sudo systemctl daemon-reload

sudo systemctl enable --now kill_wineserver.service

Check its status:

systemctl status kill_wineserver.service

Now reboot or shutdown and see if it works.

Edit:
I am not using Wine so I can’t test this myself.
If /usr/bin/pkill wineserver won’t work, replace the command to the appropriate one.

2 Likes

What are you running in Wine?

hi still with the problem and I don’t understand:
what can be the appropriate command? thank you

Edit:
I am not using Wine so I can’t test this myself.
If /usr/bin/pkill wineserver won’t work, replace the command to the appropriate one. :grimacing:

hi… adobe acrobat dc

this only happens in gnome… am i missing something?

Checking carefully this problem is with arch and with gnome or kde, not with mate or xcfe, but in debian with gnome or kde it works well and shuts down or restarts quickly.
Am I missing something or what do I do with gnome or kde in arch?
I appreciate help

I got the problem on Arch with KDE Plasma and on Debian with KDE Plasma.
→ simple solution:
I mounted a key in keyboard shortcuts of plasma and set up the following command behind it:
systemctl poweroff && wineserver -k

I use the key to shutdown the system (Im to lazy to use the mouse and click on shutdown). I have used a special key for it to not happen as a accident.

Systemd didn’t work, because of wineserver running as user and systemd was not cooperative on that matter.

Should that impact the wineserver handling shutdown requests of the os? Why are you asking that?

Some Wine / application bugs can cause shutdown process to hang until wine is killed by systemd. For example shutting down right after playing Roblox is a known cause.

1 Like

Thanks for the reply, will send the app specific problem to the wine developers. The app is Amazon music.

You can fix it by opening winecfg and create new library (winedevice.exe), add, edit and in load order disable. Accept