Qtile does not use all screens when using Nvidia

34 views
Skip to first unread message

Eduardo Queiroz

unread,
Apr 14, 2023, 2:30:06 AM4/14/23
to qtile-dev
The issue:
Hi guys,

I have a hybrid card Intel/Nvidia in which I set to run in nvidia mode with envycontrol. The issue I have is:

I have an autostart file and there I start kitty and qutebrowser.
Kitty is set to open in one group and qutebrowser in another group
When I login both programs start and their groups but on the same screen.
This problem only happens in nvidia mode. I moved back to hybrid mode and qtile started to work as it should again (started the programs in different screens).

Is there a way to solve it? Lemme know if I need to provide any files to help you guys,

Thanks

James Wright

unread,
Apr 14, 2023, 11:54:41 AM4/14/23
to qtil...@googlegroups.com
Does the other screen not work at all? Or just that in startup, the 2 groups are associated to the same screen?



--
You received this message because you are subscribed to the Google Groups "qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtile-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/71080d1b-cfb8-4da3-8644-a7faafa417adn%40googlegroups.com.

Eduardo Queiroz

unread,
Apr 15, 2023, 12:00:51 AM4/15/23
to qtile-dev
Hi,

"Or just that in startup, the 2 groups are associated to the same screen?"

That is the case. Both screens are working, everything loads fine. I just need to go to the second screen and take the terminal to it after every restart.

Thanks,

Eduardo

James Wright

unread,
Apr 16, 2023, 2:59:17 PM4/16/23
to qtil...@googlegroups.com
Interesting. How are you launching the applications on startup? I don't launch GUI apps on startup, so I'm not sure if qtile makes any guarantees as to whether a group gets put into a separate screen or not.

Eduardo Queiroz

unread,
Apr 17, 2023, 1:44:45 AM4/17/23
to qtile-dev
Hi,

here is my autostart.sh:

#!/bin/bash
#
slocker="i3lock-fancy -f '/usr/share/fonts/Mononoki/Mononoki Nerd Font Complete Mono Windows Compatible Regular.ttf'"

/home/eddie/.screenlayout/monitor.sh
eval "$(ssh-agent)"
{
    sleep 0.1
    cat ~/.passphrase
} | script -q /dev/null -c "ssh-add"
qutebrowser &
dunst &
notify-send -a "$DIST" "Notification" "Welcome to Qtile"
feh --bg-fill --randomize ~/Pictures/Wallpapers/Landscape/* --bg-fill --randomize ~/Pictures/Wallpapers/Portrait/*
picom &
/usr/bin/xautolock -nowlock "$slocker" -time 10 -locker "$slocker" -detectsleep &
copyq &
sleep 2
touch /home/eddie/Downloads/aria.txt
aria2c -s 10 --on-download-start='/home/eddie/scripts/aria/start.sh' --on-download-complete='/home/eddie/scripts/aria/finish.sh' --enable-rpc --rpc-listen-all -d Downloads --input-file=/home/eddie/Downloads/aria.txt --save-session=/home/eddie/Downloads/aria.txt --auto-save-interval 20 &
# #brave-browser &
$GUESSED_TERMINAL
mpDris2 &
nm-applet &
blueman-applet &
bitwarden &

Qutebrowser and kitty are assigned to different groups. Also everything works as expected when envycontrol is set as hybrid. The screen problem only happens when it is set to nvidia (I never tried to use Intel Mode).

Thanks

James Wright

unread,
Apr 17, 2023, 1:07:31 PM4/17/23
to qtil...@googlegroups.com
Yeah, I don't think there's anything guaranteeing that the groups will end up on different screens. I think what you're seeing is undefined behavior. If kitty and qutebrowser are assigned to different specific groups, you could add a few lines in your `startup_once` function that would move the groups to different screens. Something like:

    import libqtile
    qtile = libqtile.qtile
    group_kitty = qtile.group_map['name of kitty group']
    group_qutebrowser = qtile.group_map['name of qutebrowser group']
    if ( (len(qtile.screens) > 1) and # there are more than 1 screens
        (group_kitty.screen != None or group_qutebrowser.screen != None) and # at least one of them is on a screen
        (group_kitty.screen == group_qutebrowser.screen) ): # they're on the same screen
        for screen in qtile.screens:
            if screen not in [group_kitty.screen, group_qutebrowser.screen]:
                if screen != group_kitty.screen:
                    group_kitty.to_screen(screen)
                elif screen != group_qutebrowser.screen:
                    group_qutebrowser.to_screen(screen)


should work I think.

Thanks,
James Wright

Reply all
Reply to author
Forward
0 new messages