[gentoo-user] Libreoffice cannot open files from network location

2018-05-31 Thread Devrin Talen
Hey all,

After my last (large) emerge upgrade I can no longer open documents stored
on network shares in Libreoffice.  For instance, we have a Samba file
server that I open using Nautilus in Gnome.  For a long time I've been able
to double-click files on that share in Nautilus and have them open up in
Libreoffice, make edits, and save to the network location.

This no longer works.  If I open up the file dialog within Libreoffice I do
not see any of my mounted network drives that I see in Nautilus.  If I
double-click a document from Nautilus then Libreoffice refuses to open the
file and opens a blank one instead.

I believe my last upgrade put me on Libreoffice 6 and GTK3.  Is this an
issue anyone else is having?  Are there specific USE flags I need to turn
on to get this behavior back?  Any other emerge info that would be helpful?

Thanks,
Devrin


[gentoo-user] Intermittent nouveau graphics failures

2017-03-01 Thread Devrin Talen
Hey all,

My desktop system has an NVidia graphics card that identifies as:

% lspci -v
# snip...
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX
650] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd GK107 [GeForce GTX 650]
Flags: bus master, fast devsel, latency 0, IRQ 29
Memory at f600 (32-bit, non-prefetchable) [size=16M]
Memory at e000 (64-bit, prefetchable) [size=256M]
Memory at f000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at 000c [disabled] [size=128K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14 
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting 
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1
Len=024 
Capabilities: [900] #19
Kernel driver in use: nouveau

>From time to time, maybe once or twice a week, my system will fail.  The
symptoms are:

- Graphics freeze, no mouse movement, and they never start working no
matter how long I wait
- Sound is working (spotify keeps playing)
- Network connectivity works (I can ssh in)

When this happens and I ssh in and check out dmesg, I always see an error
like the following:

[11741.905192] nouveau :01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
[11741.905202] nouveau :01:00.0: fifo: gr engine fault on channel 10,
recovering...

Sometimes I see a lot of those errors, sometimes just one.  Whenever the
system is running normally those don't ever appear.  I'm always able to ssh
in and reboot cleanly.

Does anyone have any idea where I can start digging in to find out what's
happening?  Are these fifo errors happening in some logic that I can
disable with a kernel command line option?

Thanks,
Devrin


[gentoo-user] X-rite color calibrator not working

2016-09-11 Thread Devrin Talen
I'm trying to use an X-rite i1 Display 3 to calibrate my laptop screen
in gnome 3 and running into some trouble.  The color calibration
settings screen opens up as soon as I plug in the calibrator, and the
first error I see is after I've gone through all the options and
clicked the start button to actually begin calibrating.

At that point the error message is:

An internal error occurred that could not be recovered.
You can remove the calibration device.

This error occurs immediately after clicking the button.

So I googled around and I found a few links to folks having similar issues:

[1]: https://github.com/hughsie/colord/pull/29
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1297167
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1000910

Out of those, the third seems to be the closest to the issue I'm
having.  From what I can see, the USB device is enumerated properly by
the kernel:

% dmesg # snipped the relevant stuff:
[ 2406.995020] usb 1-1.2: new full-speed USB device number 8 using ehci-pci
[ 2407.083266] usb 1-1.2: New USB device found, idVendor=0765, idProduct=5021
[ 2407.083275] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 2407.083279] usb 1-1.2: Product: i1Display3 Bootloader
[ 2407.083283] usb 1-1.2: Manufacturer: X-Rite Inc.
[ 2407.086060] hid-generic 0003:0765:5021.0004: hiddev0,hidraw0: USB
HID v1.11 Device [X-Rite Inc. i1Display3 Bootloader] on
usb-:00:1a.0-1.2/input0
[ 2407.842362] usb 1-1.2: USB disconnect, device number 8
[ 2408.019082] usb 1-1.2: new full-speed USB device number 9 using ehci-pci
[ 2408.107524] usb 1-1.2: New USB device found, idVendor=0765, idProduct=5020
[ 2408.107531] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 2408.107535] usb 1-1.2: Product: i1Display3
[ 2408.107538] usb 1-1.2: Manufacturer: X-Rite, Inc.
[ 2408.109804] hid-generic 0003:0765:5020.0005: hiddev0,hidraw0: USB
HID v1.11 Device [X-Rite, Inc. i1Display3] on
usb-:00:1a.0-1.2/input0

And udev seems to be happy about it:

% udevadm monitor --environment --udev # plugging in the device:
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [3659.893310] add  /class/usbmisc (class)
ACTION=add
DEVPATH=/class/usbmisc
SEQNUM=3434
SUBSYSTEM=class
USEC_INITIALIZED=3659893139

UDEV  [3659.894709] add
/devices/pci:00/:00:1a.0/usb1/1-1/1-1.2 (usb)
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/012
DEVNUM=012
DEVPATH=/devices/pci:00/:00:1a.0/usb1/1-1/1-1.2
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=i1Display3_Bootloader
ID_MODEL_ENC=i1Display3\x20Bootloader
ID_MODEL_ID=5021
ID_REVISION=0001
ID_SERIAL=X-Rite_Inc._i1Display3_Bootloader
ID_USB_INTERFACES=:03:
ID_VENDOR=X-Rite_Inc.
ID_VENDOR_ENC=X-Rite\x20Inc.
ID_VENDOR_FROM_DATABASE=X-Rite, Inc.
ID_VENDOR_ID=0765
MAJOR=189
MINOR=11
PRODUCT=765/5021/1
SEQNUM=3431
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=3659894455
...

But the calibration isn't working.  Here's the bit of the journal
showing gnome complaining when I hit the start button:

% journalctl -xb # here's the relevant part:
Aug 30 22:36:23 luigi colord[1036]: (colord:1036): Cd-WARNING **: the
child exited with return code 1
Aug 30 22:36:23 luigi gnome-session[1374]:
(gnome-control-center:1829): color-cc-panel-WARNING **: calibration
failed with code 1: argyll-spotread exited unexpectedly
Aug 30 22:36:24 luigi colord[1036]: (colord:1036): Cd-WARNING **: no
child pid to kill!
Aug 30 22:36:24 luigi gnome-session[1374]:
(gnome-control-center:1829): color-cc-panel-WARNING **: failed to
start calibrate: failed to calibrate

So when I saw that I started running argyll-spotread on its own to see
if that would still fail:

% argyll-spotread -v -D4
usb_check_and_add: found instrument vid 0x0765, pid 0x5020
new_inst: called with path '/dev/bus/usb/001/013 (X-Rite i1
DisplayPro, ColorMunki Display)'
Connecting to the instrument ..
i1d3_init_coms: called
i1d3_init_coms: About to init USB
usb_open_port: open port '/dev/bus/usb/001/013' succeeded
i1d3_command: Sending cmd 'GetStatus' args '00 01 00 00 00 00 00 00'
coms_usb_transaction: Submitting urb to fd 3 failed with -1
i1d3_command: response read failed with ICOM err 0x2
coms_usb_transaction: Submitting urb to fd 3 failed with -1
i1d3_init_coms: failed with rv = 0x70062
Failed to initialise communications with instrument
or wrong instrument or bad configuration!
('Communications failure' + 'Communications failure')
urb_reaper: cleared requests

And when that happens I see this out in dmesg (the USB IDs may not
line up since I plugged and unplugged this many times):

% dmesg
[  232.711891] usb 1-1.2: usbfs: usb_submit_urb returned -28
[  232.711910] usb 1-1.2: usbfs: usb_submit_urb returned -28
[  232.784675] usb 1-1.2: reset full-speed USB device number 7 using ehci-pci

My questions are:

1. Has anyone successfully used this model of calibrator to
successfully calibrate their display with the gnome tools?

2. Am 

[gentoo-user] x-rite i1 display3 support

2016-08-31 Thread Devrin Talen
I'm trying to use an X-rite i1 Display 3 to calibrate my laptop screen in
gnome 3 and running into some trouble.  The color calibration settings
screen opens up as soon as I plug in the calibrator, and the first error I
see is after I've gone through all the options and clicked the start button
to actually begin calibrating.

At that point the error message is:

An internal error occurred that could not be recovered.
You can remove the calibration device.

This error occurs immediately after clicking the button.

So I googled around and I found a few links to folks having similar issues:

[1]: https://github.com/hughsie/colord/pull/29
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1297167
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1000910

Out of those, the third seems to be the closest to the issue I'm having.
>From what I can see, the USB device is enumerated properly by the kernel:

% dmesg # snipped the relevant stuff:
[ 2406.995020] usb 1-1.2: new full-speed USB device number 8 using ehci-pci
[ 2407.083266] usb 1-1.2: New USB device found, idVendor=0765,
idProduct=5021
[ 2407.083275] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 2407.083279] usb 1-1.2: Product: i1Display3 Bootloader
[ 2407.083283] usb 1-1.2: Manufacturer: X-Rite Inc.
[ 2407.086060] hid-generic 0003:0765:5021.0004: hiddev0,hidraw0: USB HID
v1.11 Device [X-Rite Inc. i1Display3 Bootloader] on
usb-:00:1a.0-1.2/input0
[ 2407.842362] usb 1-1.2: USB disconnect, device number 8
[ 2408.019082] usb 1-1.2: new full-speed USB device number 9 using ehci-pci
[ 2408.107524] usb 1-1.2: New USB device found, idVendor=0765,
idProduct=5020
[ 2408.107531] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 2408.107535] usb 1-1.2: Product: i1Display3
[ 2408.107538] usb 1-1.2: Manufacturer: X-Rite, Inc.
[ 2408.109804] hid-generic 0003:0765:5020.0005: hiddev0,hidraw0: USB HID
v1.11 Device [X-Rite, Inc. i1Display3] on usb-:00:1a.0-1.2/input0

And udev seems to be happy about it:

% udevadm monitor --environment --udev # plugging in the device:
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [3659.893310] add  /class/usbmisc (class)
ACTION=add
DEVPATH=/class/usbmisc
SEQNUM=3434
SUBSYSTEM=class
USEC_INITIALIZED=3659893139

UDEV  [3659.894709] add
/devices/pci:00/:00:1a.0/usb1/1-1/1-1.2 (usb)
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/012
DEVNUM=012
DEVPATH=/devices/pci:00/:00:1a.0/usb1/1-1/1-1.2
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=i1Display3_Bootloader
ID_MODEL_ENC=i1Display3\x20Bootloader
ID_MODEL_ID=5021
ID_REVISION=0001
ID_SERIAL=X-Rite_Inc._i1Display3_Bootloader
ID_USB_INTERFACES=:03:
ID_VENDOR=X-Rite_Inc.
ID_VENDOR_ENC=X-Rite\x20Inc.
ID_VENDOR_FROM_DATABASE=X-Rite, Inc.
ID_VENDOR_ID=0765
MAJOR=189
MINOR=11
PRODUCT=765/5021/1
SEQNUM=3431
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=3659894455
...

But the calibration isn't working.  Here's the bit of the journal showing
gnome complaining when I hit the start button:

% journalctl -xb # here's the relevant part:
Aug 30 22:36:23 luigi colord[1036]: (colord:1036): Cd-WARNING **: the child
exited with return code 1
Aug 30 22:36:23 luigi gnome-session[1374]: (gnome-control-center:1829):
color-cc-panel-WARNING **: calibration failed with code 1: argyll-spotread
exited unexpectedly
Aug 30 22:36:24 luigi colord[1036]: (colord:1036): Cd-WARNING **: no child
pid to kill!
Aug 30 22:36:24 luigi gnome-session[1374]: (gnome-control-center:1829):
color-cc-panel-WARNING **: failed to start calibrate: failed to calibrate

So when I saw that I started running argyll-spotread on its own to see if
that would still fail:

% argyll-spotread -v -D4
usb_check_and_add: found instrument vid 0x0765, pid 0x5020
new_inst: called with path '/dev/bus/usb/001/013 (X-Rite i1 DisplayPro,
ColorMunki Display)'
Connecting to the instrument ..
i1d3_init_coms: called
i1d3_init_coms: About to init USB
usb_open_port: open port '/dev/bus/usb/001/013' succeeded
i1d3_command: Sending cmd 'GetStatus' args '00 01 00 00 00 00 00 00'
coms_usb_transaction: Submitting urb to fd 3 failed with -1
i1d3_command: response read failed with ICOM err 0x2
coms_usb_transaction: Submitting urb to fd 3 failed with -1
i1d3_init_coms: failed with rv = 0x70062
Failed to initialise communications with instrument
or wrong instrument or bad configuration!
('Communications failure' + 'Communications failure')
urb_reaper: cleared requests

And when that happens I see this out in dmesg (the USB IDs may not line up
since I plugged and unplugged this many times):

% dmesg
[  232.711891] usb 1-1.2: usbfs: usb_submit_urb returned -28
[  232.711910] usb 1-1.2: usbfs: usb_submit_urb returned -28
[  232.784675] usb 1-1.2: reset full-speed USB device number 7 using
ehci-pci

My questions are:

1. Has anyone successfully used this model of calibrator to successfully
calibrate their display with the gnome tools?

2. Am 

[gentoo-user] Tablet rotation button broken in <=sys-apps/systemd-226-r2

2016-08-26 Thread Devrin Talen
Hey all,

I noticed recently that the screen rotation button on my Lenovo X201T
tablet was no longer working, whereas it had been working some time ago.
Long story short, there was a change around version 226 of systemd that
broke this.  I wanted to document how I got it working again and send it
out in case it helps anyone else.

This issue on Github [1] explains the problem and the patch that fixes it:

[1]: https://github.com/systemd/systemd/issues/1151

Rather than unmask a newer version of systemd I decided to try applying the
pull request to the current stable version in gentoo, which is
systemd-226-r2.  I created /etc/portage/patches/sys-apps/systemd and saved
the patch from the PR (cleaned up for 226-r2 and attached) there.  I then
rebuilt systemd, rebooted, and - voila - the rotate button is working again.

So (as root):

# mkdir -p /etc/portage/patches/sys-apps/systemd # then copy the patch
here
# emerge --oneshot sys-apps/systemd

That took a fair amount of googling around to root cause since I had no
idea where to begin, but ended up being a pretty simple fix.  When a newer
version of systemd gets stabilized I'll probably be able to drop that patch.

I do have a question though for anyone that can explain it: in the
patchfile I ended up putting in /etc/portage/patches I had to delete the
first slash in the filenames.  So for instance lines 27-31 of the patchfile
that works are this:

diff --git a/Makefile.am b/Makefile.am
index 8646e55..e3e07b8 100644
--- Makefile.am
+++ Makefile.am

But in the raw git diff they were:

diff --git a/Makefile.am b/Makefile.am
index 8646e55..e3e07b8 100644
--- a/Makefile.am
+++ b/Makefile.am

If I don't delete those prefixes then portage complains when applying the
patch:

ERROR: prepare
Failed Patch: fix-keymap-aliases.patch !
 ( /etc/portage/patches//sys-apps/systemd/fix-keymap-aliases.patch )

But existing patches in the /usr/portage/sys-apps/systemd/files directory
have the a/ and b/ prefixes.  So what gives?

Thanks,
Devrin
From 4c1482202957828a37e88e42c49e9ac8ef12c960 Mon Sep 17 00:00:00 2001
From: Martin Pitt 
Date: Tue, 13 Oct 2015 18:20:34 +0200
Subject: [PATCH 1/3] keymap: Recognize KEY_* aliases
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

linux/input.h contains alias definitions like

  #define KEY_COFFEE  152
  #define KEY_SCREENLOCK  KEY_COFFEE
  #define KEY_ROTATE_DISPLAY  153
  #define KEY_DIRECTION   KEY_ROTATE_DISPLAY

But we ignored these when building keyboard-keys-list.txt. Also allow the value
to start with "K" now (for KEY_*), and drop the hardcoded COFFEE →  SCREENLOCK
aliasing.

This fixes assignments to key "direction".

Fixes #1151
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 8646e55..e3e07b8 100644
--- Makefile.am
+++ Makefile.am
@@ -3483,7 +3483,7 @@ noinst_LTLIBRARIES += \
 
 src/udev/keyboard-keys-list.txt:
 	$(AM_V_at)$(MKDIR_P) $(dir $@)
-	$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
+	$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
 
 src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
 	$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@

From 1d3f8fa747b71db60872bc21df5b6489b73b740d Mon Sep 17 00:00:00 2001
From: Martin Pitt 
Date: Wed, 14 Oct 2015 06:52:41 +0200
Subject: [PATCH 3/3] keymap: Drop keyboard-keys-to-name.h

We don't use that anywhere any more. With the introduction of alias names it
also is not a proper mapping any more as several keys (e. g. KEY_COFFEE and
KEY_SCREENLOCK) have the same numerical mapping.
---
 Makefile.am | 6 +-
 src/udev/.gitignore | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e3e07b8..336ba0a 100644
--- Makefile.am
+++ Makefile.am
@@ -1229,7 +1229,7 @@ BUILT_SOURCES += \
 	$(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
 	$(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
 	$(gperf_txt_sources:-list.txt=-from-name.h) \
-	$(gperf_txt_sources:-list.txt=-to-name.h)
+	$(filter-out %keyboard-keys-to-name.h,$(gperf_txt_sources:-list.txt=-to-name.h))
 
 CLEANFILES += \
 	$(gperf_txt_sources:-list.txt=-from-name.gperf)
@@ -3491,9 +3491,6 @@ src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt
 src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
 	$(AM_V_GPERF)$(GPERF) -L ANSI-C -t