How can I see the exact properties that are set with xset?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
3












The two main utilities to configure and test X input devices are xinput and xset.



The main difference between the two (for what I understand) is that xinput allows a more fine-grained control over the (possibly device-dependent) properties.
On the other hand, sometimes the settings given via xset are a pretty good starting point.



What I would like to do is to start from the settings given by xset and apply some fine-tuning from there via xinput.



The problem is that it seems that the configurations obtained via xset are not registered by xinput, and the xset man page does not give the exact details of the settings it produces.



For example, say I want to change the speed of my touchpad.
I know from xinput --list that the relevant device id is 15, so that I can use xinput --list-props 15 to list all the touchpad properties.
I could now go and change some property, say the constant deceleration (which in this case has ID 276) to the value 1.5, using xinput --set-prop 15 276 1.5.



However, xset mouse 5 5 also gives a pretty good speed setting for me.
I want to understand what exact configurations are being configured with this command, but running xinput --list-props 15 after xset mouse 5 5 does not register any difference.
How can I get this information?







share|improve this question
























    up vote
    5
    down vote

    favorite
    3












    The two main utilities to configure and test X input devices are xinput and xset.



    The main difference between the two (for what I understand) is that xinput allows a more fine-grained control over the (possibly device-dependent) properties.
    On the other hand, sometimes the settings given via xset are a pretty good starting point.



    What I would like to do is to start from the settings given by xset and apply some fine-tuning from there via xinput.



    The problem is that it seems that the configurations obtained via xset are not registered by xinput, and the xset man page does not give the exact details of the settings it produces.



    For example, say I want to change the speed of my touchpad.
    I know from xinput --list that the relevant device id is 15, so that I can use xinput --list-props 15 to list all the touchpad properties.
    I could now go and change some property, say the constant deceleration (which in this case has ID 276) to the value 1.5, using xinput --set-prop 15 276 1.5.



    However, xset mouse 5 5 also gives a pretty good speed setting for me.
    I want to understand what exact configurations are being configured with this command, but running xinput --list-props 15 after xset mouse 5 5 does not register any difference.
    How can I get this information?







    share|improve this question






















      up vote
      5
      down vote

      favorite
      3









      up vote
      5
      down vote

      favorite
      3






      3





      The two main utilities to configure and test X input devices are xinput and xset.



      The main difference between the two (for what I understand) is that xinput allows a more fine-grained control over the (possibly device-dependent) properties.
      On the other hand, sometimes the settings given via xset are a pretty good starting point.



      What I would like to do is to start from the settings given by xset and apply some fine-tuning from there via xinput.



      The problem is that it seems that the configurations obtained via xset are not registered by xinput, and the xset man page does not give the exact details of the settings it produces.



      For example, say I want to change the speed of my touchpad.
      I know from xinput --list that the relevant device id is 15, so that I can use xinput --list-props 15 to list all the touchpad properties.
      I could now go and change some property, say the constant deceleration (which in this case has ID 276) to the value 1.5, using xinput --set-prop 15 276 1.5.



      However, xset mouse 5 5 also gives a pretty good speed setting for me.
      I want to understand what exact configurations are being configured with this command, but running xinput --list-props 15 after xset mouse 5 5 does not register any difference.
      How can I get this information?







      share|improve this question












      The two main utilities to configure and test X input devices are xinput and xset.



      The main difference between the two (for what I understand) is that xinput allows a more fine-grained control over the (possibly device-dependent) properties.
      On the other hand, sometimes the settings given via xset are a pretty good starting point.



      What I would like to do is to start from the settings given by xset and apply some fine-tuning from there via xinput.



      The problem is that it seems that the configurations obtained via xset are not registered by xinput, and the xset man page does not give the exact details of the settings it produces.



      For example, say I want to change the speed of my touchpad.
      I know from xinput --list that the relevant device id is 15, so that I can use xinput --list-props 15 to list all the touchpad properties.
      I could now go and change some property, say the constant deceleration (which in this case has ID 276) to the value 1.5, using xinput --set-prop 15 276 1.5.



      However, xset mouse 5 5 also gives a pretty good speed setting for me.
      I want to understand what exact configurations are being configured with this command, but running xinput --list-props 15 after xset mouse 5 5 does not register any difference.
      How can I get this information?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 5 at 19:40









      glS

      2822315




      2822315




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Not a complete answer, but I figured out some details by looking at the source code.



          I had a look at the source code of xset in the file xset.c, which comes from the package x11-xserver-utils. The code in the file downloaded on my system (Ubuntu 16.04) by apt-get source x11-xserver-utils is more or less the same as the code found here, so I will use the code on that page as reference.



          What happens when the mouse option is given can be seen at L475-502:



          /* Set pointer (mouse) settings: Acceleration and Threshold. */
          else if (strcmp(arg, "m") == 0 || strcmp(arg, "mouse") == 0)
          acc_num = SERVER_DEFAULT; /* restore server defaults */
          acc_denom = SERVER_DEFAULT;
          threshold = SERVER_DEFAULT;
          if (i >= argc)
          set_mouse(dpy, acc_num, acc_denom, threshold);
          break;

          arg = argv[i];
          if (strcmp(arg, "default") == 0)
          i++;

          else if (*arg >= '0' && *arg <= '9')
          acc_denom = 1;
          sscanf(arg, "%d/%d", &acc_num, &acc_denom);
          i++;
          if (i >= argc)
          set_mouse(dpy, acc_num, acc_denom, threshold);
          break;

          arg = argv[i];
          if (*arg >= '0' && *arg <= '9')
          threshold = atoi(arg); /* Set threshold as user specified. */
          i++;


          set_mouse(dpy, acc_num, acc_denom, threshold);



          where SERVER_DEFAULT is set as -1.
          This just reads the arguments and calls set_mouse.
          Notably, if no additional arguments are given (command called as xset mouse) the defaults are xset mouse -1/-1 -1. Also, acc_num and threshold must be between 0 and 9, otherwise the default value -1 is used, and the default value for acc_denom is 1.



          The function set_mouse is again just a bunch of checks for illegal input values:



          set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)

          int do_accel = True, do_threshold = True;

          if (acc_num == DONT_CHANGE) /* what an incredible crock... */
          do_accel = False;
          if (threshold == DONT_CHANGE)
          do_threshold = False;
          if (acc_num < 0) /* shouldn't happen */
          acc_num = SERVER_DEFAULT;
          if (acc_denom <= 0) /* prevent divide by zero */
          acc_denom = SERVER_DEFAULT;
          if (threshold < 0) threshold = SERVER_DEFAULT;
          XChangePointerControl(dpy, do_accel, do_threshold, acc_num,
          acc_denom, threshold);
          return;



          The ball is now passed to XChangePointerControl. This function is however not defined in this package. Some searching through the included dependencies brought me to the libx11 package, containing the file ChPntCont.c (source code here), which defines this function:



          int
          XChangePointerControl(
          register Display *dpy,
          Bool do_acc,
          Bool do_thresh,
          int acc_numerator,
          int acc_denominator,
          int threshold)


          register xChangePointerControlReq *req;

          LockDisplay(dpy);
          GetReq(ChangePointerControl, req);
          req->doAccel = do_acc;
          req->doThresh = do_thresh;
          req->accelNum = acc_numerator;
          req->accelDenum = acc_denominator;
          req->threshold = threshold;
          UnlockDisplay(dpy);
          SyncHandle();
          return 1;



          I didn't really manage to understand much beyond this point. GetReq is defined by a macro in the file Xlibint.h in the libx11 package and we get bounced around between several different functions.
          At the end of the day we probably have enough information from the above functions though, in that the input values seem to be directly fed as new values for similarly named properties of the touchpad device.



          The above at least tells us something about the default and accepted values of xset.



          I didn't manage to figure out why the output of xinput list-props is not updated after the properties are changed with xset though.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428351%2fhow-can-i-see-the-exact-properties-that-are-set-with-xset%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            Not a complete answer, but I figured out some details by looking at the source code.



            I had a look at the source code of xset in the file xset.c, which comes from the package x11-xserver-utils. The code in the file downloaded on my system (Ubuntu 16.04) by apt-get source x11-xserver-utils is more or less the same as the code found here, so I will use the code on that page as reference.



            What happens when the mouse option is given can be seen at L475-502:



            /* Set pointer (mouse) settings: Acceleration and Threshold. */
            else if (strcmp(arg, "m") == 0 || strcmp(arg, "mouse") == 0)
            acc_num = SERVER_DEFAULT; /* restore server defaults */
            acc_denom = SERVER_DEFAULT;
            threshold = SERVER_DEFAULT;
            if (i >= argc)
            set_mouse(dpy, acc_num, acc_denom, threshold);
            break;

            arg = argv[i];
            if (strcmp(arg, "default") == 0)
            i++;

            else if (*arg >= '0' && *arg <= '9')
            acc_denom = 1;
            sscanf(arg, "%d/%d", &acc_num, &acc_denom);
            i++;
            if (i >= argc)
            set_mouse(dpy, acc_num, acc_denom, threshold);
            break;

            arg = argv[i];
            if (*arg >= '0' && *arg <= '9')
            threshold = atoi(arg); /* Set threshold as user specified. */
            i++;


            set_mouse(dpy, acc_num, acc_denom, threshold);



            where SERVER_DEFAULT is set as -1.
            This just reads the arguments and calls set_mouse.
            Notably, if no additional arguments are given (command called as xset mouse) the defaults are xset mouse -1/-1 -1. Also, acc_num and threshold must be between 0 and 9, otherwise the default value -1 is used, and the default value for acc_denom is 1.



            The function set_mouse is again just a bunch of checks for illegal input values:



            set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)

            int do_accel = True, do_threshold = True;

            if (acc_num == DONT_CHANGE) /* what an incredible crock... */
            do_accel = False;
            if (threshold == DONT_CHANGE)
            do_threshold = False;
            if (acc_num < 0) /* shouldn't happen */
            acc_num = SERVER_DEFAULT;
            if (acc_denom <= 0) /* prevent divide by zero */
            acc_denom = SERVER_DEFAULT;
            if (threshold < 0) threshold = SERVER_DEFAULT;
            XChangePointerControl(dpy, do_accel, do_threshold, acc_num,
            acc_denom, threshold);
            return;



            The ball is now passed to XChangePointerControl. This function is however not defined in this package. Some searching through the included dependencies brought me to the libx11 package, containing the file ChPntCont.c (source code here), which defines this function:



            int
            XChangePointerControl(
            register Display *dpy,
            Bool do_acc,
            Bool do_thresh,
            int acc_numerator,
            int acc_denominator,
            int threshold)


            register xChangePointerControlReq *req;

            LockDisplay(dpy);
            GetReq(ChangePointerControl, req);
            req->doAccel = do_acc;
            req->doThresh = do_thresh;
            req->accelNum = acc_numerator;
            req->accelDenum = acc_denominator;
            req->threshold = threshold;
            UnlockDisplay(dpy);
            SyncHandle();
            return 1;



            I didn't really manage to understand much beyond this point. GetReq is defined by a macro in the file Xlibint.h in the libx11 package and we get bounced around between several different functions.
            At the end of the day we probably have enough information from the above functions though, in that the input values seem to be directly fed as new values for similarly named properties of the touchpad device.



            The above at least tells us something about the default and accepted values of xset.



            I didn't manage to figure out why the output of xinput list-props is not updated after the properties are changed with xset though.






            share|improve this answer
























              up vote
              1
              down vote













              Not a complete answer, but I figured out some details by looking at the source code.



              I had a look at the source code of xset in the file xset.c, which comes from the package x11-xserver-utils. The code in the file downloaded on my system (Ubuntu 16.04) by apt-get source x11-xserver-utils is more or less the same as the code found here, so I will use the code on that page as reference.



              What happens when the mouse option is given can be seen at L475-502:



              /* Set pointer (mouse) settings: Acceleration and Threshold. */
              else if (strcmp(arg, "m") == 0 || strcmp(arg, "mouse") == 0)
              acc_num = SERVER_DEFAULT; /* restore server defaults */
              acc_denom = SERVER_DEFAULT;
              threshold = SERVER_DEFAULT;
              if (i >= argc)
              set_mouse(dpy, acc_num, acc_denom, threshold);
              break;

              arg = argv[i];
              if (strcmp(arg, "default") == 0)
              i++;

              else if (*arg >= '0' && *arg <= '9')
              acc_denom = 1;
              sscanf(arg, "%d/%d", &acc_num, &acc_denom);
              i++;
              if (i >= argc)
              set_mouse(dpy, acc_num, acc_denom, threshold);
              break;

              arg = argv[i];
              if (*arg >= '0' && *arg <= '9')
              threshold = atoi(arg); /* Set threshold as user specified. */
              i++;


              set_mouse(dpy, acc_num, acc_denom, threshold);



              where SERVER_DEFAULT is set as -1.
              This just reads the arguments and calls set_mouse.
              Notably, if no additional arguments are given (command called as xset mouse) the defaults are xset mouse -1/-1 -1. Also, acc_num and threshold must be between 0 and 9, otherwise the default value -1 is used, and the default value for acc_denom is 1.



              The function set_mouse is again just a bunch of checks for illegal input values:



              set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)

              int do_accel = True, do_threshold = True;

              if (acc_num == DONT_CHANGE) /* what an incredible crock... */
              do_accel = False;
              if (threshold == DONT_CHANGE)
              do_threshold = False;
              if (acc_num < 0) /* shouldn't happen */
              acc_num = SERVER_DEFAULT;
              if (acc_denom <= 0) /* prevent divide by zero */
              acc_denom = SERVER_DEFAULT;
              if (threshold < 0) threshold = SERVER_DEFAULT;
              XChangePointerControl(dpy, do_accel, do_threshold, acc_num,
              acc_denom, threshold);
              return;



              The ball is now passed to XChangePointerControl. This function is however not defined in this package. Some searching through the included dependencies brought me to the libx11 package, containing the file ChPntCont.c (source code here), which defines this function:



              int
              XChangePointerControl(
              register Display *dpy,
              Bool do_acc,
              Bool do_thresh,
              int acc_numerator,
              int acc_denominator,
              int threshold)


              register xChangePointerControlReq *req;

              LockDisplay(dpy);
              GetReq(ChangePointerControl, req);
              req->doAccel = do_acc;
              req->doThresh = do_thresh;
              req->accelNum = acc_numerator;
              req->accelDenum = acc_denominator;
              req->threshold = threshold;
              UnlockDisplay(dpy);
              SyncHandle();
              return 1;



              I didn't really manage to understand much beyond this point. GetReq is defined by a macro in the file Xlibint.h in the libx11 package and we get bounced around between several different functions.
              At the end of the day we probably have enough information from the above functions though, in that the input values seem to be directly fed as new values for similarly named properties of the touchpad device.



              The above at least tells us something about the default and accepted values of xset.



              I didn't manage to figure out why the output of xinput list-props is not updated after the properties are changed with xset though.






              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                Not a complete answer, but I figured out some details by looking at the source code.



                I had a look at the source code of xset in the file xset.c, which comes from the package x11-xserver-utils. The code in the file downloaded on my system (Ubuntu 16.04) by apt-get source x11-xserver-utils is more or less the same as the code found here, so I will use the code on that page as reference.



                What happens when the mouse option is given can be seen at L475-502:



                /* Set pointer (mouse) settings: Acceleration and Threshold. */
                else if (strcmp(arg, "m") == 0 || strcmp(arg, "mouse") == 0)
                acc_num = SERVER_DEFAULT; /* restore server defaults */
                acc_denom = SERVER_DEFAULT;
                threshold = SERVER_DEFAULT;
                if (i >= argc)
                set_mouse(dpy, acc_num, acc_denom, threshold);
                break;

                arg = argv[i];
                if (strcmp(arg, "default") == 0)
                i++;

                else if (*arg >= '0' && *arg <= '9')
                acc_denom = 1;
                sscanf(arg, "%d/%d", &acc_num, &acc_denom);
                i++;
                if (i >= argc)
                set_mouse(dpy, acc_num, acc_denom, threshold);
                break;

                arg = argv[i];
                if (*arg >= '0' && *arg <= '9')
                threshold = atoi(arg); /* Set threshold as user specified. */
                i++;


                set_mouse(dpy, acc_num, acc_denom, threshold);



                where SERVER_DEFAULT is set as -1.
                This just reads the arguments and calls set_mouse.
                Notably, if no additional arguments are given (command called as xset mouse) the defaults are xset mouse -1/-1 -1. Also, acc_num and threshold must be between 0 and 9, otherwise the default value -1 is used, and the default value for acc_denom is 1.



                The function set_mouse is again just a bunch of checks for illegal input values:



                set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)

                int do_accel = True, do_threshold = True;

                if (acc_num == DONT_CHANGE) /* what an incredible crock... */
                do_accel = False;
                if (threshold == DONT_CHANGE)
                do_threshold = False;
                if (acc_num < 0) /* shouldn't happen */
                acc_num = SERVER_DEFAULT;
                if (acc_denom <= 0) /* prevent divide by zero */
                acc_denom = SERVER_DEFAULT;
                if (threshold < 0) threshold = SERVER_DEFAULT;
                XChangePointerControl(dpy, do_accel, do_threshold, acc_num,
                acc_denom, threshold);
                return;



                The ball is now passed to XChangePointerControl. This function is however not defined in this package. Some searching through the included dependencies brought me to the libx11 package, containing the file ChPntCont.c (source code here), which defines this function:



                int
                XChangePointerControl(
                register Display *dpy,
                Bool do_acc,
                Bool do_thresh,
                int acc_numerator,
                int acc_denominator,
                int threshold)


                register xChangePointerControlReq *req;

                LockDisplay(dpy);
                GetReq(ChangePointerControl, req);
                req->doAccel = do_acc;
                req->doThresh = do_thresh;
                req->accelNum = acc_numerator;
                req->accelDenum = acc_denominator;
                req->threshold = threshold;
                UnlockDisplay(dpy);
                SyncHandle();
                return 1;



                I didn't really manage to understand much beyond this point. GetReq is defined by a macro in the file Xlibint.h in the libx11 package and we get bounced around between several different functions.
                At the end of the day we probably have enough information from the above functions though, in that the input values seem to be directly fed as new values for similarly named properties of the touchpad device.



                The above at least tells us something about the default and accepted values of xset.



                I didn't manage to figure out why the output of xinput list-props is not updated after the properties are changed with xset though.






                share|improve this answer












                Not a complete answer, but I figured out some details by looking at the source code.



                I had a look at the source code of xset in the file xset.c, which comes from the package x11-xserver-utils. The code in the file downloaded on my system (Ubuntu 16.04) by apt-get source x11-xserver-utils is more or less the same as the code found here, so I will use the code on that page as reference.



                What happens when the mouse option is given can be seen at L475-502:



                /* Set pointer (mouse) settings: Acceleration and Threshold. */
                else if (strcmp(arg, "m") == 0 || strcmp(arg, "mouse") == 0)
                acc_num = SERVER_DEFAULT; /* restore server defaults */
                acc_denom = SERVER_DEFAULT;
                threshold = SERVER_DEFAULT;
                if (i >= argc)
                set_mouse(dpy, acc_num, acc_denom, threshold);
                break;

                arg = argv[i];
                if (strcmp(arg, "default") == 0)
                i++;

                else if (*arg >= '0' && *arg <= '9')
                acc_denom = 1;
                sscanf(arg, "%d/%d", &acc_num, &acc_denom);
                i++;
                if (i >= argc)
                set_mouse(dpy, acc_num, acc_denom, threshold);
                break;

                arg = argv[i];
                if (*arg >= '0' && *arg <= '9')
                threshold = atoi(arg); /* Set threshold as user specified. */
                i++;


                set_mouse(dpy, acc_num, acc_denom, threshold);



                where SERVER_DEFAULT is set as -1.
                This just reads the arguments and calls set_mouse.
                Notably, if no additional arguments are given (command called as xset mouse) the defaults are xset mouse -1/-1 -1. Also, acc_num and threshold must be between 0 and 9, otherwise the default value -1 is used, and the default value for acc_denom is 1.



                The function set_mouse is again just a bunch of checks for illegal input values:



                set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)

                int do_accel = True, do_threshold = True;

                if (acc_num == DONT_CHANGE) /* what an incredible crock... */
                do_accel = False;
                if (threshold == DONT_CHANGE)
                do_threshold = False;
                if (acc_num < 0) /* shouldn't happen */
                acc_num = SERVER_DEFAULT;
                if (acc_denom <= 0) /* prevent divide by zero */
                acc_denom = SERVER_DEFAULT;
                if (threshold < 0) threshold = SERVER_DEFAULT;
                XChangePointerControl(dpy, do_accel, do_threshold, acc_num,
                acc_denom, threshold);
                return;



                The ball is now passed to XChangePointerControl. This function is however not defined in this package. Some searching through the included dependencies brought me to the libx11 package, containing the file ChPntCont.c (source code here), which defines this function:



                int
                XChangePointerControl(
                register Display *dpy,
                Bool do_acc,
                Bool do_thresh,
                int acc_numerator,
                int acc_denominator,
                int threshold)


                register xChangePointerControlReq *req;

                LockDisplay(dpy);
                GetReq(ChangePointerControl, req);
                req->doAccel = do_acc;
                req->doThresh = do_thresh;
                req->accelNum = acc_numerator;
                req->accelDenum = acc_denominator;
                req->threshold = threshold;
                UnlockDisplay(dpy);
                SyncHandle();
                return 1;



                I didn't really manage to understand much beyond this point. GetReq is defined by a macro in the file Xlibint.h in the libx11 package and we get bounced around between several different functions.
                At the end of the day we probably have enough information from the above functions though, in that the input values seem to be directly fed as new values for similarly named properties of the touchpad device.



                The above at least tells us something about the default and accepted values of xset.



                I didn't manage to figure out why the output of xinput list-props is not updated after the properties are changed with xset though.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 9 at 18:59









                glS

                2822315




                2822315






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428351%2fhow-can-i-see-the-exact-properties-that-are-set-with-xset%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay