Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brightness manager is slow to respond #11

Closed
everything411 opened this issue Sep 27, 2024 · 6 comments · Fixed by #15
Closed

brightness manager is slow to respond #11

everything411 opened this issue Sep 27, 2024 · 6 comments · Fixed by #15
Assignees
Labels
bug Something isn't working

Comments

@everything411
Copy link

the process /bin/pkexec lingmo-screen-brightness --set XX starts but the promoting dialog shows after several minutes later.
other lingmo apps also failed to show window when pkexec is stucking.
also, every pkexec run left one polkit-agent-helper-1 process running in background without exiting
env: a fresh Hydrogen install

@everything411
Copy link
Author

possibly related to lingmo-polkit-agent

@everything411
Copy link
Author

lingmo-polkit-agent log stuck at

New PolkitAgentListener  0x55d2fecb8040                                                                                                      
Adding new listener  PolkitQt1::Agent::Listener(0x7ffde7a17d40) for  0x55d2fecb8040                                                          
Listener adapter polkit_qt_listener_initiate_authentication                                                                                  
GSimpleAsyncResult: 0x55d2fece8a40                                                                                                           
polkit_qt_listener_initiate_authentication callback for  0x55d2fecb8040                                                                      
Creating ConfirmationDialog    

attach to it and the backtrace is

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe5c829e22e in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55d2fecf8ed0)
    at ./nptl/futex-internal.c:57
warning: 57     ./nptl/futex-internal.c: 没有那个文件或目录
(gdb) bt
#0  0x00007fe5c829e22e in __futex_abstimed_wait_common64
    (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55d2fecf8ed0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common
    (futex_word=futex_word@entry=0x55d2fecf8ed0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
#2  0x00007fe5c829e2ab in __GI___futex_abstimed_wait_cancelable64
    (futex_word=futex_word@entry=0x55d2fecf8ed0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007fe5c82a0990 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55d2fecf8e80, cond=0x55d2fecf8ea8)
    at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x55d2fecf8ea8, mutex=0x55d2fecf8e80) at ./nptl/pthread_cond_wait.c:618
#5  0x00007fe5c88e4d57 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe5ca31dc33 in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fe5ca2d9448 in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fe5ca2d97bc in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007fe5ca2e54a7 in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007fe5ca2e55f9 in QDBusInterface::QDBusInterface(QString const&, QString const&, QString const&, QDBusConnection const&, QObject*)
    () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#11 0x00007fe59c4259f6 in ThemeManager::onDBusColorChanged() () at /usr/lib/x86_64-linux-gnu/qt5/qml/LingmoUI/libLingmoUI.so
#12 0x00007fe59c426876 in ThemeManager::initData() () at /usr/lib/x86_64-linux-gnu/qt5/qml/LingmoUI/libLingmoUI.so
#13 0x00007fe59c426be0 in ThemeManager::ThemeManager(QObject*) () at /usr/lib/x86_64-linux-gnu/qt5/qml/LingmoUI/libLingmoUI.so
#14 0x00007fe59c4201f1 in ??? () at /usr/lib/x86_64-linux-gnu/qt5/qml/LingmoUI/libLingmoUI.so
#15 0x00007fe5c98826e1 in QJSValue QQmlEnginePrivate::singletonInstance<QJSValue>(QQmlType const&) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#16 0x00007fe5c98ff115 in QV4::QQmlTypeWrapper::virtualResolveLookupGetter(QV4::Object const*, QV4::ExecutionEngine*, QV4::Lookup*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#17 0x00007fe5c97c682d in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#18 0x00007fe5c97cb207 in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#19 0x00007fe5c975be7a in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#20 0x00007fe5c98eb781 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#21 0x00007fe5c98f1c08 in QQmlBinding::evaluate(bool*) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#22 0x00007fe5c98f5f47 in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#23 0x00007fe5c98f39d4 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#24 0x00007fe5c990126a in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#25 0x00007fe5c988f7bc in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#26 0x00007fe5c9891ce9 in QQmlComponentPrivate::completeCreate() () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#27 0x00007fe5c9882a90 in QJSValue QQmlEnginePrivate::singletonInstance<QJSValue>(QQmlType const&) ()
--Type <RET> for more, q to quit, c to continue without paging--
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#28 0x00007fe5c98ff115 in QV4::QQmlTypeWrapper::virtualResolveLookupGetter(QV4::Object const*, QV4::ExecutionEngine*, QV4::Lookup*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#29 0x00007fe5c97c682d in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#30 0x00007fe5c97cb207 in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#31 0x00007fe5c975be7a in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#32 0x00007fe5c98eb781 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#33 0x00007fe5c98f1c08 in QQmlBinding::evaluate(bool*) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#34 0x00007fe5c98f5f47 in ??? () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#35 0x00007fe5c98f39d4 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#36 0x00007fe5c990126a in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#37 0x00007fe5c988f7bc in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) ()
    at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#38 0x00007fe5c9891ce9 in QQmlComponentPrivate::completeCreate() () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#39 0x00007fe5c9891e81 in QQmlComponent::create(QQmlContext*) () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#40 0x00007fe5c9ee2b43 in QQuickView::continueExecute() () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#41 0x000055d2e3854913 in ??? ()
#42 0x000055d2e3853c20 in ??? ()
#43 0x00007fe5ca373158 in ??? () at /lib/x86_64-linux-gnu/libpolkit-qt5-agent-1.so.1
#44 0x00007fe5ca21e928 in ??? () at /lib/x86_64-linux-gnu/libpolkit-agent-1.so.0
#45 0x00007fe5c81360aa in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#46 0x00007fe5c9b0c7df in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fe5c9b0ea17 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007fe5c9b0f180 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007fe5c8b3b1ed in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007fe5c8adcd02 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007fe5c8ae5722 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#52 0x000055d2e3852a5b in ??? ()
#53 0x00007fe5c823edba in __libc_start_call_main (main=main@entry=0x55d2e3852880, argc=argc@entry=1, argv=argv@entry=0x7ffde7a17ef8)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#54 0x00007fe5c823ee75 in __libc_start_main_impl
    (main=0x55d2e3852880, argc=1, argv=0x7ffde7a17ef8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffde7a17ee8) at ../csu/libc-start.c:360
#55 0x000055d2e3852bb1 in ??? ()

@everything411
Copy link
Author

the dialogs showed after stucking several minutes, full log

New PolkitAgentListener  0x55d2fecb8040                                                                                                      
Adding new listener  PolkitQt1::Agent::Listener(0x7ffde7a17d40) for  0x55d2fecb8040                                                          
Listener adapter polkit_qt_listener_initiate_authentication                                                                                  
GSimpleAsyncResult: 0x55d2fece8a40                                                                                                           
polkit_qt_listener_initiate_authentication callback for  0x55d2fecb8040                                                                      
Creating ConfirmationDialog                                                                                                                  
file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/lingmo-style/Button.qml:28: ReferenceError: FishUI is not defined                
file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/lingmo-style/Button.qml:25: ReferenceError: FishUI is not defined                
file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/lingmo-style/Button.qml:28: ReferenceError: FishUI is not defined                
file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/lingmo-style/Button.qml:25: ReferenceError: FishUI is not defined                
REQUEST                                                                                                                                      
REQUEST                                                                                                                                      
COMPLETED                                                                                                                                    
Listener adapter polkit_qt_listener_initiate_authentication_finish                                                                           
polkit_qt_listener_initiate_authentication_finish callback for  0x55d2fecb8040                                                               
Deleting ConfirmationDialog     

@everything411
Copy link
Author

after further debuging, it stuck at

m_view->setSource(QUrl(QStringLiteral("qrc:/main.qml")));

@everything411
Copy link
Author

as a workaround we can edit /etc/xdg/autostart/lingmo-polkit-agent.desktop to use kde polkit agent

[Desktop Entry]
Type=Application
Name=PolicyKit Handler
TryExec=lingmo-polkit-agent
# workaround
Exec=/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1
NoDisplay=true

@elysia-best elysia-best added duplicate This issue or pull request already exists bug Something isn't working and removed duplicate This issue or pull request already exists labels Sep 29, 2024
@elysia-best
Copy link
Member

elysia-best commented Sep 29, 2024

Ok, I figured out what's happened.

@chun-awa chun-awa added the help wanted Extra attention is needed label Oct 5, 2024
chun-awa added a commit that referenced this issue Oct 5, 2024
@chun-awa chun-awa removed the help wanted Extra attention is needed label Oct 5, 2024
@elysia-best elysia-best linked a pull request Oct 5, 2024 that will close this issue
@chun-awa chun-awa closed this as completed by moving to Done in Lingmo OS 3.0 Oct 5, 2024
kodiakhq bot pushed a commit that referenced this issue Oct 5, 2024
* fix #11

* Update com.lingmo.brightness.pkexec.policy.in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants