Re: User who invoke doas

2019-05-01 Thread Andreas Kusalananda Kähäri
On Thu, May 02, 2019 at 04:29:20AM +, Adam Steen wrote:
> Hi
> 
> In a shell script invoked by doas, is it possible to find which user invoke 
> the script? my search a the moment has come up empty.
> 
> Cheers
> Adam
> 

Investigate the owner of the shell's parent process:

ps -p $PPID -o user=

-- 
Kusalananda
Sweden



Re: User who invoke doas

2019-05-01 Thread Benny
If there is only one user running the script, can ps -A | grep "script_name" 
work?

‐‐‐ Original Message ‐‐‐
On Wednesday, May 1, 2019 9:29 PM, Adam Steen  wrote:

> Hi
>
> In a shell script invoked by doas, is it possible to find which user invoke 
> the script? my search a the moment has come up empty.
>
> Cheers
> Adam




User who invoke doas

2019-05-01 Thread Adam Steen
Hi

In a shell script invoked by doas, is it possible to find which user invoke the 
script? my search a the moment has come up empty.

Cheers
Adam




Re: Xorg splitting physical output into halves

2019-05-01 Thread Benny
Thanks for your reply. I am sorry if I didn't explain myself clearly. I am 
trying to diy this whole thing from scratch with lens, monitor(s) and an arm 
sbc. The "AR" glasses is the primary display, therefore I need some sort of 
DE/WM running (and thus Xorg). I am aware of the smaller screens that are 
available on the market, however, control boards for those are extremely costly.

The arcan project is very interesting, I will surely check it out.

Again, thanks for your input.

‐‐‐ Original Message ‐‐‐
On Wednesday, May 1, 2019 5:14 AM, tfrohw...@fastmail.com 
 wrote:

> On April 29, 2019 6:51:30 PM UTC, Benny qwer...@protonmail.com wrote:
>
> > Hi,
> > I am planning an openbsd arm AR glasses setup. Is it possible for Xorg
> > to split an output into two, which I can use xrandr to mirror them?
> > I have tried fakeXrandr which creates virtual monitors that can't be
> > mirrored. Xephyr is not accelerated and I can't see a way to setup two
> > ouput with it.
> > Thanks.
>
> I'm not sure why use the whole of Xorg, rather than a window/fullscreen with 
> what you actually would want to display.
>
> VR applications may or may not be useful for your genus. The Arcan project 
> may interest you, as it has both some VR components, and the developer has 
> tested and documented setup on OpenBSD (https://arcan-fe.com/).
> The most promising open-source VR framework is OpenHMD. It runs on OpenBSD, 
> but currently requires disabling the uhid driver of the VR headset in order 
> to work with Oculus, Vive, WMR etc. You could try it out with the port draft 
> here: https://thfr.info/cgi-bin/cvsweb/mystuff/comms/openhmd/




Re: pkg_info - dependencies of package

2019-05-01 Thread Ingo Schwarze
Hi Evan,

Evan Silberman wrote on Wed, May 01, 2019 at 04:24:51PM -0700:

> pkg_info -R PACKAGE lists the packages that depend on PACKAGE. Is there a
> particular reason there's not an analogous option that lists a package's own
> dependencies? (i.e., listing the contents of +REQUIRING from the package
> db, rather than +REQUIRED_BY)
> 
> (Granted, in asking this question, I have taught myself where to find this
> information for installed packages without adding it to pkg_info, but it still
> seems like a thing pkg_info could reasonbly be expected to do.)

As usual with pkg_add(1), there is already more than one way how it
does roughly what you want:

   $ pkg_info -f mutt | grep ^@depend 
   $ pkg_info -S mutt

Sure, those handle indirect dependencies in a sligtly different way
than +REQUIRED_BY.  But there is value in keeping option proliferation
at bay.

Yours,
  Ingo



pkg_info - dependencies of package

2019-05-01 Thread Evan Silberman
pkg_info -R PACKAGE lists the packages that depend on PACKAGE. Is there a
particular reason there's not an analogous option that lists a package's own
dependencies? (i.e., listing the contents of +REQUIRING from the package
db, rather than +REQUIRED_BY)

(Granted, in asking this question, I have taught myself where to find this
information for installed packages without adding it to pkg_info, but it still
seems like a thing pkg_info could reasonbly be expected to do.)

-- Evan Silberman



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Daniel Bolgheroni
On Wed, May 01, 2019 at 04:43:09PM +, Jonathan Gray wrote:
> On Wed, May 01, 2019 at 12:34:12PM -0300, Daniel Bolgheroni wrote:
> > On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> > > Does this help?
> > 
> > It was already commited but fixed the problem here.
> > 
> > However, I still can't see the correct modes set for LVDS-1 and for the
> > external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
> > 1920x1080, but worked fine with the previous drm.
> 
> There is a change queued for the next 4.19 release which concerns the
> modesetting xorg driver, I'm not sure if it is relevant:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/plain/queue-4.19/revert-drm-i915-fbdev-actually-configure-untiled-displays.patch

It's not, I'm sorry. I will try the next iteractions.

Thank you for your work.

-- 
db



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Jonathan Gray
On Wed, May 01, 2019 at 12:34:12PM -0300, Daniel Bolgheroni wrote:
> On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> > Does this help?
> 
> It was already commited but fixed the problem here.
> 
> However, I still can't see the correct modes set for LVDS-1 and for the
> external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
> 1920x1080, but worked fine with the previous drm.

There is a change queued for the next 4.19 release which concerns the
modesetting xorg driver, I'm not sure if it is relevant:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/plain/queue-4.19/revert-drm-i915-fbdev-actually-configure-untiled-displays.patch

Index: sys/dev/pci/drm/i915/intel_fbdev.c
===
RCS file: /cvs/src/sys/dev/pci/drm/i915/intel_fbdev.c,v
retrieving revision 1.5
diff -u -p -r1.5 intel_fbdev.c
--- sys/dev/pci/drm/i915/intel_fbdev.c  14 Apr 2019 10:14:52 -  1.5
+++ sys/dev/pci/drm/i915/intel_fbdev.c  30 Apr 2019 07:38:31 -
@@ -380,8 +380,8 @@ static bool intel_fb_initial_config(stru
bool *enabled, int width, int height)
 {
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
+   unsigned long conn_configured, conn_seq, mask;
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
-   unsigned long conn_configured, conn_seq;
int i, j;
bool *save_enabled;
bool fallback = true, ret = true;
@@ -399,9 +399,10 @@ static bool intel_fb_initial_config(stru
drm_modeset_backoff();
 
memcpy(save_enabled, enabled, count);
-   conn_seq = GENMASK(count - 1, 0);
+   mask = GENMASK(count - 1, 0);
conn_configured = 0;
 retry:
+   conn_seq = conn_configured;
for (i = 0; i < count; i++) {
struct drm_fb_helper_connector *fb_conn;
struct drm_connector *connector;
@@ -414,8 +415,7 @@ retry:
if (conn_configured & BIT(i))
continue;
 
-   /* First pass, only consider tiled connectors */
-   if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
+   if (conn_seq == 0 && !connector->has_tile)
continue;
 
if (connector->status == connector_status_connected)
@@ -519,10 +519,8 @@ retry:
conn_configured |= BIT(i);
}
 
-   if (conn_configured != conn_seq) { /* repeat until no more are found */
-   conn_seq = conn_configured;
+   if ((conn_configured & mask) != mask && conn_configured != conn_seq)
goto retry;
-   }
 
/*
 * If the BIOS didn't enable everything it could, fall back to have the



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Daniel Bolgheroni
On Mon, Apr 29, 2019 at 07:05:25AM +, Jonathan Gray wrote:
> Does this help?

It was already commited but fixed the problem here.

However, I still can't see the correct modes set for LVDS-1 and for the
external monitor on HDMI-1. An ultrawide 2560x1080 monitor can see at most
1920x1080, but worked fine with the previous drm.

Thank you.

$ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y 
axis) 277mm x 156mm
   1366x768  60.00*+
   1280x720  60.0059.9959.8659.74
   1024x768  60.0460.00
   960x720   60.00
   928x696   60.05
   896x672   60.01
   1024x576  59.9559.9659.9059.82
   960x600   59.9360.00
   960x540   59.9659.9959.6359.82
   800x600   60.0060.3256.25
   840x525   60.0159.88
   864x486   59.9259.57
   700x525   59.98
   800x450   59.9559.82
   640x512   60.02
   700x450   59.9659.88
   640x480   60.0059.94
   720x405   59.5158.99
   684x384   59.8859.85
   640x400   59.8859.98
   640x360   59.8659.8359.8459.32
   512x384   60.00
   512x288   60.0059.92
   480x270   59.6359.82
   400x300   60.3256.34
   432x243   59.9259.57
   320x240   60.05
   360x202   59.5159.13
   320x180   59.8459.32
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected (normal left inverted right x axis y axis)
   1920x1080 60.0050.0059.9430.0029.97
   1920x1080i60.0050.0059.94
   1680x1050 59.88
   1600x900  60.00
   1280x1024 75.0260.02
   1152x864  75.00
   1280x720  60.0050.0059.94
   1024x768  75.0360.00
   800x600   75.0060.32
   720x576   50.00
   720x480   60.0059.94
   640x480   75.0060.0059.94
   720x400   70.08
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
$



> 
> Index: sys/dev/pci/drm/drm_fb_helper.c
> ===
> RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 drm_fb_helper.c
> --- sys/dev/pci/drm/drm_fb_helper.c   14 Apr 2019 10:14:51 -  1.13
> +++ sys/dev/pci/drm/drm_fb_helper.c   29 Apr 2019 06:58:25 -
> @@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
>  #ifdef notyet
>   if (READ_ONCE(dev->master))
>   return false;
> +#else
> + if (!SPLAY_EMPTY(>files))
> + return false;
>  #endif
>  
>   drm_for_each_crtc(crtc, dev) {
> 

-- 
db



Re: Xorg splitting physical output into halves

2019-05-01 Thread tfrohw...@fastmail.com
On April 29, 2019 6:51:30 PM UTC, Benny  wrote:
>Hi,
>
>I am planning an openbsd arm AR glasses setup. Is it possible for Xorg
>to split an output into two, which I can use xrandr to mirror them?
>
>I have tried fakeXrandr which creates virtual monitors that can't be
>mirrored. Xephyr is not accelerated and I can't see a way to setup two
>ouput with it.
>
>Thanks.

I'm not sure why use the whole of Xorg, rather than a window/fullscreen with 
what you actually would want to display.

VR applications may or may not be useful for your genus. The Arcan project may 
interest you, as it has both some VR components, and the developer has tested 
and documented setup on OpenBSD (https://arcan-fe.com/).
The most promising open-source VR framework is OpenHMD. It runs on OpenBSD, but 
currently requires disabling the uhid driver of the VR headset in order to work 
with Oculus, Vive, WMR etc. You could try it out with the port draft here: 
https://thfr.info/cgi-bin/cvsweb/mystuff/comms/openhmd/



Re: Xorg blanks until I switch to a TTY and back on 6.5

2019-05-01 Thread Gregory Edigarov



On 29.04.19 10:05, Jonathan Gray wrote:

On Sun, Apr 28, 2019 at 07:26:54PM -0400, Charles wrote:

Hello list,

Ever since the new inteldrm driver got merged into -current, shortly
before the 6.5 release, I'm seeing an odd new behavior on my Thinkpad
T430 -- when an external display is connected, Xorg blanks all screens
(but the mouse can still be seen) until I switch to a TTY and back with
(i.e. C-A-F4 then C-A-F5) after which point it goes back to normal.

I'm glad the new inteldrm driver got merged, since it fixes several
other video issues I was having. This problem is very minor since the
workaround is just a few extra keystrokes when I dock or undock, but it
is nevertheless annoying.

Is anyone else experiencing this issue on third gen core-I series Intel
chips with integrated graphics? Or on any other chips for that matter?

I checked Xorg.0.log and didn't see anything suspicious. I also tried
disabling monitor hotplugging via Xorg.conf, but I either did it wrong
or it had no effect.

I would attach xorg logs and dmesg, but AFAIK misc@ does not allow
attachments, and I don't want to annoy people with that much inline
info.

Does this help?

Index: sys/dev/pci/drm/drm_fb_helper.c
===
RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
retrieving revision 1.13
diff -u -p -r1.13 drm_fb_helper.c
--- sys/dev/pci/drm/drm_fb_helper.c 14 Apr 2019 10:14:51 -  1.13
+++ sys/dev/pci/drm/drm_fb_helper.c 29 Apr 2019 06:58:25 -
@@ -575,6 +575,9 @@ static bool drm_fb_helper_is_bound(struc
  #ifdef notyet
if (READ_ONCE(dev->master))
return false;
+#else
+   if (!SPLAY_EMPTY(>files))
+   return false;
  #endif
  
  	drm_for_each_crtc(crtc, dev) {

could this one be also related to my troubles?



apologies to some here

2019-05-01 Thread Peter J. Philipp
Hi,

I was moving my mail system to another host and accidentally activated a 
crontab that fetchmails my inbox via POP3 to the new host.  Because the
mail user was not created at that point it caused bounces to go out.  I think
the OpenBSD ML system took care of it, but some personal emails to members
of this list (and others off list), unfortunately got a bouncing mail that
were read in the past and resided in the INBOX still.  Sorry for the 
confusion and extra mail!  The time this happened was 9:09AM CEST.

Redfaced and embarrassed,
-peter



diff to macppc page

2019-05-01 Thread Stephane HUC "PengouinBSD"
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi, I submit this diff:

===
RCS file: /cvs/www/macppc.html,v
retrieving revision 1.264
diff -u -p -r1.264 macppc.html
- --- macppc.html   24 Apr 2019 04:00:39 -  1.264
+++ macppc.html 1 May 2019 08:37:44 -
@@ -489,7 +489,7 @@ There are several installation media pro
   procedure.
   Alternatively, the CD can be booted at the Open Firmware prompt, with
 
- -  boot cd:,ofwboot 6.3/macppc/bsd.rd
+  boot cd:,ofwboot 6.5/macppc/bsd.rd
 
   Mac OS based boot
   


- -- 
~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<<
- 
Stephane HUC as PengouinBSD or CIOTBSD
b...@stephane-huc.net
-BEGIN PGP SIGNATURE-

iHUEARYKAB0WIQScTRXz7kMlZfGpDZMTq98t3AMG7wUCXMlb7gAKCRATq98t3AMG
75WkAP0WUAC/v6eW2eyvboPS9M7dKk5X+rQfKNM1Dyxo3/JONAD9GuvfIDaFkCds
GRtRrtgVP157X5t592uI2z4qq/lfsgI=
=cEvS
-END PGP SIGNATURE-