Skip to content

Instantly share code, notes, and snippets.

View shadeslayer's full-sized avatar

Rohan Garg shadeslayer

View GitHub Profile
/*
* This file is part of Cockpit.
*
* Copyright (C) 2015 Red Hat, Inc.
* Copyright (C) 2018 Rohan Garg <rohan@garg.io>
*
* Cockpit is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
function checkUsbDrive() {
var STORAGED_SERVICE = "org.freedesktop.UDisks2";
var STORAGED_OPATH_PFX = "/org/freedesktop/UDisks2";
var STORAGED_IFACE_PFX = "org.freedesktop.UDisks2";
var udisks = cockpit.dbus(STORAGED_SERVICE);
var udisks_manager = udisks.proxy(STORAGED_IFACE_PFX,
STORAGED_OPATH_PFX + "/Manager", { watch: true });
udisks_manager.wait();
console.log(udisks_manager.valid);
: GLSL IR for shader 35:
(
(declare (location=2 shader_out ) vec4 gl_FragColor)
(declare (location=24 shader_in ) bool gl_FrontFacing)
(declare (location=0 shader_in ) vec4 gl_FragCoord)
(declare (location=2 shader_in ) vec4 gl_SecondaryColor)
(declare (location=1 shader_in ) vec4 gl_Color)
(declare (location=3 shader_in ) float gl_FogFragCoord)
(declare (location=4 shader_in ) (array vec4 0) gl_TexCoord)
(declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose)
:
: NIR IR for linked fragment program 36:
shader: MESA_SHADER_FRAGMENT
name: GLSL36
label: composite
inputs: 0
outputs: 0
uniforms: 0
shared: 0
decl_var uniform INTERP_MODE_NONE int source_repeat_mode (0, 0, 0)
kf5idletime_kwayland: This plugin does not support polling idle time
kwayland-client: Wayland Interface: wl_compositor / 1 / 3
kwayland-client: Wayland Interface: wl_shell / 2 / 1
kwayland-client: Wayland Interface: xdg_shell / 3 / 1
kwayland-client: Wayland Interface: zxdg_shell_v6 / 4 / 1
kwayland-client: Wayland Interface: wl_shm / 5 / 1
kwayland-client: Wayland Interface: wl_seat / 6 / 5
kwayland-client: Wayland Interface: zwp_pointer_gestures_v1 / 7 / 1
kwayland-client: Wayland Interface: zwp_pointer_constraints_v1 / 8 / 1
kwayland-client: Wayland Interface: wl_data_device_manager / 9 / 3
neon@neon:~$ sudo gdb -p $(pidof kwin_wayland)
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Thread 1 "kwin_wayland" hit Breakpoint 2, lima_draw_vbo (pctx=0xaaaaec9696f0, info=0xffffe44d9e18) at ../../../../.././src/gallium/drivers/lima/lima_draw.c:962
962 debug_checkpoint();
(gdb)
964 struct lima_context *ctx = lima_context(pctx);
(gdb)
966 if (!ctx->vs || !ctx->fs) {
(gdb)
971 if (!lima_update_vs_state(ctx) || !lima_update_fs_state(ctx))
(gdb)
975 ctx->vs->bo->map, ctx->vs->shader_size, false,
u_vbuf_draw_vbo (mgr=0xaaaae1e4fdf0, info=0xffffe9cb5e58) at ../../../.././src/gallium/auxiliary/util/u_vbuf.c:1160
1160 return;
(gdb)
1296 }
(gdb)
cso_draw_vbo (cso=0xaaaae1e4e340, info=0xffffe9cb5e58) at ../../../.././src/gallium/auxiliary/cso_cache/cso_context.c:1720
1720 }
(gdb)
st_draw_vbo (ctx=0xaaaae1e16590, prims=0xffffe9cb5ee0, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3, tfb_vertcount=0x0, stream=0, indirect=0x0) at ../../.././src/mesa/state_tracker/st_draw.c:215
215 for (i = 0; i < nr_prims; i++) {
u_vbuf_draw_vbo (mgr=0xaaaae1e4fdf0, info=0xffffe9cb5e58) at ../../../.././src/gallium/auxiliary/util/u_vbuf.c:1160
1160 return;
(gdb)
1296 }
(gdb)
cso_draw_vbo (cso=0xaaaae1e4e340, info=0xffffe9cb5e58) at ../../../.././src/gallium/auxiliary/cso_cache/cso_context.c:1720
1720 }
(gdb)
st_draw_vbo (ctx=0xaaaae1e16590, prims=0xffffe9cb5ee0, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3, tfb_vertcount=0x0, stream=0, indirect=0x0) at ../../.././src/mesa/state_tracker/st_draw.c:215
215 for (i = 0; i < nr_prims; i++) {
org.kde.kactivities.lib.core: Killing the consumer
org.kde.klipper: Checking clip data
org.kde.klipper: was empty. Retried, now still empty
lima_pipe_flush: flags=0
lima_pipe_flush: do nothing
lima_pipe_flush: flags=0
lima_pipe_flush: do nothing
lima_flush_resource
flush res=0xaaaac71c3320
lima_surface_create: pres=0xaaaac6742940 psurf=0xaaaac724cee0