pop-os / cosmic-settings-daemon Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
If geoclue is not available for one reason or another, cosmic-settings-daemon will fail to run, the fix can be as simple as the below patch. I do however get the below stacktrace when doing this. I'm not sure if it's directly related or not. however this breaks setting theme in GTK applications. It takes a while for the segfault to occur. once it does occur, the theme can change once, and then never again afterwards.
diff --git a/src/main.rs b/src/main.rs
index 4f8e0c2..6cfce62 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -326,8 +326,11 @@ pub enum Change {
#[tokio::main(flavor = "current_thread")]
async fn main() -> zbus::Result<()> {
- std::process::Command::new(GEOCLUE_AGENT.unwrap_or("/usr/libexec/geoclue-2.0/demos/agent"))
- .spawn()?;
+ match std::process::Command::new(GEOCLUE_AGENT.unwrap_or("/usr/libexec/geoclue-2.0/demos/agent"))
+ .spawn(){
+ Ok(_) => println!("Geoclue started)"),
+ Err(e) => { println!("Geoclue failed with {}", e) },
+ }
task::LocalSet::new()
.run_until(async {
let backlights = match backlight_enumerate() {
Geoclue failed with No such file or directory (os error 2)
Failed to watch theme org.freedesktop.DBus.Error.NoReply: Remote peer disconnected
Stack backtrace:
0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.81/src/error.rs:565:25
1: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1963:27
2: cosmic_settings_daemon::theme::watch_theme::{{closure}}
at ./src/theme.rs:194:18
3: cosmic_settings_daemon::main::{{closure}}::{{closure}}::{{closure}}
at ./src/main.rs:461:66
4: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:328:17
5: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/loom/std/unsafe_cell.rs:16:9
6: tokio::runtime::task::core::Core<T,S>::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:317:13
7: tokio::runtime::task::harness::poll_future::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:485:19
8: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
9: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
10: __rust_try
11: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
12: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
13: tokio::runtime::task::harness::poll_future
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:473:18
14: tokio::runtime::task::harness::Harness<T,S>::poll_inner
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:208:27
15: tokio::runtime::task::harness::Harness<T,S>::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:153:15
16: tokio::runtime::task::raw::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:271:5
17: tokio::runtime::task::raw::RawTask::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:201:18
18: tokio::runtime::task::LocalNotified<S>::run
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/mod.rs:416:9
19: tokio::task::local::LocalSet::tick::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:676:63
20: tokio::runtime::coop::with_budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5
21: tokio::runtime::coop::budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5
22: tokio::task::local::LocalSet::tick
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:676:31
23: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:982:16
24: tokio::task::local::LocalSet::with::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:730:13
25: std::thread::local::LocalKey<T>::try_with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
26: std::thread::local::LocalKey<T>::with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
27: tokio::task::local::LocalSet::with
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:728:9
28: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:968:9
29: tokio::task::local::LocalSet::run_until::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/task/local.rs:635:19
30: cosmic_settings_daemon::main::{{closure}}
at ./src/main.rs:566:10
31: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
32: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:659:57
33: tokio::runtime::coop::with_budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5
34: tokio::runtime::coop::budget
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5
35: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:659:25
36: tokio::runtime::scheduler::current_thread::Context::enter
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:404:19
37: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:658:36
38: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:737:68
39: tokio::runtime::context::scoped::Scoped<T>::set
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/scoped.rs:40:9
40: tokio::runtime::context::set_scheduler::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:26
41: std::thread::local::LocalKey<T>::try_with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
42: std::thread::local::LocalKey<T>::with
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
43: tokio::runtime::context::set_scheduler
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:9
44: tokio::runtime::scheduler::current_thread::CoreGuard::enter
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:737:27
45: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:646:19
46: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:175:28
47: tokio::runtime::context::runtime::enter_runtime
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/runtime.rs:65:16
48: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/current_thread/mod.rs:167:9
49: tokio::runtime::runtime::Runtime::block_on
at /home/quack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/runtime.rs:348:47
50: cosmic_settings_daemon::main
at ./src/main.rs:329:5
51: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
52: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
53: std::rt::lang_start::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
54: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
55: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
56: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
57: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
58: std::rt::lang_start_internal::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
59: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
60: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
61: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
62: std::rt::lang_start_internal
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
63: std::rt::lang_start
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
64: main
65: <unknown>
66: __libc_start_main
67: _start. Will try again in 0s
EDIT: installed geoclue and recompiled the app with proper envvar and it now works fine without segfault, so it does seem related
Show maximize and minimize currently only affects libcosmic windows and SSDs, they should also affect GTK windows through gsettings.
I used it on a spare laptop while using it I didn’t have any actions to save the battery before hitting 0% 🥲.
it caused a CMOS reset in the UEFI and corrupted the boot sections of the hard drive needing a USB to reinstall as refresh didn’t fix it.
I think auto shutdown at 5% is needed to protect users from messing up their devices before the alpha release of Cosmic De as well as a low battery warning, as I had no clue it was on low battery.
Sorry if this sounds rude but felt it was prudent to flag the issue due to destroying the installation and didn't want it to happen at the release.
It's really annoying on my laptop, because the minimal luminosity is too low, and the minimal luminosity + 1 is too high.
I would really prefer if the click on the brightness button start by increasing by one or two. And incremental click will up this delta. Let's say 1, then 2, then 3, 4, and 5.
Default to suspend.
The com.system76.CosmicSettingsDaemon dbus interface could provide a signal for any detected changes to .config/cosmic
files, reporting the app name, config version, and config key on that signal. Then libcosmic could optionally attach to this signal and filter out important events instead of using inotify.
I don't think the behaviour is right currently. Probably, a signal should be set at the launch of this daemon, to notify to change the theme, and that's it.
Because currently, if we change the theme to dark because we are exceptionally in the dark in the middle of the day, the daemon will automatically reset the theme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.