Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kde screenshot tool that does not crash my computer
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Mar 22, 2018 1:28 pm    Post subject: kde screenshot tool that does not crash my computer Reply with quote

Hi all,

I believe that spectacle is the native kde5 tool for taking screenshots. Unfortunately, this program is incredibly unstable. I have a Dell XPS 9350 with a native 4k resolution and in addition another 4k external monitor attached. I guess this configuration is just not supported.

Initially, spectacle worked just fine. But about half a year ago, the rectangular region snapshot stopped working when I used the external screen (it would distort the image in moment when I clicked on "capture" and there was no way to capture the undistorted screen).

With every update it became worse. Now plasma crashes when I just launch spectacle (the task bar disappears as well as the top area of each window where you can close/minimize the window). When I try to take a screenshot in this setting then my entire computer crashes and I can only reboot.

Is there a different and more robust snapshot tool? Alternatively, is there any way I can even trace the bug? I haven't seen any messages in dmesg and in any of the logs in /var/log related to the crash.

Thanks for any tips.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Thu Mar 22, 2018 1:33 pm    Post subject: Reply with quote

I've never seen such issues.

Try with a new user to rule out a local config issue.
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Mar 22, 2018 2:09 pm    Post subject: Reply with quote

Thanks for the quick reply. The same problem exists with a new user. Actually, now the problem appeared when I selected "active window" while "rectangular region" was fine, at least with a single screen (I can't test with the external monitor right now).
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Mar 22, 2018 2:46 pm    Post subject: Reply with quote

Have you tried one of the various other screen capture applications, such as Scrot, to see if the problem is unique to Spectacle? You could set up a shortcut to the PrtScr key to capture a full screen, to Alt+PrtScr to capture the active window, and so on.

Code:
SYNOPSIS
       scrot [options] [file]

DESCRIPTION
       scrot  is  a  screen  capture utility using the imlib2 library to acquire and save images.  scrot has a few options,
       detailed below. Specify [file] as the filename to save the screenshot to.  If  [file]  is  not  specified,  a  date-
       stamped file will be dropped in the current directory.

OPTIONS
       -h, --help
            display help output and exit.

       -v, --version
            output version information and exit.

       -b, --border
            When selecting a window, grab wm border too

       -c, --count
            Display a countdown when used with delay.

       -d, --delay NUM
            Wait NUM seconds before taking a shot.

       -e, --exec APP
            Exec APP on the saved image.

       -q, --quality NUM
            Image  quality  (1-100)  high value means high size, low compression. Default: 75. (Effect differs depending on
            file format chosen).

       -m, --multidisp
            For multiple heads, grab shot from each and join them together.

       -s, --select
            Interactively select a window or rectangle with the mouse.

       -u, --focused
            Use the currently focused window.

       -t, --thumb NUM
            generate thumbnail too. NUM is the percentage of the original size for the thumbnail to be.

       -z, --silent
            prevent beeping.

SPECIAL STRINGS
       Both the --exec and filename parameters can take format specifiers that are  expanded  by  scrot  when  encountered.
       There  are two types of format specifier. Characters preceded by a '%' are interpreted by strftime(2). See man strf‐
       time for examples.  These options may be used to refer to the current date and time.  The second kind  are  internal
       to scrot and are prefixed by '$' The following specifiers are recognised:

       $f image path/filename (ignored when used in the filename)
       $n image name (ignored when used in the filename)
       $s image size (bytes) (ignored when used in the filename)
       $p image pixel size
       $w image width
       $h image height
       $t image format
       $$ prints a literal '$'
       \n prints a newline (ignored when used in the filename)

EXAMPLE
       scrot '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/shots/'
       This would create a file called something like 2000-10-30_2560x1024.png and move it to your shots directory.

_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Mar 22, 2018 3:37 pm    Post subject: Reply with quote

Thanks, this is a great tip. Scrot is slightly less convenient (e.g., you can't adjust the region after drawing it) but at least it's fast and does not crash.

I'm still curious if there is any way to find out what causes spectacle to crash. I tried to run it in a terminal like
Code:
spectacle > spectacle.log
to preserve the output even when I have to reboot the computer. However, the file is empty.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Mar 22, 2018 3:49 pm    Post subject: Reply with quote

Have you looked in the KDE Bug List? There are several recent bug reports for Spectacle, including one relating to 4K displays. Perhaps your problem is one manifestation of one (or more) of those bugs.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Mar 22, 2018 4:01 pm    Post subject: Reply with quote

It's probably related to 385885 or 374009 but I find it hard to confirm without any error messages. That's why I did not file a bug report yet.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Fri Mar 23, 2018 1:40 am    Post subject: Reply with quote

As an aside, if you are actually getting a computer crash, Spectacle cannot be the root cause of your problem. Spectacle is a user program. No user program, no matter how ill-behaved, can crash the machine without assistance from kernel bugs. Therefore, avoiding Spectacle may provide some relief, but there's no guarantee that other programs will not provoke the same bugs and cause the same system crash.
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Fri Mar 23, 2018 9:54 am    Post subject: Reply with quote

Hu wrote:
As an aside, if you are actually getting a computer crash, Spectacle cannot be the root cause of your problem. Spectacle is a user program. No user program, no matter how ill-behaved, can crash the machine without assistance from kernel bugs. Therefore, avoiding Spectacle may provide some relief, but there's no guarantee that other programs will not provoke the same bugs and cause the same system crash.


You are right, but I have been a bit sloppy in my wording. The kernel is still running and I can still ctrl+alt+1 to a primitive terminal. I can also move the mouse pointer. But I can't switch between windows anymore and this makes the computer unusable for any of my work. That's why I reboot (I could also just restart x).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum