[qubes-users] issues with i3, xrandr and keyboard

Hi,

A few questions about using Qubes with i3. I think the idea behind i3 is
great, but getting everything to work is a bit of a struggle.

I'm using the i3 window manager with Qubes in a multi-monitor setup. The
laptop monitor is 1920x1080, the external monitor is 2560x1440. To
enable the second monitor I do $ xrandr --output eDP1 --auto --right-of
DP1 --output DP1 --auto.

The issue I keep running in to is that about half of the time, my mouse
will not work on the the external monitor on the rightmost quarter and
lowest quarter (approximately). The pointer will move there, but clicks
are not registered. It is as if the mousedriver sees the second monitor
as 1920x1080 instead of its actual resolution. The status bar is
displayed on both monitors.

I have read much of what there is to read on xrandr and tried many
options, like switching monitor postitions, scaling, panning,
positioning, but to to avail, the issue keeps returning. I have tried
comparing the output of $ xrandr -q, but there is no difference between
working and error situations.

- Does anyone have a comparable setup and what xrandr command do you use?
- Is there an alternative to using xrandr under i3?

Also, how do you change your keyboard settings under i3/Fedora/Qubes? I
want to use the us-altgr-intl keymap. Under i3 when I do $ localectl
set-keymap us-altgr-intl in a qube vm terminal, this has no effect in
applications. The right alt key instead remains used to open menu's
(altgr+f for File, altgr+e for Edit, etc.) If I could use altgr-intl and
retain that functionality that would actually be great.

thanks!

qtpie

'qtpie' via qubes-users <qubes-users@googlegroups.com> writes:

- Does anyone have a comparable setup and what xrandr command do you use?
- Is there an alternative to using xrandr under i3?

Do you have tried to use an utility such as lxrandr or arandr to generate
the command of xrandr for you ?

Also, how do you change your keyboard settings under i3/Fedora/Qubes? I
want to use the us-altgr-intl keymap. Under i3 when I do $ localectl
set-keymap us-altgr-intl in a qube vm terminal, this has no effect in
applications. The right alt key instead remains used to open menu's
(altgr+f for File, altgr+e for Edit, etc.) If I could use altgr-intl and
retain that functionality that would actually be great.

localectl is an utility correlated to systemd, its changes only takes effect
*after* a reboot and must be applied in the templateVM.

To change your keymap on the fly you should use setxkbmap. Its changes only
last the session.
‘setxkbmap -layout us -variant altgr-intl’

I have bugs with localectl. (options will not clean) Instead I export my own
keymap with xkbcomp and loads it in session scripts.

For the qubes way to change the vm keymaps, idk sorry. I only know it does
not allow to change your keyboard options so I looked away.

'qtpie' via qubes-users <qubes-users@googlegroups.com> writes:

Also, how do you change your keyboard settings under i3/Fedora/Qubes? I
want to use the us-altgr-intl keymap. Under i3 when I do $ localectl
set-keymap us-altgr-intl in a qube vm terminal, this has no effect in
applications. The right alt key instead remains used to open menu's
(altgr+f for File, altgr+e for Edit, etc.) If I could use altgr-intl and
retain that functionality that would actually be great.

Do you mean it activates the toolbar in a software such as firefox
(Alt_R keysym) or it activates a contextual menu in a soft such as
gnome-terminal (Menu keysym) ?

I think such things may be configurable in the application itself.
The thing is when you use AltGr as right Alt, you are now sending
ISO_Level3_Shift as keysym to the application instead of Alt_R, so the
application must be aware you want also use it for your things.

A trick, if you do no want to configure the applications, may be to use
an utility such as xcape (in dom0) to send Alt_R when you press and
release the key alone, and ISO_Level3_Shift when you press the key in
conjonction of another.

I hope that help.

For the qubes way to change the vm keymaps, idk sorry. I only know it
does
not allow to change your keyboard options so I looked away.

For me at least, changing the xfce setting carries through to i3. This
also propagates to VMs, but only once on VM start. Repeated propagation
is slated for r4.1.

Alternatively, VM keyboards can be changed from Qube Manager (right
click, set keyboard layout) when VMs are powered on. This should
persist, but is specific to one VM.

Hi,

A few questions about using Qubes with i3. I think the idea behind i3 is
great, but getting everything to work is a bit of a struggle.

I'm using the i3 window manager with Qubes in a multi-monitor setup. The
laptop monitor is 1920x1080, the external monitor is 2560x1440. To
enable the second monitor I do $ xrandr --output eDP1 --auto --right-of
DP1 --output DP1 --auto.

The issue I keep running in to is that about half of the time, my mouse
will not work on the the external monitor on the rightmost quarter and
lowest quarter (approximately). The pointer will move there, but clicks
are not registered. It is as if the mousedriver sees the second monitor
as 1920x1080 instead of its actual resolution. The status bar is
displayed on both monitors.

Hi,

This can be fixed by increasing the dom0 Qubes GUI video memory [1].

[1] GUI Configuration | Qubes OS

Cheers,
Patrik

Patrik,

Thanks for this excellent answer, an immediate fix! Dual monitors now
seem to work flawlessly withouth having to use any fancy xrandr options.

I will at some point propose an update to the qubes-i3 documentation
with this addition among others.

To answer my own question for other peoples reference: in i3 the way to
change the keyboard layout is basically suggested in the qubes faq, but
you really have to dig into the workings of localectl and keyboard
configuration in general. I ended up doing in dom0:

localectl set\-x11\-keymap us pc105 altgr\-intl compose:ralt localeclt status

localectl howto:
https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/basic-system-configuration/System_Locale_and_Keyboard_Configuration/#s2-Setting_the_Keymap

List of possible keyboard options. This page is about setxkbmap, do not
actually use setxkbmap (I've tried), but these options are generic: