Linux Radeon Headless Temp/Fan ????

dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
Hello all! Merry Christmas (or whatever tradition you may follow :) and Happy New Year!

With a Ubuntu linux rig, and multiple AMD GPUs without heads, how on earth do you get temps and fan control? The ridiculous "aticonfig" command that implements these functions won't work, for me at least, without an actual Xserver running with a display attached to the GPU. I've tried everything I can think of, including lm-sensors, with no joy. Surely someone has run up against this (I hope). You can't do ethmining without being able to monitor GPU temps and regulate the fans (or just turn them on full). Any help out there???

Have a great day!

-Best Regards
David
«1

Comments

  • HelioxHeliox Member, Moderator Posts: 633 mod
    have you tried to do this.

    export display=:0
    aticonfig --od-enable
    aticonfig --adapter=0 --odgt

    Works for me..
  • ethfanethfan Member Posts: 458 ✭✭✭
    Heliox said:

    have you tried to do this.

    export display=:0
    aticonfig --od-enable
    aticonfig --adapter=0 --odgt

    Works for me..

    Are you using it headless? Won't work then. Btw --od-enable is not required to do --odgt. Needed only for --odgc, --odsc, etc.
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    Heliox, ethfan : Thanks, but yes, these are headless. I don't have any problem getting temp and setting the fan with a card that has a monitor attached. If you have a couple systems with multiple cards though, it's obviously not practical to have screens connected to every card, and the screens have to be attached when X11 starts. What a pain in the butt! I can understand that AMD would assume you have graphics cards to, you know, use for viewing screens :smile: That assumption doesn't help when you're using them solely to mine. Perhaps others are using larger external fans instead? That's kinda ugly. I may have to d/l the fglrx dev kit and see if I can somehow write a utility to handle this situation. That would be nice, since you wouldn't have to install X11, et al, to run headless miners.

    Happy Holidays!

    -Best Regards
    David
  • ethfanethfan Member Posts: 458 ✭✭✭
    aticonfig is crap compared to what I am trying out now - atitweak. Google it. It can be installed from the python repository. Not only can you monitor temps and fans. You can also see the core and memory clocks as well as vddc. You can even change them on the fly. Yes. Even the vddc could be changed though I only managed that with one particular card.
  • HelioxHeliox Member, Moderator Posts: 633 mod
    ethfan said:

    Heliox said:

    have you tried to do this.

    export display=:0
    aticonfig --od-enable
    aticonfig --adapter=0 --odgt

    Works for me..

    Are you using it headless? Won't work then. Btw --od-enable is not required to do --odgt. Needed only for --odgc, --odsc, etc.
    Yup headless. works every time.

    Got the sdk package installed as well?
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    ethfan said:

    aticonfig is crap compared to what I am trying out now - atitweak. Google it. It can be installed from the python repository. Not only can you monitor temps and fans. You can also see the core and memory clocks as well as vddc. You can even change them on the fly. Yes. Even the vddc could be changed though I only managed that with one particular card.

    That, my friend, is a godsend! THANK YOU VERY MUCH. The perfect solution! Don't even need to be root to run it! Goodbye "aticonfig"! Now, on a headless miner, all you need is "fglrx-core" and "atitweak".

    Btw, you do NOT need to install the APPSDK in run ethminer. The basic fglrx-core driver installs newer OpenCL libraries that work perfectly. You *do* need the "cl.hpp" header file from the SDK, however. I was having problems with the latest AMD driver release and the SDK (either 2.9.2 or 3.0). Neither SDK has been certified against the new driver release. Also, Ubuntu linux kernels > 3.19_27 trigger a bug in the previous fglrx driver (fglrx-core-15:200). There's a 15:201 update that fixes it here:

    http://ubuntuupdates.org/package/core/wily/restricted/base/fglrx-core

    It's a "willy" update, but it works fine on "trusty", and it fixed the segfault I started getting after a routine "trusty" update.

    Happy Holidays (Merry Christmas and Happy New Year)!!

    -Best Care
    David
  • MrYukonCMrYukonC Member Posts: 627 ✭✭✭
    Heliox said:

    ethfan said:

    Heliox said:

    have you tried to do this.

    export display=:0
    aticonfig --od-enable
    aticonfig --adapter=0 --odgt

    Works for me..

    Are you using it headless? Won't work then. Btw --od-enable is not required to do --odgt. Needed only for --odgc, --odsc, etc.
    Yup headless. works every time.

    Got the sdk package installed as well?
    Same here (3 rigs each with 6 GPUs, all headless). @ethfan doesn't know what he's talking about.

    aticonfig works just fine and can do everything atitweak can do.
  • ethfanethfan Member Posts: 458 ✭✭✭
    MrYukonC said:


    ...
    aticonfig works just fine and can do everything atitweak can do.

    Can aticonfig tell you your fans' speed? Voltage levels?
  • adasebadaseb Member Posts: 1,043 ✭✭✭
    Thanks for the ATITWEAK idea, seems to work great. I had the same issue.
  • JabulonJabulon Member Posts: 45
    There are different issues going on. 1st, in terms of using --od commands without an X session running:
    user@rig:~$ export DISPLAY=:0
    user@rig:~$ xhost +

    This disables access control, so clients can connect from any host. Then,

    user@rig:~$ aticonfig --odgt --adapter=all

    You should see temps for each separate GPU:

    Adapter 0 - AMD Radeon HD 6900 Series
    Sensor 0: Temperature - 72.00 C

    Adapter 1 - AMD Radeon HD 6900 Series
    Sensor 0: Temperature - 75.00 C

    There are also --od commands to tweak clocks, fans, whatever.



  • ethfanethfan Member Posts: 458 ✭✭✭
    dlehenky said:


    That, my friend, is a godsend! THANK YOU VERY MUCH. The perfect solution! Don't even need to be root to run it! Goodbye "aticonfig"! Now, on a headless miner, all you need is "fglrx-core" and "atitweak".
    ...

    So, how are you getting on with atitweak? Managed to use it for undervolting?
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @ethfan I can't undervolt my GPUs, and I don't really need to. I use atitweak for fan control and core clock adjustments (I can't change the memory clock on my GPUs).
  • etheadethead Member Posts: 15
    @ethfan I'm also interested in undervolting, I'll test out atitweak on an r9 280x and post results back.
  • ethfanethfan Member Posts: 458 ✭✭✭
    Reason I ask about under-volting is because I managed to do it with ONE of my GPUs and cannot seem to repeat it with others. It definitely worked because I saw the change in Watts being drawn from the wall as I varied the voltage. Still great for on the fly adjustments of the other parameters.
  • cidmocidmo Member Posts: 373 ✭✭✭
    edited March 2016
    @Jabulon thx i think that is exactly what i needed to know or have been searching for the past 3 weeks
    linux basics are difficult to find compared to the more complex, and im still quite new
    ive been looking at how to start it with xrandr

    @ethfan thx for directing me here ima try atitweak right now
    a couple other things ive tried that might work for u since seems like everyone has different results
    AMDOverdrivectrl and OD6config
    od6 dont seem to work to well on overdrive 5 or older cards but ive seen a thread where ppl used it on 7950s so idk

    edit:just used atitweak and it works for the 7950s so it compliments 0d6config well, dont work on the 290x cards tho
    only shows -s and changes powertune
    but gives a "adapter does not support discrete performance levels" when i try to mess with clocks
    and od6config wont underclock only overclock lol
    amd really needs to get on the ball and handle this stuff especially since they've prolly made tons on gpu sales in the past month/past few years since gpu mining was a thing
    Post edited by cidmo on
  • JabulonJabulon Member Posts: 45
    AMDOverdrivectrl gave me mixed results. On Ubuntu 14.04 could not get it to recognize multiple gpus. And it's completely broken on 15.10. I think the developer has left it for dead since 2012 or so. Damn shame. That said, if your AMD drivers are installed properly, --od stuff gives you lots to play around with.
  • LagniappeLagniappe Dirty SouthMember Posts: 136 ✭✭
    I just got two video cards running on ubuntu.

    What is the atitweak command to turn both fans to 100?

    atitweak -f 100 only turns one on.
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @Lagniappe Then you're only seeing one GPU. Run 'clinfo' any see what OpenCL devices are being recognized.
  • LagniappeLagniappe Dirty SouthMember Posts: 136 ✭✭
    @dlehenky Thanks for the timely response, sir. Please check your inbox.

    Norman
  • eddy4eddy4 Member Posts: 30
    ethfan said:

    Even the vddc could be changed though I only managed that with one particular card.

    @ethfan How did you do that?

    If I enter:
    atitweak --set-core-voltage=1.09 --adapter=1
    Setting performance level 0 on adapter 1: core voltage 1.09VDC
    Setting performance level 1 on adapter 1: core voltage 1.09VDC

    atitweak -s shows the core voltage still at 1.25VDC. The GPU is a Sapphire 7950 Dual-X.
    MrYukonC said:


    aticonfig works just fine and can do everything atitweak can do.

    @MrYukonC I can only change the settings with aticonfig for GPU0 but if I try to change the settings for GPU1 I get an error or if not it shows this output

    aticonfig --adapter=1 --od-setclocks=1040,1250

    Adapter 1 - AMD Radeon HD 7900 Series
    New Core Peak : 1040
    New Memory Peak : 1250

    but if I check with atitweak -s it shows nothing has changed:

    1. AMD Radeon HD 7900 Series (:0.1)
    engine clock 1050MHz, memory clock 1250MHz, core voltage 1.25VDC, performance level 3, utilization 99%
    fan speed 80% (2642 RPM) (user-defined)
    temperature 67 C
    powertune 20%

    My current AMD drivers:
    fglrx-core_15.201-0ubuntu2~15.10.2_amd64.deb
    fglrx_15.201-0ubuntu2~15.10.2_amd64.deb

    Any idea what's wrong?
  • MrYukonCMrYukonC Member Posts: 627 ✭✭✭
    eddy4 said:


    @MrYukonC I can only change the settings with aticonfig for GPU0 but if I try to change the settings for GPU1 I get an error or if not it shows this output

    aticonfig --adapter=1 --od-setclocks=1040,1250

    Adapter 1 - AMD Radeon HD 7900 Series
    New Core Peak : 1040
    New Memory Peak : 1250

    but if I check with atitweak -s it shows nothing has changed:

    1. AMD Radeon HD 7900 Series (:0.1)
    engine clock 1050MHz, memory clock 1250MHz, core voltage 1.25VDC, performance level 3, utilization 99%
    fan speed 80% (2642 RPM) (user-defined)
    temperature 67 C
    powertune 20%

    My current AMD drivers:
    fglrx-core_15.201-0ubuntu2~15.10.2_amd64.deb
    fglrx_15.201-0ubuntu2~15.10.2_amd64.deb

    Any idea what's wrong?

    @eddy4
    You may need to prefix the bold line with a DISPLAY=:0.1 &&, as such:

    DISPLAY=:0.1 && aticonfig --adapter=1 --odsc=1040,1250

    --odsc is short for --od-setclocks
  • AtomrigsAtomrigs Member Posts: 23
    You can set fan speed with aticonfig.

    aticonfig --pplib-cmd "set fanspeed <id> <percent>"

    For example, to set 100% fan speed on gpu 0,
    aticonfig --pplib-cmd "set fanspeed 0 100"

    To take it back to auto.
    aticonfig --pplib-cmd "set fanspeed 0 auto"

    Be aware that some users report that going back to auto does not take effect until reboot.
  • raidersanraidersan Member Posts: 12
    edited April 2016
    This topic is still open but needs more definition. For the sake of the argument I will use the term HEADLESS as "no X server running", and NOT for "no monitor connected to a GPU"
    I need to run headless because of a limitation of the AMD driver when X is running. When X is running, the driver will limit the number of GPU cores to 8, which is a real pain if you have a 7990 rig. No problem running 7 of those without X though. But without X I cannot access any of the aticonfig or atitweak commands as it looks like ADL is prevented from loading without X.
    Has anybody found a way around this?
    Many thanks
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    There is no way around it. AMD makes the rash assumption that you don't need a GPU if you're not running a GUI. Go figure. No X11 or Windows or OS X, no driver access. It's as simple as that. I guess you could give the open source alternative drivers and Mesa a shot. I'm no clear, though, how you are using the term "GPU cores". It sounds as though you're talking about each GPU as a core, i.e. the limitation is 8 GPUs "per driver"?
  • raidersanraidersan Member Posts: 12
    I have 7x7990, that is 14 GPU cores. OPENCL is happy to use them all without X, but will SEGFAULT ethminer if I have more than 4x7990, or 8 GPU cores
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @raidersan Gotcha. Each GPU has many CUs (Compute Units) and they are referred to as "cores" sometimes, that's why I was asking. I suppose one way around it would be to get all your tweaks implemented in the GPU BIOS by editing and reflashing them, thus eliminating the need to do any software tweaks at the OS level. Just a thought. There should be BIOS stuff out there floating around for the 7990.
  • raidersanraidersan Member Posts: 12
    Yeah I did my adjustments in BIOS but anything that is dynamic by nature, such as temps readings, cannot be accessed. So no thermal protection or fan speed adjustment based on temps. Its is a big price to pay
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @raidersan Set your fans to 100% and be done with it. Fans are cheap, GPUs are not. But that doesn't solve the temp monitoring issue.
  • raidersanraidersan Member Posts: 12
    yeah, that is not the advice I was looking for... but thanks anyway
  • test246test246 Member Posts: 1
    I'm new to mining, but I used Linux before. I'm running Ubuntu 14.04 with a Radeon R3 390 GPU. All up and mining at an almost reasonable speed. I can run commands like "aticonfig --list-adapters", but not commands like "aticonfig --odgt --adapter=0". For the last one I get the error "ERROR - X needs to be running to perform AMD Overdrive(TM) commands"

    I installed atitweak, but it does want to work for me. While "atitweak -h" works, something like "atitweak -l" fails with the message: "Couldn't initialize ADL interface.", and if I'm not root, will core dump due to a segmentation fault.

    I installed the 15.201 driver as mentioned above, but nothing changed.

    Any suggestions?
or to comment.