Comments (4)
@agspoon Thank you for the detailed report. Will follow up.
Why are you running ddcutil from a udev rule? What's the use case? I continue to be surprised by the ways people use ddcutil. Other than ddcutil chkusbmon which is specially coded to be run from a udev rule, ddcutil assumes a normally configured environment.
Options --disable-capabilities-cache and --disable-dynamic-sleep should eliminate file io, and --syslog never will disable writing to the system log.
As for suppressing an error message if a file cannot be written, I believe that by default things should not fail silently. I think its reasonable to expect require use of command line options to disable the features that cause the error messages.
from ddcutil.
ddcutil now checks for NULL values returned by dsa2_stats_cache_file_name() and related functions. which should resolve the segfault problem. The changes have been pushed to branch 2.0.0-dev.
If NULL values are encountered, ddcutil writes error messages to the terminal and system log. Use --disable-dynamic-sleep etc. to avoid them.
from ddcutil.
Thanks! User's, the bane of every developer :)
My use case is basically that I'm too cheap to buy a KVM to switch between my two computers. A low level aggravation that I suffer a couple dozen times a day. I have a small USB A/B switch that I use to swap the keyboard/mouse, but had to go through a awkward button and OSD interface on my LG monitor to switch inputs.
Thanks to someone figuring out how to programmatically switch inputs on these broken LG monitors (Issue #100) , and your implementation of the --i2c-source-addr
option, I can now automate the process.
I wrote a couple udev rules that fire whenever the USB keyboard is added or removed, that runs ddcutil to switch the monitor input accordingly. Works great. A poor man's KVM. I noticed only later that my journal was filled with backtrace logs from the above SEGV fault in ddcutil (apparently the stats are written after the work is done).
I agree that suppressing the error message is not a good idea, I was just wondering if I was missing out on some important functionality by disabling the dynamic-sleep capability, when all I really wanted to avoid was writing to the cache file. Regardless, it works for my weird corner use case, so I'm good. Just thought I'd pass on what I found regarding the NULL pointer.
Thanks again :)
from ddcutil.
Thank you for letting me know the use case. I'll keep it in mind as I'm working on ddcutil. I'm continually amazed at the clever ways people find to use ddcutil.
Dynamic sleep depends on having a cache file to tune the sleep-multiplier over many program executions, so disabling dynamic sleep has little impact on execution time in your case. If execution time matters, you can experiment with option --sleep-multiplier.
from ddcutil.
Related Issues (20)
- "Keeping adjust sleep multiplier" warning shown many times HOT 1
- Monitor resets many times on boot after new udev rule installed HOT 44
- System cannot enter S0ix sleep after running ddcutil detect HOT 8
- No (DisplayLink) displays found on 2.1.4, but works on 2.0.0 HOT 6
- ddcutil 2.1.4-1: DDC communication failed HOT 3
- [debian] updating linux-image pkg fails due to ddcutil dkms module failure HOT 2
- Cannot get capabilities: Maximum DDC retries exceeded. HOT 8
- Add an option to return the capabilities for a specific feature. HOT 4
- DDC communication failed (getvcp of feature x10 returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_DDC_DATA(15)]) HOT 1
- Ddcutil crashes when some usb devices are connected HOT 1
- `ddcutil` ignores the final entry in `XDG_DATA_DIRS` when looking for an `mccs` file HOT 1
- Cannot update beyond 1.2.2-1 HOT 2
- Samsung C24F390 - DDC communication failed HOT 1
- ddcui controls smaller than font size on Ubuntu 24.04 HOT 1
- Can't set contrast on LG 27UN880-B.AEU HOT 2
- make: deletes build_details.h before use HOT 1
- UGREEN Revodok Pro 308: ddcutil works with 1 display but not with 2 HOT 5
- Invalid checksum of Debian Trixie package HOT 2
- DDC Communication failed. [EIO in ddc_write_read_with_retry, causes: EIO] HOT 2
- ddcutil detect is unreliable in detecting monitors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddcutil.