{"action":"created","issue":{"url":"https://api.github.com/repos/lxde/lxqt/issues/502","labels_url":"https://api.github.com/repos/lxde/lxqt/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/lxde/lxqt/issues/502/comments","events_url":"https://api.github.com/repos/lxde/lxqt/issues/502/events","html_url":"https://github.com/lxde/lxqt/issues/502","id":57764179,"number":502,"title":"Moving lxqt-config-monitor to KScreen","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lxde/lxqt/labels/lxqt-config","name":"lxqt-config","color":"006b75"},{"url":"https://api.github.com/repos/lxde/lxqt/labels/multi-monitor","name":"multi-monitor","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lxde/lxqt/milestones/2","labels_url":"https://api.github.com/repos/lxde/lxqt/milestones/2/labels","id":658400,"number":2,"title":"1.0.0","description":"","creator":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars.githubusercontent.com/u/235410?v=3","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"open_issues":57,"closed_issues":20,"state":"open","created_at":"2014-05-14T08:18:47Z","updated_at":"2015-02-16T04:31:11Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-02-16T04:31:11Z","updated_at":"2015-02-16T04:55:44Z","closed_at":null,"body":"TLDR: I've been working all night on moving lxqt-config-monitor to the KScreen framework. These are my notes.\r\n\r\nI was playing with my laptop and xrandr and I had to add a custom mode through the xrandr command line. I then noticed lxqt-config-monitor couldn't pick it up as it expects a *resolution* when in fact it's getting a mode name. I tried to look at fixing it but discovered that the code is an absolute mess. The entire thing relies on parsing xrandr command line output in --verbose mode. It's incredibly nasty.\r\n\r\nFortunately the KDE folks have an excellent KScreen framework. It has virtually zero dependency and has support for pluggable backends. This is necessary if we're ever going to move to wayland; although we have a concept of a backend in lxqt-config-monitor right now, the entire thing relies on passing string data around which is a huge no-no.\r\nThe main KScreen dev is also wonderfully responsive.\r\n\r\nWe have to do some user-facing changes though. This isn't just switching one backend for another.\r\n\r\n- We lose gamma settings. We can get gamma through EDID but not set it. I hope this can be corrected, although setting gamma belongs in more advanced settings...\r\n- Refresh rates need to be coupled with resolutions. In KScreen, you can only get/set modes, not individual resolution/rate (for good reason too). This does make the job a bit more complex in getting available rates for a resolution.\r\n- This is a good occasion to improve the UI. I want to get rid of \"Unify all monitors\", it's a weird option which belongs in quick options. Rate and resolution should be on the same line. The screen list could get icons representing the type of screen that is there.\r\n- We can also start showing unplugged screens. Food for thought.\r\n- Positioning monitors with the mouse is neat, but it has to be improved. The code for it is super nasty too.\r\n\r\nAlso: Right now, the save button writes an autostart file to start xrandr with the given config; something we're inheriting from lxrandr. Not only are the paths hardcoded etc but it's also not the expected behaviour from the user at all. It will result in flicker at login time and there's no way to ever know this is why.\r\n\r\nI'll push some branched work at some point this week. Anyone interested in helping with this?"},"comment":{"url":"https://api.github.com/repos/lxde/lxqt/issues/comments/74459882","html_url":"https://github.com/lxde/lxqt/issues/502#issuecomment-74459882","issue_url":"https://api.github.com/repos/lxde/lxqt/issues/502","id":74459882,"user":{"login":"PCMan","id":46543,"avatar_url":"https://avatars.githubusercontent.com/u/46543?v=3","gravatar_id":"","url":"https://api.github.com/users/PCMan","html_url":"https://github.com/PCMan","followers_url":"https://api.github.com/users/PCMan/followers","following_url":"https://api.github.com/users/PCMan/following{/other_user}","gists_url":"https://api.github.com/users/PCMan/gists{/gist_id}","starred_url":"https://api.github.com/users/PCMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PCMan/subscriptions","organizations_url":"https://api.github.com/users/PCMan/orgs","repos_url":"https://api.github.com/users/PCMan/repos","events_url":"https://api.github.com/users/PCMan/events{/privacy}","received_events_url":"https://api.github.com/users/PCMan/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T04:55:44Z","updated_at":"2015-02-16T04:55:44Z","body":"I'd suggest that you talk to @selairi before going further in case he is doing the same thing.\r\nMaybe he already had some work in progress.\r\nAbout the points you mentioned:\r\n1. Gamma setting can still be done through xrandr\r\n2. What's the good reason? Listing all modes at the same time clutters the UI Currently we only show available rates for a resolution, too. So it's not possible to select an invalid mode.\r\n3. The option comes from the original lxqt-config-randr. I believe that @selairi has some ideas to improve it.\r\n4. Showing unplugged screen is not necessarily a good idea. It creates confusion and clutters the UI. Besides, there is no correct way to detect when a monitor is plugged in. The only reliable way I know is polling, which is quite inefficient.\r\n5. Agree, the positioning UI needs some improvements.\r\nAbout xrandr, I think it's a reasonable way and there will be something equivalent for wayland later.\r\nIt's both lightweight and desktop independent so can be used outside LXQt.\r\nThe flicker is not a problem. Different users might need different resolutions.\r\nAs this is a user-specific config, we can only know the settings \"after\" login.\r\nIf the mode the user want is different from the one used by the display manager or the previous user, there will be a flicker. This is almost inevitable, however, if we want to support different modes for different users."}}