(also) Failed to save pictures to disk in SUMA

NB: This post was originally added to this much earlier thread; it has been moved to start a new thread/discussion in its own right, while still referencing the earlier post.

--pt


Hello!

I am having a similar issue to this one. My OS is Ubuntu 22.04.5, AFNI version 25.0.07 "Severus Alexander."

I have an AFNI window and a SUMA window, and they are connected correctly. I have a view I would like to save as a file (e.g. .jpg), but when I hit 'r' or ctrl+r or shift+r or ctrl+shift+r, I do not get a "recorder window" and no file is saved. However, I do see the following message in the terminal window:

Oversampling now set to 4
++     Notice SUMA_R_Key (SUMA_input.c:3541 @14:00:31):

Repeatedly hitting just 'r' toggles through 1-4 as the oversampling settings, as if "alt" were held down (bc alt+r should toggle oversampling settings).

My caps lock is not on. This keyboard does not have a num lock. There are no programs running other than terminal, AFNI, and SUMA. I do not have fzf and I do not think I have simple screen recorder.

Please advise! I have such a nice little inflated brain picture and I want to save it and put it into my manuscript.

Thank you,
Priya

Hi, Priya-

(I'll note that I am using Ubuntu Ubuntu 22.04, with a slightly different emperor: AFNI version 25.2.18 'Gordian I'.)

Hm, if you hover the mouse over the SUMA window, then it should be Ctrl+r that will lead to saving a recording, and you should then get a terminal message like this (with different time stamps):

++     Notice SUMA_PixelsToDisk (SUMA_display.c:1843 @16:08:27):
Wrote image to ./SUMA_Recordings//autorecord.A.251209_160827.559.jpg

There is no recorder window opened in this action---that would appear if I typed just r by itself, or if I started a recording in video mode with Shift+r and then started changing the appearance of the SUMA window.

To get the oversampling message you note, for me that happens with the key press of Alt+r.

I will note that when I do turn on "num lock" on my computer, then similar to you I do get a change in behavior. After activating num lock, both Alt+r and Ctrl+r perform the same oversampling functionality.

So, somehow it appears like num lock might actually be activated? You should be able to check this from the terminal by typing the following (xset outputs a lot of info, and piping the result through this grep command reduces the number of lines displayed to hone in on a smaller number that might be relevant):

xset -q | grep Lock

When I type that, I can see whether my "num lock" is on or off, but looking at the first line of input, middle row:

$ xset -q | grep Lock
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off

That displayed value after 01: Num Lock: ... will indeed change as I toggle my num lock key and re-execute the xset command. What is the output of that on your computer?

I'm now trying to see about ways to disable Num Lock from the command line on Ubuntu, in case it somehow is activated for your computer. (On solution of going through the gnome-tweaks menu doesn't seem to have that field on my computer... check more.)

--pt

... and if you do somehow have the numlock state activated (as demonstrated via that xset -q | grep Lock command above), and you don't have a numlock key to hit on/off, then you can do the following, which I have found works on my computer (which, again, is also Ubuntu 22.04):

  • Install numlockx (requires sudo password):

     sudo apt install numlockx
    
  • Use that command to turn "off" numlock:

    numlockx off
    

On my computer, I see the numlock key go dark after doing this, and I also re-ran the xset command shown above to further verify that that worked.

(And if you do ever want to reactivate numlock on that system, you can just run numlockx on.)

--pt

Wow, thanks very much for your reply!

I tried xset -q | grep Lock like you suggested and sure enough, it shows that Num Lock is on. This is very odd because I am working on a laptop keyboard that does not actually have a num lock key (because it does not have a keypad). I was not able to install numlockx because I don't have sudo permission on the server. However, the fact that my Ubuntu is on a remote server may be the key--my big keyboard in the office DOES have a num lock key, and it may have been on the last time. I will try connecting from the office and turning off num lock from that keyboard. Wish me luck!

Fascinating, OK. Hopefully getting the other keyboard access will help resolve this. You might have to put a wedge under that other keyboard's numlock key, then, so it doesn't cause disruptions again!

--pt

Confirming that using the external keyboard to turn num lock on/off solved the problem. Thanks so much for your help!

Cool, glad that resolved it, and thanks for verifying it.

--pt