You are not logged in.

#1 2023-10-22 14:40:13

barnd3
Member
Registered: 2023-02-07
Posts: 119

ERROR: Failed to open file for read

Ich erhalte folgende Meldungen

systemctl --user status gamemoded.service 
● gamemoded.service - gamemoded
     Loaded: loaded (/usr/lib/systemd/user/gamemoded.service; disabled; preset: enabled)
     Active: active (running) since Sun 2023-10-22 16:37:07 CEST; 19s ago
   Main PID: 13463 (gamemoded)
     Status: "GameMode is currently deactivated."
      Tasks: 2 (limit: 38405)
     Memory: 1.0M
        CPU: 299ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gamemoded.service
             └─13463 /usr/bin/gamemoded

Okt 22 16:37:13 I-NET pkexec[13515]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET pkexec[13520]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET gamemoded[13463]: ERROR: Failed to open file for read /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
Okt 22 16:37:13 I-NET pkexec[13525]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET pkexec[13531]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET gamemoded[13463]: ERROR: Failed to open file for read /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
Okt 22 16:37:13 I-NET pkexec[13539]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET pkexec[13544]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)
Okt 22 16:37:13 I-NET gamemoded[13463]: ERROR: Failed to open file for read /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
Okt 22 16:37:13 I-NET pkexec[13549]: pam_unix(polkit-1:session): session opened for user root(uid=0) by andre(uid=1000)

Was kann ich tun?
/etc/sysfs.conf funktiniert leider nicht...

mode class/powercap/intel-rapl:0/energy_uj = 0440
owner class/powercap/intel-rapl:0/energy_uj = root:power

Offline

#2 2023-10-22 15:38:51

seth
Member
Registered: 2012-09-03
Posts: 57,052

Re: ERROR: Failed to open file for read

/etc/sysfs.conf funktiniert leider nicht...

Und wir bist Du auf den Ansatz gekommen?
https://wiki.archlinux.org/index.php?search=sysfs.conf
https://michael.stapelberg.ch/posts/201 … _obsolete/
https://wiki.archlinux.org/title/Udev#udev_rule_example

Und nur zur Sicherheit:

stat /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
id

Offline

#3 2023-10-22 16:09:43

barnd3
Member
Registered: 2023-02-07
Posts: 119

Re: ERROR: Failed to open file for read

Ich hab die sysfs.conf mit diesem Inhalt angelegt und der Fehler besteht immer noch, also scheint die sysfs.conf Wirkungslos zu sein!?

Offline

#4 2023-10-22 16:26:39

barnd3
Member
Registered: 2023-02-07
Posts: 119

Re: ERROR: Failed to open file for read

Ich habe die udev Regel von hier genommen https://serverfault.com/questions/11239 … g-owner-ha
99-gamemode.rules

ENV{SUBSYSTEM}=="powercap", ACTION=="add|change", OWNER="root", PROGRAM+="/usr/bin/find /sys$env{DEVPATH} -name energy_uj -exec chmod g+r -R {} + -exec chown root:powercap {} +"

Es scheint zu funktionieren...
Ich habe zu wenig Wissen über udev, so dass ich nicht sagen kann, ob das, eine saubere Lösung ist.
Für Vorschläge bin ich jeder Zeit offen

Offline

#5 2023-10-22 17:43:30

seth
Member
Registered: 2012-09-03
Posts: 57,052

Re: ERROR: Failed to open file for read

udev hat eine eingebaute Möglichkeit, Besitzer und Berechtigungen zu setzen: https://wiki.archlinux.org/title/Udev#A … se_devices

Offline

Board footer

Powered by FluxBB