Code Monkey home page Code Monkey logo

Comments (11)

rockowitz avatar rockowitz commented on May 26, 2024

Thank you for the error report!

First off, DDCRC_RETRIES is indeed a valid status code. 3015 is its
numeric value. The I2C bus is inherently unreliable. It is the
application's responsibility to perform retry if an error is detected.
In my experience, most monitors are pretty clean. Some, such as Dell
P2014H's (I've tested several) have very high error rates.
DDCRC_RETRIES indicates that the maximum number of retries has been
exceeded.

That said, there's something peculiar going on here. "ddctool
capabilities" succeeds. It is what I call a "multi-exchange" command,
requiring multiple I2C writes and reads, each of which must succeed.
This, more than anywhere, is where I would expect to see retries. So my
best guess is that I'm treating some fatal error as retryable.

I'm going to suggest several things:

  1. Add the "--stats" option on all command invocations.

  2. Add "--trace adl --trace ddc" to the setvcp command and send me the
    output.

  3. Execute "ddctool environment". The output may give you a clue if
    something needs to be changed in your environment.
    You can also use the "--verbose" option on this command to dump more
    information.

  4. Does the problem persist if you run ddctool as root?

  5. Execute the command "ddctool interrogate" and send me the output.

Regards,
Sanford

On 06/11/2016 03:47 PM, serkazak wrote:

i get the following error whenever i try to set a vcp value :

Setting value failed. rc=-3015: DDCRC_RETRIES(-3015): maximum retries
exceeded

for instance i send command such as this one
ddctool --adl=0.0 setvcp 10 20

i tried this command maybe a hundred times and it did not work once so
i assume maximum retries is not the problem here.
i use debian stable and use fglrx driver. i am using philips 234E5
display. i got no issues building from source and functions such as
detect, capabilities, getvcp work fine. am i missing something here?
does the return code 3015 refer to anything? here is the commands and
features of this display ;
ddctool.txt
https://github.com/rockowitz/ddctool/files/310440/ddctool.txt

i am quite interested in this tool because i change brightness during
day and night manually every day. it would be great if i could get
this work. also i think tools such as redshift, flux etc could
potentially use this tool.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2, or mute the thread
https://github.com/notifications/unsubscribe/ANhsbuWE0Z3Ty4h9iK7K_lhrza0w93rhks5qKxDHgaJpZM4IzoOR.

from ddcutil.

 avatar commented on May 26, 2024

i think the problem is with write only mode
here is the setvcp command with trace and stats parameters
setvcp.txt

and here is the interrogate
interrogate.txt

by the way i get "(get_hiddev_device_names) scandir() error: No such file or directory" when i issue a command without adl parameter but the rest of the output is the same with and without adl. so i assume it is irrelevant.

i cannot run it as root because it cannot find a display :
"No X display found by ADL. Apparently running in console environment. (ADL_ERR_NO_XDISPLAY)
(get_hiddev_device_names) scandir() error: No such file or directory
No active displays found"

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

On 06/12/2016 06:33 AM, serkazak wrote:

i think the problem is with write only mode
here is the setvcp command with trace and stats parameters
setvcp.txt https://github.com/rockowitz/ddctool/files/310715/setvcp.txt

Yep. Error -2001 is ADL error -1 (ADL_ERR).
The explanation is "Generic Error. Most likely one or more of the
Escape calls to the driver failed!"

This is in the "something weird is going on" category, since the status
code appears to be coming from the core function
(call_ADL_Display_DDCBlockAccess_Get) that's used for all writes and
reads to the monitor, and every read (e.g. on getvcp) requires a prior
write.)

and here is the interrogate
interrogate.txt
https://github.com/rockowitz/ddctool/files/310716/interrogate.txt

Looks like you're using the integrated Radeon graphics on an ASRock
motherboard. The monitor is connected using a VGA cable. (xrandr
reports device CRT1 connected, devices DFP1 and DFP2 disconnected.)

by the way i get "(get_hiddev_device_names) scandir() error: No such
file or directory" when i issue a command without adl parameter but
the rest of the output is the same with and without adl. so i assume
it is irrelevant.

It's a benign error message that needs to be suppressed. When you don't
specify an ADL device, ddctool looks for all monitors. In particular,
some monitors, such as Apple Cinema displays and (more interestingly)
professional level Eizo and NEC monitors communicate settings over the
the USB bus. The error message is just saying that there are no USB
devices of interest.

i cannot run it as root because it cannot find a display :
"No X display found by ADL. Apparently running in console environment.
(ADL_ERR_NO_XDISPLAY)
(get_hiddev_device_names) scandir() error: No such file or directory
No active displays found"

Were you running in a windowed terminal on the GUI screen or had you
switched to a virtual terminal (e.g. ALT-CTL-F1)? I would expect the
former to work, the latter to fail with ADL_ERR_NO_XDISPLAY). If the
former, what terminal program are you using (e.g. gnome-terminal,
mate-terminal, kconsole)? Did you use "sudo ddctool" to run the program
or did you run as root some other way?

My best hunch is that there's something about your monitor that ADL
doesn't like. Can you try connecting it using an HDMI cable?
(According to the specs I found, the monitor has only VGA and HDMI
connections. I can't tell what connections the motherboard has.) Can
you try connecting a different monitor?

I'll study things further on my ADL test system and probably push out
some code with increased diagnostics.

Sanford


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANhsbhAl-k4kZvmUK1JX4ezV9pCPSI8qks5qK-B0gaJpZM4IzoOR.

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

I'm able to reproduce the problem on my fglrx test system. Will keep
you posted.

Sanford

On 06/12/2016 06:33 AM, serkazak wrote:

i think the problem is with write only mode
here is the setvcp command with trace and stats parameters
setvcp.txt https://github.com/rockowitz/ddctool/files/310715/setvcp.txt

and here is the interrogate
interrogate.txt
https://github.com/rockowitz/ddctool/files/310716/interrogate.txt

by the way i get "(get_hiddev_device_names) scandir() error: No such
file or directory" when i issue a command without adl parameter but
the rest of the output is the same with and without adl. so i assume
it is irrelevant.

i cannot run it as root because it cannot find a display :
"No X display found by ADL. Apparently running in console environment.
(ADL_ERR_NO_XDISPLAY)
(get_hiddev_device_names) scandir() error: No such file or directory
No active displays found"


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANhsbhAl-k4kZvmUK1JX4ezV9pCPSI8qks5qK-B0gaJpZM4IzoOR.

from ddcutil.

 avatar commented on May 26, 2024

i switched to radeon driver and now i am able to send vcp commands to the same monitor so it seems to be related with the fglrx driver

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

I've applied a fix (file ddc_packet_io.c) that works here and pushed it
out to github. Let me know. You'll probably also see some diagnostic
output that needs to be cleaned up.

Sanford

On 06/12/2016 06:33 AM, serkazak wrote:

i think the problem is with write only mode
here is the setvcp command with trace and stats parameters
setvcp.txt https://github.com/rockowitz/ddctool/files/310715/setvcp.txt

and here is the interrogate
interrogate.txt
https://github.com/rockowitz/ddctool/files/310716/interrogate.txt

by the way i get "(get_hiddev_device_names) scandir() error: No such
file or directory" when i issue a command without adl parameter but
the rest of the output is the same with and without adl. so i assume
it is irrelevant.

i cannot run it as root because it cannot find a display :
"No X display found by ADL. Apparently running in console environment.
(ADL_ERR_NO_XDISPLAY)
(get_hiddev_device_names) scandir() error: No such file or directory
No active displays found"


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/ANhsbhAl-k4kZvmUK1JX4ezV9pCPSI8qks5qK-B0gaJpZM4IzoOR.

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

Short answer: as expected.

Long answer: There are 3 paths for communicating Monitor Control
Command Set (MCCS) instructions with the monitor.

  1. In the normal case, the video driver surfaces raw I2C communication
    as devices named /dev/i2c-. ddctool is responsible for all the gory
    details of managing the I2C protocol using writes and reads to the
    /dev/i2c-
    devices. All the open source drivers (nouveau, radeon,
    intel) do this, as does Nvidia's proprietary driver.

  2. The AMD fglrx driver wraps I2C communication in an API. So at a
    certain level, ddctool calls fglrx functions instead of doing the low
    level I2C I/O itself.

  3. Some monitors use USB to communicate the Monitor Control Command Set
    (MCCS).

The error, corrected in the patch I uploaded few hours ago, was in
packet adjustment for case (2).

Sanford

On 06/12/2016 05:22 PM, serkazak wrote:

i switched to radeon driver and now i am able to send vcp commands to
the same monitor so it seems to be related with the fglrx driver


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment), or
mute the thread
https://github.com/notifications/unsubscribe/ANhsbmrBm-923ymzXG6SREb2f5f-5auXks5qLHiwgaJpZM4IzoOR.

from ddcutil.

 avatar commented on May 26, 2024

now i got it working with the updated version with fglrx. stats show no retries and it works as expected thank you.

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

I take it I can disregard your post re libudev.h issues.

On 06/13/2016 03:51 PM, serkazak wrote:

now i got it working with the updated version with fglrx. stats show
no retries and it works as expected thank you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANhsblx7DZqlsnqSo5OYOCwJtoRa96d2ks5qLbTbgaJpZM4IzoOR.

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

Are you saying that updating fglrx resolved the retries issue? If so,
what versions of fglrx did you upgrade from/to?

On 06/13/2016 03:51 PM, serkazak wrote:

now i got it working with the updated version with fglrx. stats show
no retries and it works as expected thank you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANhsblx7DZqlsnqSo5OYOCwJtoRa96d2ks5qLbTbgaJpZM4IzoOR.

from ddcutil.

rockowitz avatar rockowitz commented on May 26, 2024

I've added some diagnostic code to try to understand why ddctool does
not detect the username on your system.

When you have chance, please rebuild ddctool with the current github
contents, issue the command "ddctool environment" and send me the output.

Thanks,
Sanford

from ddcutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.