ublue-os / bazzite

Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
3.69k stars 219 forks source link

no Lact and 15w problem, you closed the problem and it wasnt fixed #657

Closed massatt212 closed 8 months ago

massatt212 commented 8 months ago

fresh installation, still no LACT and GPU still on 15w, something is not working, either your patches are not being sent you doing something wrong.

massatt212 commented 8 months ago

PXL_20240107_043345324.jpg

KyleGospo commented 8 months ago

Please attach an rpm-ostree status

massatt212 commented 8 months ago

rpm-ostree status

State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:28b49f8cff19a593d50509da6ad05e6b2427f126e9c4008d1005e57d439ed593
                  Version: 39.20240105.0 (2024-01-05T16:53:32Z)
          LayeredPackages: gnome-disk-utility
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"' 

  ostree-unverified-image:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:28b49f8cff19a593d50509da6ad05e6b2427f126e9c4008d1005e57d439ed593
                  Version: 39.20240105.0 (2024-01-05T16:53:32Z)
          LayeredPackages: gnome-disk-utility
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"' 
massatt212 commented 8 months ago

So yesterday i installed regular Bazzite, and it has LACT, but the steamdeck version of Bazite does not, and their is no 15w limits in regular bazzite all the problems are on the Bazzite Steam Deck

massatt212 commented 8 months ago

any updates on the fix for 15w and lact?

HikariKnight commented 8 months ago

can you save this as a script and run it with sudo and tell me if that resets the TDP (and also note down if certain actions resets the GPU to 15W, like launching a game, opening gamemode)

#!/bin/bash
# shellcheck disable=SC2094
# CONFIG
# default or max
POWER_CAP_MODE=default

# PATHS
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")

# Read the power1_cap and see if it is set to 15W
while IFS= read -r line
do
  # Check if we have a power cap of 15W
  if [[ $line -eq 15000000 ]]
  then
    # Compare the current power cap to what is default for the card
    diff "${POWER_CAP_PATH}" "${POWER_CAP_PATH}_${POWER_CAP_MODE}"
    if [ $? -eq 1 ]
    then
      # If the power cap is different from the default or max, fix it
      echo Card stuck in 15W mode, fixing
      cat "${POWER_CAP_PATH}_${POWER_CAP_MODE}" > "${POWER_CAP_PATH}"
    fi
  fi
done < "${POWER_CAP_PATH}"
exit

Running it over SSH is what would be preferable as then you can re-run it to keep testing, since we cannot replicate it.

it is the script from the original issue i made long ago and would be a start to see if it is the actual power cap that is the issue.

massatt212 commented 8 months ago

Thx you so much, idk why this is not fixed, but it's the only problem bazzite have, maybe he should put this script in the bazzite portal for steam deck.

massatt212 commented 8 months ago

can you save this as a script and run it with sudo and tell me if that resets the TDP (and also note down if certain actions resets the GPU to 15W, like launching a game, opening gamemode)

#!/bin/bash
# shellcheck disable=SC2094
# CONFIG
# default or max
POWER_CAP_MODE=default

# PATHS
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")

# Read the power1_cap and see if it is set to 15W
while IFS= read -r line
do
  # Check if we have a power cap of 15W
  if [[ $line -eq 15000000 ]]
  then
    # Compare the current power cap to what is default for the card
    diff "${POWER_CAP_PATH}" "${POWER_CAP_PATH}_${POWER_CAP_MODE}"
    if [ $? -eq 1 ]
    then
      # If the power cap is different from the default or max, fix it
      echo Card stuck in 15W mode, fixing
      cat "${POWER_CAP_PATH}_${POWER_CAP_MODE}" > "${POWER_CAP_PATH}"
    fi
  fi
done < "${POWER_CAP_PATH}"
exit

Running it over SSH is what would be preferable as then you can re-run it to keep testing, since we cannot replicate it.

it is the script from the original issue i made long ago and would be a start to see if it is the actual power cap that is the issue.

Ok I have to reinstall bazzite, I'll tell you in 40mins.

HikariKnight commented 8 months ago

if this script works then you can add and enable a service like i explained here https://github.com/ublue-os/bazzite/issues/320#issuecomment-1725206390

as i might be on my way home from work in 40 minutes

massatt212 commented 8 months ago

if this script works then you can add and enable a service like i explained here https://github.com/ublue-os/bazzite/issues/320#issuecomment-1725206390

as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

HikariKnight commented 8 months ago

if this script works then you can add and enable a service like i explained here #320 (comment) as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

i want to use the script as a means to see if this is continually going to happen after the wattage has been forcefully fixed like doe the tdp reset to 15 again when you start a game, close a game, re-enter gamemode. i will need your help testing this (since we cannot replicate the issue with our hardware).

There is also an update that will drop later today that addresses a bunch of stuff that might also solve your issue if we are lucky

massatt212 commented 8 months ago

if this script works then you can add and enable a service like i explained here #320 (comment) as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

i want to use the script as a means to see if this is continually going to happen after the wattage has been forcefully fixed like doe the tdp reset to 15 again when you start a game, close a game, re-enter gamemode. i will need your help testing this (since we cannot replicate the issue with our hardware).

There is also an update that will drop later today that addresses a bunch of stuff that might also solve your issue if we are lucky

The only time the wattage goes to 15w is when the deck is sleeping while a game is running, I'll just have to exit and restart the game and the wattage goes back to normal, the main problem is when I install bazzite it defaults wattage to 15w, that's the main problem I have.

HikariKnight commented 8 months ago

so this is installed on a deck? i know there were some issues related to sleep with deck but not sure if there was anything gpu related, but this is a lot more info than we got to begin with.

massatt212 commented 8 months ago

if this script works then you can add and enable a service like i explained here #320 (comment) as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

i want to use the script as a means to see if this is continually going to happen after the wattage has been forcefully fixed like doe the tdp reset to 15 again when you start a game, close a game, re-enter gamemode. i will need your help testing this (since we cannot replicate the issue with our hardware).

There is also an update that will drop later today that addresses a bunch of stuff that might also solve your issue if we are lucky

Let me explain this properly to clear everything up

When i install Bazzite SteamDeck version: GPU is stuck on 15w all the time its not changing or anything, its default is 15w, when i used your guide it fixed the problem completly.

The other problem is, when bazzite steamdeck goes to sleep with your patch when u wake up the device while a game was running it drops to 15w but if i exit the game and relaunch it goes back to gpu default wattage.

massatt212 commented 8 months ago

so this is installed on a deck? i know there were some issues related to sleep with deck but not sure if there was anything gpu related, but this is a lot more info than we got to begin with.

normal desktop PC Rx 6400 GPU, i have a cafe, every pc i try RX 580 RX 5600 RX 6600 it all the same

HikariKnight commented 8 months ago

if this script works then you can add and enable a service like i explained here #320 (comment) as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

because it is not a fix, anyways if you make the script as /usr/local/bin/amdgpu-fix-tdp

#!/bin/bash
# shellcheck disable=SC2094
# CONFIG
# default or max
POWER_CAP_MODE=default

# PATHS
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")

# Read the power1_cap and see if it is set to 15W
while IFS= read -r line
do
  # Check if we have a power cap of 15W
  if [[ $line -eq 15000000 ]]
  then
    # Compare the current power cap to what is default for the card
    diff "${POWER_CAP_PATH}" "${POWER_CAP_PATH}_${POWER_CAP_MODE}"
    if [ $? -eq 1 ]
    then
      # If the power cap is different from the default or max, fix it
      echo Card stuck in 15W mode, fixing
      cat "${POWER_CAP_PATH}_${POWER_CAP_MODE}" > "${POWER_CAP_PATH}"
    fi
  fi
done < "${POWER_CAP_PATH}"
exit

then create the service unit file /etc/systemd/system/amdgpu-fix-tdp.service

[Unit]
Description=Set amdgpu TDP to default instead of 15W
After=basic.target suspend.target hibernate.target
WantedBy=basic.target suspend.target hibernate.target
Wants=modprobe@amdgpu.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/amdgpu-fix-tdp
ExecReload=/usr/local/bin/amdgpu-fix-tdp

[Install]
WantedBy=basic.target suspend.target hibernate.target

then run these commands

sudo systemctl daemon-reload
sudo systemctl enable --now amdgpu-fix-tdp.service

This will force reset the tdp of the card on wakeup (if i understand the systemd documentation correctly) Not sure if this service file will even work but since you are the only person with this issue, it is the only workaround i can provide, and it is not something we can just add to everyones system as this only affects 1 person and we cannot replicate it with even similar hardware. If that does not work then take the original unit file and timer file from #320 and use those instead.

The original issue #320 and subsequent issues got closed as the problem that was found with steamos-priv-write at the time was fixed.

massatt212 commented 8 months ago

if this script works then you can add and enable a service like i explained here #320 (comment) as i might be on my way home from work in 40 minutes

The script worked, but can't you make the scripted enable the service also?

because it is not a fix, anyways if you make the script as /usr/local/bin/amdgpu-fix-tdp

#!/bin/bash
# shellcheck disable=SC2094
# CONFIG
# default or max
POWER_CAP_MODE=default

# PATHS
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")

# Read the power1_cap and see if it is set to 15W
while IFS= read -r line
do
  # Check if we have a power cap of 15W
  if [[ $line -eq 15000000 ]]
  then
    # Compare the current power cap to what is default for the card
    diff "${POWER_CAP_PATH}" "${POWER_CAP_PATH}_${POWER_CAP_MODE}"
    if [ $? -eq 1 ]
    then
      # If the power cap is different from the default or max, fix it
      echo Card stuck in 15W mode, fixing
      cat "${POWER_CAP_PATH}_${POWER_CAP_MODE}" > "${POWER_CAP_PATH}"
    fi
  fi
done < "${POWER_CAP_PATH}"
exit

then create the service unit file /etc/systemd/system/amdgpu-fix-tdp.service

[Unit]
Description=Set amdgpu TDP to default instead of 15W
After=basic.target suspend.target hibernate.target
WantedBy=basic.target suspend.target hibernate.target
Wants=modprobe@amdgpu.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/amdgpu-fix-tdp
ExecReload=/usr/local/bin/amdgpu-fix-tdp

[Install]
WantedBy=basic.target suspend.target hibernate.target

then run these commands

sudo systemctl daemon-reload
sudo systemctl enable --now amdgpu-fix-tdp.service

This will force reset the tdp of the card on wakeup (if i understand the systemd documentation correctly) Not sure if this service file will even work but since you are the only person with this issue, it is the only workaround i can provide, and it is not something we can just add to everyones system as this only affects 1 person and we cannot replicate it with even similar hardware. If that does not work then take the original unit file and timer file from #320 and use those instead.

The original issue #320 and subsequent issues got closed as the problem that was found with steamos-priv-write at the time was fixed.

Is there a way to set CPU power to performance, Street fighter 6 tend to stutter while CPU is running at 900mhz instead of max frequency.

HikariKnight commented 8 months ago

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor should be set to ondemand

you can change it to performance with sudo cpupower frequency-set -g performance i think

massatt212 commented 8 months ago

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor should be set to ondemand

you can change it to performance with sudo cpupower frequency-set -g performance i think

It resets anything I use that command

massatt212 commented 8 months ago

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor should be set to ondemand

you can change it to performance with sudo cpupower frequency-set -g performance i think

@fedora:/var/home/ssgs7$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor powersave powersave powersave powersave

massatt212 commented 8 months ago
@fedora:/var/home/ssgs7$ cpupower frequency-info
analyzing CPU 3:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 3.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 3.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.60 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
HikariKnight commented 8 months ago

im going to take a wild guess and say the governor is being overridden by the bios or something if you cannot set it to performance.

you can also try disabling the intel_pstate driver as that might be the one giving you the issue (it should not, but apparently on some cpus it can) add intel_pstate=disable to rpm-ostree kargs and test with that, or manually add it in the boot menu my pressing E and adding it to the end of the linux line for a 1 time test boot.

massatt212 commented 8 months ago

I tried it on Nobara and it works, I give up on this for the time been, it's a closed os so I can't even fix the problems myself, so I'll wait another year to try this out, it's too broken and we have to wait on you guys to fix problems that are present since the launch, a problem I can fix and I'm not even a programmer, think you guys need to take your time and fix this, it's really messy, I like the os a lot, but it's locked off some can't edit to fix anything, the CPU staying in power saving mode cause the files are read only, a recommend using regular fedora and not lock the os so people can share and help fix these problem, I thought that the Linux way, but this is worst than windows in every single way, if people mess around and break things that's there problem, cause even chimeraos did the frzr-unlock, common it's a great thing you guys are doing but that 15w people is going to run everyone to holoiso and chimeraos, I want to see y'all succeed, but that 1 problem is very bad, I recommend making 1 for steam deck only and a bazzite steam is for desktop, do not mix them together, I think that will cause too many problem, make 2 seperate projects, maybe U Hakiri should do it, I think I care more about it that the others.