Is it okay for me to bump this. I'm currently debugging my distros powerdevil package, since I'm unable to run git version. Not a big deal, I can switch sources and recompile for testing.
However I'm struggling to understand some bits in powerdevilbrightnesslogic.cpp: #63 in BrightnessLogic::increased: int step = m_steps - (m_valueMax - m_value - 1) * m_steps / m_valueMax; and #81 BrightnessLogic::decreased int step = (m_value - 1) * m_steps / m_valueMax; It looks like a simple ratio equation yet, shouldn't #81 be like (m_value * m_steps) / m_valueMax - 1; Regards -Ongun On 8 February 2018 at 21:09, Ongun Kanat <ongun.ka...@gmail.com> wrote: > It looks like I was wrong. I've ended up copying compiled service > files into /usr/share/dbus-1 and I still couldn't trigger neither > backlight notification nor powerdevil. > > dbus-monitor shows no activity either. On my regular plasma desktop I > can see dbus messages like [1]. > > I'm also including my configuration for further info > [1] dbus-monitor output on my regular plasma 5.12 desktop > https://paste.kde.org/pvc1b0wpw On my git build it is missing. > [2] system-local.conf symlinked to /etc/dbus-1/system-local.conf > https://paste.kde.org/pkvcmkz6s > [3] session-local.conf symlinked to /etc/dbus-1/session-local.conf > https://paste.kde.org/pfiwe84m7 > [4] .desktop file for xsession https://paste.kde.org/ph5r8agfy > [5] runPlasma.sh https://paste.kde.org/p87wfff98 > > Any clues? > > -Ongun > > On 8 February 2018 at 02:33, David Edmundson <da...@davidedmundson.co.uk> > wrote: >> >> >> On Wed, Feb 7, 2018 at 10:47 PM, Ongun Kanat <ongun.ka...@gmail.com> wrote: >>> >>> Hello devs, >>> >>> I'm trying to contribute by fixing a small bug. I'm proficient with >>> C++ and pretty much used to debug C++ programs with Qt Creator. I've >>> managed to build full plasma desktop into a directory in my home using >>> kdesrc-build. and set environment correctly Now I can launch latest >>> git version of plasma. >>> >>> I'm trying to fix a bug in Powerdevil (as i guess): >>> https://bugs.kde.org/show_bug.cgi?id=371915 >>> It looks like a calculation error is being made somewhere but I >>> couldn't trigger any breakpoint in powerdevil executable. Moreover on >>> git version of plasma it seems like powerdevil is not be able to get >>> any sort of brightness signal at all and the kernel's/framebuffer's >>> standard brightness functionality seems to be triggered. I'm making >>> this guess since the brightness notification is not being shown. On my >>> distro's (Arch, pretty vanilla) version of plasma both notification >>> and powerdevil works and xev displays brightness buttons correctly. >>> >>> Wandering the installed files in my build directory, I realized kdesrc >>> have installed dbus-1/system-services folder into the install >>> directory in my home directory as expected. And there's a dbus service >>> file called org.kde.powerdevil.backlighthelper.service . I think this >>> file doesn't get started since it's not in the real /usr/share/dbus-1 >>> folder. Instead the distro's version of it gets started which is >>> incompatible and is not a part of my git build. Hence, no backlight >>> signal has been gotten caught and transferred to org.kde.powerdevil >>> service. >>> >>> So, my questions are: >>> - Is my reasoning correct? >> >> >> Certainly the part about it loading the distro version. >> No idea about whether it's compatiable or not. >> >>> - If it's, is there any clean way to force dbus to launch the files in >>> my build directory instead of /usr. Using an environment variable >>> would be nice >> >> >> Session bus, yes. >> >> System bus, not really. The problem is because it's run as root it's locked >> down its paths for security. You can't just randomly source other places >> You'll also have an equivalent problem with polkit actions and rules files >> which you need here. >> >> You can modify system.conf to add an include dir, but you'll need to do >> that as root in your system supplied config file. >> >> I haven't found a good solution for the polkit problem without just adding >> symlinks. >> >> David