issues with i3, xrandr and keyboard

19 views
Skip to first unread message

qtpie

unread,
Jan 19, 2021, 12:29:27 PM1/19/21
to qubes...@googlegroups.com
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



pillule

unread,
Jan 19, 2021, 5:09:21 PM1/19/21
to qubes...@googlegroups.com

'qtpie' via qubes-users <qubes...@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.

--

pillule

unread,
Jan 19, 2021, 5:25:49 PM1/19/21
to qubes...@googlegroups.com

'qtpie' via qubes-users <qubes...@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.

--


Jarrah

unread,
Jan 19, 2021, 5:26:19 PM1/19/21
to qubes...@googlegroups.com

> 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.

Patrik Hagara

unread,
Jan 20, 2021, 6:32:13 AM1/20/21
to qtpie, qubes...@googlegroups.com
On 1/19/21 6:27 PM, 'qtpie' via qubes-users wrote:
> 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]
https://www.qubes-os.org/doc/gui-configuration/#video-ram-adjustment-for-high-resolution-displays

Cheers,
Patrik

qtpie

unread,
Jan 21, 2021, 6:05:07 AM1/21/21
to Patrik Hagara, qubes...@googlegroups.com

On 1/20/21 12:32 PM, Patrik Hagara wrote:
>> 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]
> https://www.qubes-os.org/doc/gui-configuration/#video-ram-adjustment-for-high-resolution-displays
>
>
> 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.



qtpie

unread,
Jan 29, 2021, 6:12:28 AM1/29/21
to qubes...@googlegroups.com


On 1/19/21 6:27 PM, qtpie wrote:
> 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.

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:
https://gist.github.com/jatcwang/ae3b7019f219b8cdc6798329108c9aee

https://www.qubes-os.org/faq/#my-keyboard-layout-settings-are-not-behaving-correctly-what-should-i-do

Reply all
Reply to author
Forward
0 new messages