Power menu options "Reboot/Shutdown" are no longer available despite a properly configured polkit with a current master build running on Debian 10 X11 Windowing system
Menu is like expected when building and using PR #18629 from two days ago on the same machine.
we need reboot / power off etc. back :)
only "Exit" and "Enter master mode" are shown on the power menu
most likely introduced by #18534
Steps to reproduce the behavior:
https://paste.kodi.tv/nexerijile.kodi
Used Operating system:
I confirm that installing pre-#18534 build fixes the issue. Also "Selected logind/UPower as PowerSyscall" log entry appears on working build and does not appear on faulty ones.
I can confirm this too, not running debian, but a home grown self compiled toy OS, I'm positive it's not OS specific bug,
power stuff was working fine before multiwindowing was merged.
x11, gl (mesa, amdgpu)
I added some poor man's debug logging to try and narrow it down,
CLinuxPowerSyscall::Register() from https://github.com/xbmc/xbmc/blob/master/xbmc/platform/linux/powermanagement/LinuxPowerSyscall.cpp#L62 gets called
CLinuxPowerSyscall::CreateInstance() from here https://github.com/xbmc/xbmc/blob/master/xbmc/platform/linux/powermanagement/LinuxPowerSyscall.cpp#L22 does not.
grep -i powersys kodi.log
2020-10-29 02:09:05.824 T:10318 INFO <general>: CLinuxPowerSyscall::Register() - called
The problem is that now CServiceManager::InitStageTwo() which initializes the powermanager get called before windowing system initialization which registers CLinuxPowerSyscall::Register() , before the PR windowing was initialized just before InitStageTwo().
I was hoping I would be able to provide a quick patch, but looking at servicemanager code made me realize that this is lightyears above my paygrade :(
Hacky approach - moves powermanager initialization to InitStageThree() https://gist.githubusercontent.com/asavah/ecb200090a78df85d88b5c647655baf1/raw/c655c0958f234a4bc7fda1a5fd1c8a9f27ca1232/927-powermanager-initsgtagethree.patch
I don't think this is any good so I'm not creating a PR. If any dev thinks this is actually a proper fix - let me know will make proper PR.
can you please test this fix https://github.com/lrusak/xbmc/commit/edcca51a56c1fa300941773ad8f9771ff74bea72
@lrusak your patch is identical to mine ) It does work, runtime tested.
actually, this is likely the better fix https://github.com/lrusak/xbmc/commit/33aad0945636fb55e012b57d5f679fabdaff19ed
@lrusak can confirm the better fix working after rebasing https://github.com/howie-f/xbmc/commit/30c0cd625131dcb3b3c01e2fe9c13a5926c287ea
LGTM
last one looks and works fine
Most helpful comment
@lrusak can confirm the better fix working after rebasing https://github.com/howie-f/xbmc/commit/30c0cd625131dcb3b3c01e2fe9c13a5926c287ea