Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. Fedora - changes in pp_table don't persist after restart

Fedora - changes in pp_table don't persist after restart

Scheduled Pinned Locked Moved Linux
21 Posts 10 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • electrolisa@lemmy.blahaj.zoneE [email protected]

    Have you tried using CoreCtrl instead?

    W This user is from outside of this forum
    W This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #6

    Yes but you misunderstand the issue here. It's not about whether LACT or CoreCTRL is better. They only allow you to work within the default limits. For example max power limit is 312W on my card. By editing pp_table I can increase it to whatever I want. What I'm doing by editing pp_table is going beyond those limits and whether I use one application or another it does not matter. Also I switched from CoreCtrl to LACT because CoreCtrl on GNOME can't be minimized into tray so it was just annoying.

    ? R electrolisa@lemmy.blahaj.zoneE 3 Replies Last reply
    0
    • S [email protected]

      For how long do you need to have been in the Linux space before pp table stops being funny? Because I'm new, and hehehehe

      W This user is from outside of this forum
      W This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #7

      It will never be not funny 🙂

      1 Reply Last reply
      0
      • W [email protected]

        Yes but you misunderstand the issue here. It's not about whether LACT or CoreCTRL is better. They only allow you to work within the default limits. For example max power limit is 312W on my card. By editing pp_table I can increase it to whatever I want. What I'm doing by editing pp_table is going beyond those limits and whether I use one application or another it does not matter. Also I switched from CoreCtrl to LACT because CoreCtrl on GNOME can't be minimized into tray so it was just annoying.

        ? Offline
        ? Offline
        Guest
        wrote on last edited by
        #8

        Use triple backticks for blocks of code-type stuff

        ```

        like so

        ```

        ::: spoiler example, wrapped in a spoiler tag.

        upp -p /sys/class/drm/card1/device/pp_table dump
        header:
          structuresize: 2470
          format_revision: 15
          content_revision: 0
        table_revision: 2
        table_size: 802
        golden_pp_id: 2466
        golden_revision: 16307
        format_id: 128
        platform_caps: 24
        thermal_controller_type: 28
        small_power_limit1: 0
        small_power_limit2: 0
        boost_power_limit: 0
        software_shutdown_temp: 118
        reserve:
          reserve 0: 0
          reserve 1: 0
          reserve 2: 0
          reserve 3: 0
          reserve 4: 0
          reserve 5: 0
          reserve 6: 1
          reserve 7: 0
        power_saving_clock:
          revision: 1
          reserve:
        ... and so on ...
        

        :::

        1 Reply Last reply
        0
        • W [email protected]

          Hello,

          I'm adjusting pp_table settings to get most out of my GPU (RX 6800 XT) and it works but every time I restart PC the changes revert back to default. Any idea how I could make them persist?

          For me pp_table is located in /sys/class/drm/card0/device/pp_table

          I have to use chmod to be able to make changes:

          sudo chmod o+w /sys/class/drm/card1/device/pp_table

          Then I'm able to write in changes with upp:

          upp -p /sys/class/drm/card1/device/pp_table set --write smc_pptable/SocketPowerLimitAc/0=312 smc_pptable/SocketPowerLimitDc/0=293 smc_pptable/TdcLimit/0=300 smc_pptable/FreqTableSocclk/1=1350 smc_pptable/FreqTableFclk/1=2000 smc_pptable/FclkBoostFreq=2000

          And just in case you're wondering if the effort even makes sene, yes it does:

          Max OC with LACT with max default limits (left) vs max OC with edited pp_table (right) in the picture.

          ? Offline
          ? Offline
          Guest
          wrote on last edited by
          #9

          I'm not familiar with Radeon PowerPlay, so I don't know if there is a proper way to solve this, but you should be able to make a systemd system service to run the upp command on boot.

          To do so, I think you can use the following:

          [Unit]
          Description=Run my_user_script
          After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
          
          
          [Service]
          Type=oneshot
          ExecStart=upp -p /sys/class/drm/card1/device/pp_table set --write smc_pptable/SocketPowerLimitAc/0=312 smc_pptable/SocketPowerLimitDc/0=293 smc_pptable/TdcLimit/0=300 smc_pptable/FreqTableSocclk/1=1350 smc_pptable/FreqTableFclk/1=2000 smc_pptable/FclkBoostFreq=2000
          
          [Install]
          WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
          

          To configure this service:

          • Save the text (using sudo/root) to a new .service file in /etc/systemd/service. (e.g. /etc/systemd/system/my_update_pp.service)
          • run sudo systemctl daemon-reload to tell systemd to re-read the service files
          • run sudo systemctl restart my_update_pp.service to manually run the service
          • run sudo systemctl enable my_update_pp.service to tell systemd to run your service automatically on boot/wake (WantedBy tells systemd when it should include the unit/service, After, Wants, Requires, and Before help systemd decide the order to run all the units/services)

          Notes

          • Usually for simple systemd services, you can omit After and set WantedBy to just WantedBy=multi-user.target, but if you also need to run upp after sleep or hibernate, then you probably need something more complex. I copied the After and WantedBy from a stackexchange answer, but I haven't tried using those targets before. You might have to add multi-user.target to the WantedBy list.
          • I don't actually know if you need to run upp after sleep/hibernate. Running on boot might be sufficient.
          • I think you can skip the chmod if you run upp as sudo/root. Systemd system services run as root by default.
          • I don't know how safe it is to mess with PowerPlay during boot. My gut says it's probably fine, but it also seems like something that could cause graphics to not work. Tread carefully.

          References:

          • https://unix.stackexchange.com/questions/152039/how-to-run-a-user-script-after-systemd-wakeup
          • https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
          • https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
          • https://www.man7.org/linux/man-pages/man7/systemd.special.7.html
          W 1 Reply Last reply
          0
          • ? Guest

            I'm not familiar with Radeon PowerPlay, so I don't know if there is a proper way to solve this, but you should be able to make a systemd system service to run the upp command on boot.

            To do so, I think you can use the following:

            [Unit]
            Description=Run my_user_script
            After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
            
            
            [Service]
            Type=oneshot
            ExecStart=upp -p /sys/class/drm/card1/device/pp_table set --write smc_pptable/SocketPowerLimitAc/0=312 smc_pptable/SocketPowerLimitDc/0=293 smc_pptable/TdcLimit/0=300 smc_pptable/FreqTableSocclk/1=1350 smc_pptable/FreqTableFclk/1=2000 smc_pptable/FclkBoostFreq=2000
            
            [Install]
            WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
            

            To configure this service:

            • Save the text (using sudo/root) to a new .service file in /etc/systemd/service. (e.g. /etc/systemd/system/my_update_pp.service)
            • run sudo systemctl daemon-reload to tell systemd to re-read the service files
            • run sudo systemctl restart my_update_pp.service to manually run the service
            • run sudo systemctl enable my_update_pp.service to tell systemd to run your service automatically on boot/wake (WantedBy tells systemd when it should include the unit/service, After, Wants, Requires, and Before help systemd decide the order to run all the units/services)

            Notes

            • Usually for simple systemd services, you can omit After and set WantedBy to just WantedBy=multi-user.target, but if you also need to run upp after sleep or hibernate, then you probably need something more complex. I copied the After and WantedBy from a stackexchange answer, but I haven't tried using those targets before. You might have to add multi-user.target to the WantedBy list.
            • I don't actually know if you need to run upp after sleep/hibernate. Running on boot might be sufficient.
            • I think you can skip the chmod if you run upp as sudo/root. Systemd system services run as root by default.
            • I don't know how safe it is to mess with PowerPlay during boot. My gut says it's probably fine, but it also seems like something that could cause graphics to not work. Tread carefully.

            References:

            • https://unix.stackexchange.com/questions/152039/how-to-run-a-user-script-after-systemd-wakeup
            • https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
            • https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
            • https://www.man7.org/linux/man-pages/man7/systemd.special.7.html
            W This user is from outside of this forum
            W This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #10

            Thanks a lot. I will look into this.

            Reason why I use chmod is because I cant for the life of me figure out why I can't just use sudo. Even when I set environment variable for the upp.py it refuses to run it. Even when I directly want to run it via sudo it refuses, I can only run it without sudo for whatever reason... but to overwrite pp_table I need sudo privileges and I've been only able to get around with chmod.

            Also I've tried to make a script that I will just run and will execute the commands... but I get immediately hard lock and black screen and I need to do hard reset. Same when I try to copy and overwrite the pp_table with sudo priviledges with a pre-modified pp_table.

            So I'm kinda hesitant to now run the commands on runtime, it's possible it will hardlock during boot. I will give it more though tommorrow.

            1 Reply Last reply
            0
            • W [email protected]

              Yes but you misunderstand the issue here. It's not about whether LACT or CoreCTRL is better. They only allow you to work within the default limits. For example max power limit is 312W on my card. By editing pp_table I can increase it to whatever I want. What I'm doing by editing pp_table is going beyond those limits and whether I use one application or another it does not matter. Also I switched from CoreCtrl to LACT because CoreCtrl on GNOME can't be minimized into tray so it was just annoying.

              R This user is from outside of this forum
              R This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #11

              I'm on gnome, no issues with corectrl minimising to tray

              W 1 Reply Last reply
              0
              • S [email protected]

                For how long do you need to have been in the Linux space before pp table stops being funny? Because I'm new, and hehehehe

                admetus@sopuli.xyzA This user is from outside of this forum
                admetus@sopuli.xyzA This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #12

                I also said pp out aloud and chuckled like a little boy.

                1 Reply Last reply
                0
                • W [email protected]

                  Yes but you misunderstand the issue here. It's not about whether LACT or CoreCTRL is better. They only allow you to work within the default limits. For example max power limit is 312W on my card. By editing pp_table I can increase it to whatever I want. What I'm doing by editing pp_table is going beyond those limits and whether I use one application or another it does not matter. Also I switched from CoreCtrl to LACT because CoreCtrl on GNOME can't be minimized into tray so it was just annoying.

                  electrolisa@lemmy.blahaj.zoneE This user is from outside of this forum
                  electrolisa@lemmy.blahaj.zoneE This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #13

                  My knowledge here is limited so I apologise if I'm not being helpful, but at least in case of Arch there's a special kernel flag (amdgpu.performancemask iirc) to allow OC of your graphics card, are you passing one in your setup?

                  W 1 Reply Last reply
                  0
                  • electrolisa@lemmy.blahaj.zoneE [email protected]

                    My knowledge here is limited so I apologise if I'm not being helpful, but at least in case of Arch there's a special kernel flag (amdgpu.performancemask iirc) to allow OC of your graphics card, are you passing one in your setup?

                    W This user is from outside of this forum
                    W This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #14

                    Yes I do otherwise I wouldn't be able to OC.

                    I have to enable it after every Kernel update.

                    1 Reply Last reply
                    0
                    • R [email protected]

                      I'm on gnome, no issues with corectrl minimising to tray

                      W This user is from outside of this forum
                      W This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #15

                      I'm sorry but I don't believe you. Maybe you just misunderstand what I've meant.

                      If you minimize it and press Super key, is it shown or it's completely gone?

                      R 1 Reply Last reply
                      0
                      • W [email protected]

                        I'm sorry but I don't believe you. Maybe you just misunderstand what I've meant.

                        If you minimize it and press Super key, is it shown or it's completely gone?

                        R This user is from outside of this forum
                        R This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #16

                        Completely gone, only exists as an icon on my top bar

                        I can click show, get a window, and click hide and it goes away fully

                        I have it start on boot so my profiles auto apply when I start various apps

                        Would a screenshot be more convincing?

                        W 1 Reply Last reply
                        0
                        • R [email protected]

                          Completely gone, only exists as an icon on my top bar

                          I can click show, get a window, and click hide and it goes away fully

                          I have it start on boot so my profiles auto apply when I start various apps

                          Would a screenshot be more convincing?

                          W This user is from outside of this forum
                          W This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #17

                          I also had it start on boot but I never could minimize it to be non-intrusive and from what I've researched it's apparently very known issue in GNOME.

                          I don't have this issue with LACT.

                          ? 1 Reply Last reply
                          0
                          • W [email protected]

                            Thanks for directions 🙂 I'll check that out

                            ? Offline
                            ? Offline
                            Guest
                            wrote on last edited by
                            #18

                            Udev is the best way to add persistent values for pretty much everything in the sysfs. That being said, it can be a bit obtuse when first learning about it. Here are some tips

                            udevadm test /sys/path/to/device will tell you if your rule is running and what the state is at each step. You'll want to look at this before you start so you can see when your rule should run

                            udevadm info /sys/path/to/device will tell you what the PROPERTIES of a device are. These are usually set by hwdb files to inform userspace programs about the details of a device.

                            udevadm info /sys/path/to/device --attribute-walk will tell you about the ATTRIBUTES of a device and all it's parent devices. These correspond to the character file endpoints you are setting currently. You'll want to use these to write your match rules and set the values.

                            udevadm monitor can be used to watch for udev events to let you know if you should match on add, change, and/or remove.

                            Udev rules work as a cascading match system and they run in numerical and directory order. E.g. /usr/lib/udev/rules/60-keyboard.rules| will run before /etc/udev/rules.d/62-keyboard.rulesbut after/etc/udev/rules.d/60-keyboard.rules`

                            For user defined rules you will want to put them in /etc/udev/rules.d/ and keep in mind any state that needs to be set before or after your rule.

                            Matching happens with == or !=, setting attributes is done with =, +=, -=, or :=. := is really cool because you can use that to block changes from downstream rules. E.g. MODE:="666" will make the matched attribute r/w from unprivileged users, even if a later rule tries to set 400.

                            Udev rules will run in order in a file, but each rule must be a single line. Each attribute will also be set in order of the rule if setting multiple attributes in a rule. Multiple rules can be useful if you need to set attributes on multiple levels of a device, or in sibling directories.

                            For a complete breakdown of everything, see the udev manual: https://man.archlinux.org/man/udev.7

                            I also have a guide on one of my (currently out of tree) drivers that has some examples. https://github.com/ShadowBlip/ayn-platform?tab=readme-ov-file#changing-startup-defaults

                            Let me know if you have questions.

                            1 Reply Last reply
                            0
                            • W [email protected]

                              I also had it start on boot but I never could minimize it to be non-intrusive and from what I've researched it's apparently very known issue in GNOME.

                              I don't have this issue with LACT.

                              ? Offline
                              ? Offline
                              Guest
                              wrote on last edited by
                              #19

                              You need to have this extension or similar to be able to minimize to tray on gnome: https://extensions.gnome.org/extension/615/appindicator-support/

                              R 1 Reply Last reply
                              0
                              • S [email protected]

                                For how long do you need to have been in the Linux space before pp table stops being funny? Because I'm new, and hehehehe

                                E This user is from outside of this forum
                                E This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #20

                                Grow up (enough) and adjusting your pp becomes a chore.

                                1 Reply Last reply
                                0
                                • ? Guest

                                  You need to have this extension or similar to be able to minimize to tray on gnome: https://extensions.gnome.org/extension/615/appindicator-support/

                                  R This user is from outside of this forum
                                  R This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #21

                                  That'd do it, standard inclusion with my distro

                                  1 Reply Last reply
                                  0
                                  • System shared this topic on
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups