Announcement

Collapse
No announcement yet.

radeon-profile: tool for changing profiles and monitoring some GPU parameters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by Bushido_root View Post
    How do you go about updating? Just re-clone the repo using git clone or is there a script that can be ran and update automatically?
    Code:
    git pull && qmake-qt4 && make

    Comment


    • #22
      Thanks for coding this tool! It looks very promising.

      Unfortunately I have run into some trouble while trying to compile radeon-profile on Ubuntu 12.04.3 LTS:

      Code:
      $ qmake-qt4 && make
      g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
      In file included from main.cpp:1:0:
      radeon_profile.h:23:22: error: ISO C++ forbids initialization of member ?pciSensor? [-fpermissive]
      radeon_profile.h:23:22: error: making ?pciSensor? static [-fpermissive]
      radeon_profile.h:23:22: error: ISO C++ forbids in-class initialization of non-const static member ?pciSensor?
      radeon_profile.h:25:13: error: ISO C++ forbids initialization of member ?i? [-fpermissive]
      radeon_profile.h:25:13: error: making ?i? static [-fpermissive]
      radeon_profile.h:25:13: error: ISO C++ forbids in-class initialization of non-const static member ?i?
      radeon_profile.h:26:19: error: ISO C++ forbids initialization of member ?maxT? [-fpermissive]
      radeon_profile.h:26:19: error: making ?maxT? static [-fpermissive]
      radeon_profile.h:26:19: error: ISO C++ forbids in-class initialization of non-const static member ?maxT?
      radeon_profile.h:26:30: error: ISO C++ forbids initialization of member ?minT? [-fpermissive]
      radeon_profile.h:26:30: error: making ?minT? static [-fpermissive]
      radeon_profile.h:26:30: error: ISO C++ forbids in-class initialization of non-const static member ?minT?
      radeon_profile.h:26:52: error: ISO C++ forbids initialization of member ?tempSum? [-fpermissive]
      radeon_profile.h:26:52: error: making ?tempSum? static [-fpermissive]
      radeon_profile.h:26:52: error: ISO C++ forbids in-class initialization of non-const static member ?tempSum?
      radeon_profile.h:27:21: error: ISO C++ forbids initialization of member ?rangeX? [-fpermissive]
      radeon_profile.h:27:21: error: making ?rangeX? static [-fpermissive]
      radeon_profile.h:27:21: error: ISO C++ forbids in-class initialization of non-const static member ?rangeX?
      radeon_profile.h:29:37: error: ISO C++ forbids initialization of member ?powerMethodFile? [-fpermissive]
      radeon_profile.h:29:37: error: making ?powerMethodFile? static [-fpermissive]
      radeon_profile.h:29:37: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:30:33: error: ISO C++ forbids initialization of member ?profilePath? [-fpermissive]
      radeon_profile.h:30:33: error: making ?profilePath? static [-fpermissive]
      radeon_profile.h:30:33: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:31:34: error: ISO C++ forbids initialization of member ?dpmStateFile? [-fpermissive]
      radeon_profile.h:31:34: error: making ?dpmStateFile? static [-fpermissive]
      radeon_profile.h:31:34: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:32:32: error: ISO C++ forbids initialization of member ?clocksPath? [-fpermissive]
      radeon_profile.h:32:32: error: making ?clocksPath? static [-fpermissive]
      radeon_profile.h:32:32: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:33:41: error: ISO C++ forbids initialization of member ?forcePowerLevelFile? [-fpermissive]
      radeon_profile.h:33:41: error: making ?forcePowerLevelFile? static [-fpermissive]
      radeon_profile.h:33:41: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:34:25: error: ISO C++ forbids initialization of member ?err? [-fpermissive]
      radeon_profile.h:34:25: error: making ?err? static [-fpermissive]
      radeon_profile.h:34:25: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      radeon_profile.h:35:30: error: ISO C++ forbids initialization of member ?noValues? [-fpermissive]
      radeon_profile.h:35:30: error: making ?noValues? static [-fpermissive]
      radeon_profile.h:35:30: error: invalid in-class initialization of static data member of non-integral type ?const QString?
      make: *** [main.o] Error 1
      Any idea what could be wrong?

      Comment


      • #23
        debugfs

        thx for the handy tool!

        as normal user I have also the error message that debugfs may not be mounted. I?ve got HD7950 on kernel 3.11 and as root it runs fine.
        How can I check the status of debugfs?

        A quick search yielded to mount it via:

        # mount -t debugfs none /sys/kernel/debug
        mount: none is already mounted or /sys/kernel/debug busy
        none is already mounted on /var/lib/ntp/proc

        but that changed nothing
        So is it mounted already? What is the error then?

        Comment


        • #24
          Originally posted by tiredoffglrx View Post
          Any idea what could be wrong?
          Maybe gcc is too old? I moved variables from header to source file, try compile it now.

          Originally posted by tomtomme View Post
          How can I check the status of debugfs?
          Is this output something? (run as root)
          Code:
          ls /sys/kernel/debug
          If it does, that means the debugfs is mounted under proper location, but "none is already mounted on /var/lib/ntp/proc" bothers me.

          Comment


          • #25
            debugfs

            yes it seems to be mounted. however it is not in the /etc/fstab as it used to be in earlier suse versions. maybe thats because of systemd?
            So what loggs could I provide to debug this. As user the error persists... he gets not gpu and mem clock and asks for root rights and debugfs mounted?
            I already added the /etc/sudoers rule

            when starting from konsole it notes:
            tomtomme@linux:~> radeon-profile
            sh: xdriinfo: Kommando nicht gefunden.
            ATTENTION: default value of option force_s3tc_enable overridden by environment.
            ATTENTION: default value of option force_s3tc_enable overridden by environment.
            sh: modinfo: Kommando nicht gefunden.
            grep: /sys/module/radeon/parameters/gartsize: Keine Berechtigung
            grep: /sys/module/radeon/parameters/modeset: Keine Berechtigung
            grep: /sys/module/radeon/parameters/vramlimit: Keine Berechtigung
            libpng warning: iCCP: known incorrect sRGB profile
            as su only:
            linux:/home/tomtomme # radeon-profile
            sh: xdriinfo: Kommando nicht gefunden.
            ATTENTION: default value of option force_s3tc_enable overridden by environment.
            ATTENTION: default value of option force_s3tc_enable overridden by environment.
            libpng warning: iCCP: known incorrect sRGB profile
            Last edited by tomtomme; 01 November 2013, 08:21 AM.

            Comment


            • #26
              Originally posted by marazmista View Post
              Maybe gcc is too old? I moved variables from header to source file, try compile it now.
              That must have been it (I am still running Ubuntu 12.04, after all). Thank you! Everything is working perfectly fine now.

              I am not very skilled in bash but - FWIW - here's the script I am using to start radeon-profile as root:

              Code:
              #!/bin/bash
              
              # radeon-profile.sh
              # Place this in the same folder like radeon-profile
              
              ######## Check if script has Root privileges ########
              
              if [ "$(whoami)" != "root" ]; then
                echo "Not root. Restarting"
                pkexec --user root "$0"
                exit
              fi
              
              ####### Set environment variables required for Root ###########
              
              getXuser() {
                      user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'`
                      if [ x"$user" = x"" ]; then
                              startx=`pgrep -n startx`
                              if [ x"$startx" != x"" ]; then
                                      user=`ps -o user --no-headers $startx`
                              fi
                      fi
                      if [ x"$user" = x"" ]; then
                             user=$(pinky -fw | awk '{ print $1; exit; }')
                      fi
                      if [ x"$user" != x"" ]; then
                              userhome=`getent passwd $user | cut -d: -f6`
                              export XAUTHORITY=$userhome/.Xauthority
                      else
                              export XAUTHORITY=""
                      fi
                      export XUSER=$user
              }
              
              
              for x in /tmp/.X11-unix/*; do
                 displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
                 getXuser;
                    if [ x"$XAUTHORITY" != x"" ]; then
                      export DISPLAY=":$displaynum"
                    fi
              done
              
              DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
              
              cd "$DIR"
              
              ./radeon-profile
              The only problem I have is that the app won't use my GTK theme when executed as root and falls back to a more "classic" view. Other QT applications work fine under root privileges.

              Comment


              • #27
                Originally posted by tomtomme View Post
                As user the error persists... he gets not gpu and mem clock and asks for root rights and debugfs mounted?
                This is by design, app should be run as root. I think it is not worth messing with privileges for all this system files used to gather data.

                Originally posted by tiredoffglrx View Post
                I am not very skilled in bash but - FWIW - here's the script I am using to start radeon-profile as root:
                You can just copy the binary to /usr/bin/ and start by typing 'sudo radeon-profile'.

                Originally posted by tiredoffglrx View Post
                The only problem I have is that the app won't use my GTK theme when executed as root and falls back to a more "classic" view. Other QT applications work fine under root privileges.
                If other apps looks fine, then I don't know where could be the problem. I didn't mess with anything in code that is related to themes.

                Comment


                • #28
                  Originally posted by tiredoffglrx View Post
                  The only problem I have is that the app won't use my GTK theme when executed as root and falls back to a more "classic" view. Other QT applications work fine under root privileges.
                  You need to have/generate the relevant theme config files in root's home directory too. I did this by running lxappearance and obconf (I use openbox without a DE) as root, setting a GTK theme; then by finding root's Trolltech.conf file and configuring Qt to use the GTK+ engine.

                  Comment


                  • #29
                    Originally posted by aphirst View Post
                    You need to have/generate the relevant theme config files in root's home directory too. I did this by running lxappearance and obconf (I use openbox without a DE) as root, setting a GTK theme; then by finding root's Trolltech.conf file and configuring Qt to use the GTK+ engine.
                    Thanks for the advice. I did all of that and it still wasn't working. So I decided to start radeon-profile with sudo instead of pkexec, as suggested by marazmisza, and - voila! - it works! Why the theme doesn't apply when executed with pkexec? No idea. But it works, so I am happy.

                    Comment


                    • #30
                      Originally posted by tiredoffglrx View Post
                      Thanks for the advice. I did all of that and it still wasn't working. So I decided to start radeon-profile with sudo instead of pkexec, as suggested by marazmisza, and - voila! - it works! Why the theme doesn't apply when executed with pkexec? No idea. But it works, so I am happy.
                      I can't say I know how pkexec works, all I know is that I usually use gksu, which seems to work reliably enough for me. Presumably pkexec does something subtly different.

                      Comment

                      Working...
                      X