Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applying profile without logging out / killing session #19

Open
Radoom opened this issue Aug 10, 2021 · 4 comments
Open

applying profile without logging out / killing session #19

Radoom opened this issue Aug 10, 2021 · 4 comments

Comments

@Radoom
Copy link

Radoom commented Aug 10, 2021

If I understand the code correctly (which I might not!), it needs to end the current KDE session before changes can become effective in the next session. Meaning, all programs close. Yes, KDE resumes the session with most of the programs re-opening as they were. But for instance I get off my desk in the middle of a video conference... which I can't if the session needs ending. So I can't change scaling until that vidco is over.

There is the "no-logout" option, but then things don't change (unless user manually starts a new session). Is that correct?

If so, the following suggests there might be a way to get things applied without logging out:
https://askubuntu.com/questions/481329/can-i-restart-the-kde-plasma-desktop-without-logging-out
Could that be combined with your tool - as it would be what I need, as I have to unplug/replug my external screen multiple times a day.

@maldoinc
Copy link
Owner

When using no-logout it will simply not end yout X session. Plasma itself will be terminated using kquitapp5, this however only affects the shell (desktop, panel, widgets etc) and not the other applications.

If you use the no-logout option just wrap the call to dpiswitch in a script which then just calls kstart5 plasmashell for plasma to start again without rebooting. Changes however, will not be fully applied.


If you run dpiswitch and then plug a new monitor, scaling may not affect that monitor as it is only guaranteed to scale any monitors currently connected when the command was ran.

You could also give Plasma Wayland a spin where dpi is handled much better by default and see if that works for you.

@Radoom
Copy link
Author

Radoom commented Aug 11, 2021

Thanks for responding so quickly!
I'll give it a go. Tried a few simple things with xrandr + scaling but "ugly" of course.
Tried following your setup instructions. Fail right at first shot:

$ dpiswitch --generate --profile default
[ERR] While reading from '<string>' [line 66]: section 'Colors:Header' already exists

System is Kubuntu 21.04. Not aware of any tweaks I've done except for setting up displaylink drivers (but at the moment not plugged in as I'm starting with the internal display only). What did I break :) ?

@maldoinc
Copy link
Owner

You should not use this on Wayland, it is meant only for X sessions. Wayland should switch between hidpi and lodpi automatically as well as support mixed dpi. It's still a work in progress of course so many things will not work.

@Radoom
Copy link
Author

Radoom commented Aug 11, 2021

Sorry, should have said that of course I'm running X11, not Wayland. Wayland gave me problems with displaylink on a previous installation when connecting screens, so I went for X11 for now.
Not sure if related, I'm not a programmer. Had a brief look at config.py which tries to get XDG_CONFIG_HOME from the ENV variables - right? However, when I do env | grep XDG, that's not there.

XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_TYPE=x11
XDG_CURRENT_DESKTOP=KDE
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_VTNR=1
XDG_SESSION_ID=3
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants