You are not logged in.
I'm using KDE with Wayland and I'm having issues implementing a solution to set my GPU fan speed to a certain value, at startup.
I've seen various examples that seem to work under X11 but they don't in Wayland.
Although I can force-set it running the script with sudo, I want it to happen automatically at startup.
I also allowed my user to run nvidia-settings with sudo without asking for password, it still doesn't work.
If I create a systemd service it complains about not having the correct display settings, but I did include it as env variable in script.
Using nfancurve the service has this error:
systemctl --user status nfancurve
● nfancurve.service - Nfancurve service
Loaded: loaded (/usr/lib/systemd/user/nfancurve.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-05-01 18:39:40 EEST; 2s ago
Main PID: 6773 (nfancurve)
Tasks: 2 (limit: 38300)
Memory: 1.0M
CPU: 498ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/nfancurve.service
├─6773 /bin/sh /usr/bin/nfancurve -c /etc/nfancurve.conf
└─6813 sleep 7
nfancurve[6773]: Number of GPUs detected:
nfancurve[6773]: 1
nfancurve[6795]: ERROR: The current user does not have permission for operation
nfancurve[6795]: ERROR: Error assigning value 1 to attribute 'GPUFanControlState' ([gpu:0]) as specified in assignment '[gpu:0]/GPUFanControlState=1' (Operation not supported).
nfancurve[6773]: Started process for 1 GPU and 1 Fan
nfancurve[6807]: ERROR: The current user does not have permission for operation
nfancurve[6807]: ERROR: Error assigning value 40 to attribute 'GPUTargetFanSpeed' ([fan:0]) as specified in assignment '[fan:0]/GPUTargetFanSpeed=40' (Operation not supported).If I add a bash script in .config/autostart it doesn't work and logs show it complains about the same missing display configuration.
But after I login it does work if I just run this script from terminal:
cat nvidia.sh
#!/bin/sh
sudo /usr/bin/nvidia-settings -a *:1[gpu:0]/GPUFanControlState=1 -a *:1[fan-0]/GPUTargetFanSpeed=40Last edited by qu@rk (2023-05-01 15:48:32)
Offline
I managed to solve this by using this: https://wiki.archlinux.org/title/Runnin … sing_xhost
I just added the two xhost lines before and after running nvidia-settings:
#!/bin/sh
xhost si:localuser:root
sudo /usr/bin/nvidia-settings -a *:1[gpu:0]/GPUFanControlState=1 -a *:1[fan-0]/GPUTargetFanSpeed=31
xhost -si:localuser:rootI'm using this script to set a known fan speed value at startup with systemd. This works in Hyprland but still needs xorg-server running, apart from xorg-xwayland.
Last edited by qu@rk (2023-05-13 13:36:38)
Offline
With 535.104.05 this doesn't work anymore. anyone have this issue? If I run it without sudo I get:
ERROR: The current user does not have permission for operation
ERROR: Error assigning value 1 to attribute 'GPUFanControlState' ([gpu:0]) as specified in assignment '*:1[gpu:0]/GPUFanControlState=1' (Operation not
supported).With sudo I get
ERROR: The control display is undefined; please run `/usr/bin/nvidia-settings --help` for usage information.-q all shows this:
/usr/bin/nvidia-settings -q all
Attributes queryable via [gpu:0]:
Attribute 'NvidiaDriverVersion' ([gpu:0]): 535.104.05
'NvidiaDriverVersion' is a string attribute.
'NvidiaDriverVersion' is a read-only attribute.
'NvidiaDriverVersion' can use the following target types: GPU.
Attribute 'PCIEMaxLinkWidth' ([gpu:0]): 16.
'PCIEMaxLinkWidth' is an integer attribute.
'PCIEMaxLinkWidth' is a read-only attribute.
'PCIEMaxLinkWidth' can use the following target types: GPU.
Attribute 'PCIECurrentLinkWidth' ([gpu:0]): 16.
'PCIECurrentLinkWidth' is an integer attribute.
'PCIECurrentLinkWidth' is a read-only attribute.
'PCIECurrentLinkWidth' can use the following target types: GPU.
Attribute 'TotalDedicatedGPUMemory' ([gpu:0]): 8192.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' ([gpu:0]): 415.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'Irq' ([gpu:0]): 102.
'Irq' is an integer attribute.
'Irq' is a read-only attribute.
'Irq' can use the following target types: GPU.
Attribute 'CUDACores' ([gpu:0]): 2560.
'CUDACores' is an integer attribute.
'CUDACores' is a read-only attribute.
'CUDACores' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' ([gpu:0]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: GPU.
Attribute 'GPUCoreTemp' ([gpu:0]): 43.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target types: GPU.
Attribute 'BusRate' ([gpu:0]): 16.
'BusRate' is an integer attribute.
'BusRate' is a read-only attribute.
'BusRate' can use the following target types: GPU.
Attribute 'PCIDomain' ([gpu:0]): 0.
'PCIDomain' is an integer attribute.
'PCIDomain' is a read-only attribute.
'PCIDomain' can use the following target types: GPU.
Attribute 'PCIBus' ([gpu:0]): 43.
'PCIBus' is an integer attribute.
'PCIBus' is a read-only attribute.
'PCIBus' can use the following target types: GPU.
Attribute 'PCIDevice' ([gpu:0]): 0.
'PCIDevice' is an integer attribute.
'PCIDevice' is a read-only attribute.
'PCIDevice' can use the following target types: GPU.
Attribute 'PCIFunc' ([gpu:0]): 0.
'PCIFunc' is an integer attribute.
'PCIFunc' is a read-only attribute.
'PCIFunc' can use the following target types: GPU.
Attribute 'PCIID' ([gpu:0]): 4318,7040.
'PCIID' is a packed integer attribute.
'PCIID' is a read-only attribute.
'PCIID' can use the following target types: GPU.
Attribute 'PCIEGen' ([gpu:0]): 3.
'PCIEGen' is an integer attribute.
'PCIEGen' is a read-only attribute.
'PCIEGen' can use the following target types: GPU.
Attribute 'GPUPowerSource' ([gpu:0]): 0.
'GPUPowerSource' is an integer attribute.
'GPUPowerSource' is a read-only attribute.
'GPUPowerSource' can use the following target types: GPU.
Attribute 'ECCSupported' ([gpu:0]): 0.
'ECCSupported' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false).
'ECCSupported' is a read-only attribute.
'ECCSupported' can use the following target types: GPU.
ERROR: Error while querying attribute 'ECCStatus' on [gpu:0] (Operation not supported).
Attribute 'ECCConfigurationSupported' ([gpu:0]): 0.
'ECCConfigurationSupported' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false).
'ECCConfigurationSupported' is a read-only attribute.
'ECCConfigurationSupported' can use the following target types: GPU.
ERROR: Error while querying attribute 'ECCConfiguration' on [gpu:0] (Operation not supported).
ERROR: Error while querying valid values for attribute 'ECCDefaultConfiguration' on [gpu:0] (Operation not supported).
ERROR: Error while querying attribute 'ECCSingleBitErrors' on [gpu:0] (Operation not supported).
ERROR: Error while querying attribute 'ECCDoubleBitErrors' on [gpu:0] (Operation not supported).
ERROR: Error while querying attribute 'ECCAggregateSingleBitErrors' on [gpu:0] (Operation not supported).
ERROR: Error while querying attribute 'ECCAggregateDoubleBitErrors' on [gpu:0] (Operation not supported).
Attribute 'GPUFanControlState' ([gpu:0]): 0.
'GPUFanControlState' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false).
'GPUFanControlState' can use the following target types: GPU.
Attribute 'GpuUUID' ([gpu:0]): GPU-5355c15c-d3b8-b2c8-bded-161794302f16
'GpuUUID' is a string attribute.
'GpuUUID' is a read-only attribute.
'GpuUUID' can use the following target types: GPU.
Attribute 'GPUSlowdownTempThreshold' ([gpu:0]): 93.
'GPUSlowdownTempThreshold' is an integer attribute.
'GPUSlowdownTempThreshold' is a read-only attribute.
'GPUSlowdownTempThreshold' can use the following target types: GPU.
Attribute 'GPUShutdownTempThreshold' ([gpu:0]): 96.
'GPUShutdownTempThreshold' is an integer attribute.
'GPUShutdownTempThreshold' is a read-only attribute.
'GPUShutdownTempThreshold' can use the following target types: GPU.
Attributes queryable via [fan:0]:
Attribute 'GPUTargetFanSpeed' ([fan:0]): 0.
The valid values for 'GPUTargetFanSpeed' are in the range 0 - 100 (inclusive).
'GPUTargetFanSpeed' can use the following target types: Fan.
Attribute 'GPUCurrentFanSpeed' ([fan:0]): 0.
The valid values for 'GPUCurrentFanSpeed' are in the range 0 - 100 (inclusive).
'GPUCurrentFanSpeed' is a read-only attribute.
'GPUCurrentFanSpeed' can use the following target types: Fan.edit:
I also tried nfancurve and service status shows this:
systemctl --user status nfancurve
● nfancurve.service - Nfancurve service
Loaded: loaded (/usr/lib/systemd/user/nfancurve.service; enabled; preset: enabled)
Active: active (running) since Tue 2023-09-12 11:28:16 EEST; 10min ago
Main PID: 2210 (nfancurve)
Tasks: 2 (limit: 38391)
Memory: 1.0M
CPU: 7.983s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/nfancurve.service
├─ 2210 /bin/sh /usr/bin/nfancurve -c /etc/nfancurve.conf
└─19435 sleep 7
nfancurve[2210]: 1
nfancurve[2210]: Number of GPUs detected:
nfancurve[2210]: 1
nfancurve[2240]: ERROR: The current user does not have permission for operation
nfancurve[2240]: ERROR: Error assigning value 1 to attribute 'GPUFanControlState' ([gpu:0]) as specified in assignment '[gpu:0]/GPUFanControlState=1' (Operation not supported).
nfancurve[2210]: Started process for 1 GPU and 1 Fan
nfancurve[2252]: ERROR: The current user does not have permission for operation
nfancurve[2252]: ERROR: Error assigning value 40 to attribute 'GPUTargetFanSpeed' ([fan:0]) as specified in assignment '[fan:0]/GPUTargetFanSpeed=40' (Operation not supported).
nfancurve[19291]: ERROR: The current user does not have permission for operation
nfancurve[19291]: ERROR: Error assigning value 55 to attribute 'GPUTargetFanSpeed' ([fan:0]) as specified in assignment '[fan:0]/GPUTargetFanSpeed=55' (Operation not supported).Last edited by qu@rk (2023-09-12 08:40:21)
Offline
Actually it was the GDK_BACKEND=wayland env variable. once I unset this it works as before. Was messing with it for running Kicad under Wayland...
Offline