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

Improvments for next release #208

Merged
merged 12 commits into from
Jan 1, 2025
Merged

Conversation

mutchiko
Copy link
Contributor

Build against Qt6 with graphical modifications presented on the readme page.

The commits are self explanatory, there might be some translation issues, but i couldn't test.

Version bump is also waiting since this is not for me to decide.

Change info tab into overview tab
Change settings tab into keyboard tab
Main point of these changes, besides the need to port to Qt6, is to give access to the most used options in a single page that appears first when the interface is opened.

The changes:
Moved the shift mode selection to the first page
Removed the Mode tab and page entirely
Toggles have been also moved to the first page
Renamed the tab (page) the Overview tab
Renamed the settings tab to Keyboard tab (since the only Options left are keyboard related)
Moved EC version and build date from the overview page to the about page
 
More changes:
The interface won't be resizable anymore, that's for avoiding it getting tiled by tiling window managers or scripts that emulate tiling on normal (stacking) desktop environments. this was done to avoid wasted space in case the interface was the only window visible on the screen.

Side changes:
About page: mention msi-ec as the driver and add a github link for it.
Debug page: add warning against randomly writing to EC memory.

The new interface was tested with multiple Qt themes and seems to look and function fine.
Require the new lupdate-qt6.

Hard coded the path to /lib/qt6/bin because it seems find_executable is failing to find the necessary binaries even though they exist, however, this change needs more testing (confirmed to work on Arch Linux).
Added lines to indicate that the script has started/finished
The straw that made the camel trip and fall
New images reflects how different themes might look on the app

Supported devices link now redirects to msi-ec, where the should be consulted.
@dmitry-s93
Copy link
Owner

Hello

By default, the "Overview" tab should open (after launching the application, the "Fan control" tab is open by default).
On the "Fan control" tab, fan 1 should be selected by default.

Is it really necessary to limit the window size? In some languages ​​the text may not fit.

@mutchiko
Copy link
Contributor Author

Last 2 fixes should've been done in one commit, i got confused as to how and why they got changed in the first place

@mutchiko
Copy link
Contributor Author

Is it really necessary to limit the window size?

not at all, its just a quality of life improvement, because if it was the only window open on a tiling window manager, it will get maximized, and it becomes an empty screen with way too much wasted space, making it harder to find what you're looking for.

tiling scripts will tile the window even if it's only resizable by 1 pixel, that's why i chose to fix the window size. if you have any better ideas i'm open to suggestions

In some languages ​​the text may not fit.

we might need to update translations to use shorter strings for example

@mutchiko
Copy link
Contributor Author

also can i ask what distribution are you using to test this pull request? is there any problems with cmake or missing binaries errors?

@dmitry-s93
Copy link
Owner

also can i ask what distribution are you using to test this pull request? is there any problems with cmake or missing binaries errors?

I'm using openSUSE Tumbleweed. There was a problem with lupdate and lrelease. In my distro they are called lupdate6 and lrelease6.

find_program(LUPDATE_EXECUTABLE lupdate lupdate6 lupdate-qt6 PATHS /lib/qt6/bin/ REQUIRED)
find_program(LRELEASE_EXECUTABLE lrelease lrelease6 lrelease-qt6 PATHS /lib/qt6/bin/ REQUIRED)

not at all, its just a quality of life improvement, because if it was the only window open on a tiling window manager, it will get maximized, and it becomes an empty screen with way too much wasted space, making it harder to find what you're looking for.

It would be good to check how the application window is displayed when scaling is enabled.

PATHS will have to stay for now until i figure out why qt6-tools on arch doesn't have ```lupdate``` and ```lrelease``` in /usr/bin
@mutchiko
Copy link
Contributor Author

It would be good to check how the application window is displayed when scaling is enabled

Scaling for regular Qt widgets is not a good idea since its handled by the system, i don't know if its even an option since talking about scaling means Qt Quick which is another story for another time.

The current interface seems to react better when maximized, there seem to be an acceptable spacing between text and elements so there shouldn't be any issues and the possibility to unlock window resizing is not out of the question, but depends whether or not you find it good looking at this state.

Screenshot_20241226_210544
MCC maximized on a HiDPI 4k monitor (black glass theme on plasma 6.2.4).

@mutchiko
Copy link
Contributor Author

Just to clarify things: i don't want the next release to be held by this pull request, i prefer that we have a release that uses msi-ec without this pull request being merged rather than the current version that doesn't use the driver at all.

fixes the 4 warnings in mainwindow.cpp:

alias template deduction only available with ‘-std=c++20’ or ‘-std=gnu++20’

line 466 to 469
@dmitry-s93 dmitry-s93 merged commit b6c24ca into dmitry-s93:main Jan 1, 2025
@mutchiko
Copy link
Contributor Author

mutchiko commented Jan 1, 2025

thanks for the merge, all is left is to make a new release, what version number did you choose?

@dmitry-s93
Copy link
Owner

thanks for the merge, all is left is to make a new release, what version number did you choose?

It will be 0.5.0

@CemCanplt
Copy link

CemCanplt commented Jan 9, 2025

Dude, I refresh the page every day to see if a new version has been released. You have perhaps made the single most comprehensive management application for MSI devices running Linux. You have done a great job. I hope you release a new version soon.
@dmitry-s93

@dmitry-s93
Copy link
Owner

Dude, I refresh the page every day to see if a new version has been released. You have perhaps made the single most comprehensive management application for MSI devices running Linux. You have done a great job. I hope you release a new version soon. You've done a great job. I hope you release a new version soon. @dmitry-s93

I'll try to release it this weekend.

@CemCanplt
Copy link

Maybe there is still a chance for release to happen today 🥹

@mutchiko
Copy link
Contributor Author

@CemCanplt you can build it and install it yourself you know?

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

@mutchiko The truth is I don't know how, I've seen the update you've made to the script but I don't know how to put it together as a program.

@mutchiko
Copy link
Contributor Author

@CemCanplt clone the repo as a zip (not from releases) and:

1-open the terminal in the extracted directory
2-run build.sh in the terminal (you might see compilation errors in red if you are missing Qt6 packages)
3-run create installer.sh
4- a zip file will be created next to the 4 scripts, extract it and run the install.sh inside the directory created by the newly created zip file.
5- enjoy? and report back here (with screenshots if you can)

@CemCanplt
Copy link

I'll try, thank you @mutchiko

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

Hello again @mutchiko
First of all I have no idea what Qt6 packages are but this was my experience.
I have entered the "../MControlCenter-main/scripts" directory.

I've run the build.sh, it gave me 2 error-ish respond

  1. ./build.sh: line 7: cmake: no command
  2. ./build.sh: line 8: cmake: no command

Then I have run the ./create_installer.sh file, sadly it didn't create a zip file, the output was:

  • echo 'Creating the installer'
    Creating the installer
    ++ grep -oP '(?<=MControlCenter VERSION )[0-9.]*' ../CMakeLists.txt
  • VERSION=0.4.1
  • DIST_DIR=MControlCenter-0.4.1
  • APP_DIR=MControlCenter-0.4.1/app
  • rm -rf MControlCenter-0.4.1
  • rm -f MControlCenter-0.4.1.tar.gz
  • mkdir MControlCenter-0.4.1
  • mkdir MControlCenter-0.4.1/app
  • cp ../build/mcontrolcenter MControlCenter-0.4.1/app
    cp: '../build/mcontrolcenter' failed: No such file or directory

Since there is no zip file, I can't continue, that's my life I presume, it always happens to me, nothing works flawlessly if I am on Linux :( That's why I usualy beg for an official release.

I have used "sudo" before running the scripts.

What should I do next?

@CemCanplt
Copy link

I assume I can download cmake from software center

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

@mutchiko I have installed a thing named cmake from software center, then ran the build.sh again, this time, it gives me this error, I suppose this is the Qt6 thingy you've been talking about:

-- The CXX compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:14 (find_package):
Could not find a package configuration file provided by "QT" with any of
the following names:

Qt6Config.cmake
qt6-config.cmake

Add the installation prefix of "QT" to CMAKE_PREFIX_PATH or set "QT_DIR" to
a directory containing one of the above files. If "QT" provides a separate
development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'. Stopped.

@mutchiko
Copy link
Contributor Author

@CemCanplt i've made a release just for you on my fork : https://github.com/mutchiko/MControlCenter/releases/tag/0.4.9-beta

before you start, install qt6-wayland the same way you installed cmake, please also look for other important packages starting with Qt6 like: Qt6-tools or Qt6-base or Qt6-widgets

now download the tar.gz from the link above
1-extract the tar.gz
2-open the terminal in the new directory
3-execute install.sh

the terminal will show you some errors after you execute install.sh, please report them here

@mutchiko
Copy link
Contributor Author

correction: Qt6-wayland is optional, however, other Qt6 packages are important

@CemCanplt
Copy link

@mutchiko Thanks for the help, I cannot believe you've created a fork just for me 🥹, so I have good news and bad news, the good news is installation seems fine:

Installation start
'./app/mcontrolcenter' -> '/usr/bin/mcontrolcenter'
'./app/mcontrolcenter.desktop' -> '/usr/share/applications/mcontrolcenter.desktop'
'./app/mcontrolcenter.svg' -> '/usr/share/icons/hicolor/scalable/apps/mcontrolcenter.svg'
'./app/mcontrolcenter-helper' -> '/usr/libexec/mcontrolcenter-helper'
'./app/mcontrolcenter-helper.conf' -> '/usr/share/dbus-1/system.d/mcontrolcenter-helper.conf'
'./app/mcontrolcenter.helper.service' -> '/usr/share/dbus-1/system-services/mcontrolcenter.helper.service'
Installation was successful

The bas news is Control Center doesn't start when I double click to it. I've tried to run it through to terminal in order to see if I can get any error message. I have one.

mcontrolcenter: error while loading shared libraries: libQt6Widgets.so.6: cannot open shared object file: No such file or directory

Sadly there is no Qt6 packages on Software Center besides Qt6-Wayland, I have tried to install it via "sudo apt install libQt6Widgets" and "sudo apt install libQt6Widgets.so.6" but it says there is no such package.

@CemCanplt
Copy link

Update: I did "sudo apt install qt6-base-dev" and now my problem went from "mcontrolcenter: error while loading shared libraries: libQt6Widgets.so.6: cannot open shared object file: No such file or directory" to "mcontrolcenter: /lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by mcontrolcenter)"

@mutchiko
Copy link
Contributor Author

@CemCanplt okay thats better, my system has Qt6.8 LTS but other distros just don't ship something up to date, i will try to find a way to make this version requirement go away

@mutchiko
Copy link
Contributor Author

mutchiko commented Jan 12, 2025

@CemCanplt i think you should be able to try this again #208 (comment)

@CemCanplt
Copy link

@mutchiko I think it's working?

In case anyone reads this, firstly I did "sudo apt install qt6-tools-dev" then "sudo apt install qt6-base-dev". Then what says in the comment "#208 (comment)"

Then it seems to be working, let me check, at least it opens.

@mutchiko
Copy link
Contributor Author

@CemCanplt screen shots please

@CemCanplt
Copy link

Ekran Görüntüsü - 2025-01-12 20-36-36

There it is, Dark Theme looks so cool

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

Ekran Görüntüsü - 2025-01-12 20-37-49

Keyboard Light doesn't seem to be working (it didn't work on last release too), I just wanted to know if it's fixable.
(MSI Vector GP68 HX 12V)

@mutchiko
Copy link
Contributor Author

@CemCanplt Qt tries to make itself as close as possible to your system, there are some graphical problems in the screen shots but its not big.

what is your laptop model?
is msi-ec driver installed?
did you check the supported devices list in the readme?

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

@mutchiko

  1. Laptop model is MSI Vector GP68 HX 12V
  2. I don't know if my MSI-EC drivers installed, how can I check?
  3. I didn't check the supported devices but at least Cool Buster, High Performance, Balanced and Quite options are working, which is better than nothing

@mutchiko
Copy link
Contributor Author

@CemCanplt in step 4 #208 (comment)

there was a new zip file that was generated, could you please send it here?

@CemCanplt
Copy link

MControlCenter-0.4.1.tar.gz

I assume this one?

@mutchiko
Copy link
Contributor Author

@CemCanplt please check the about page in the app "hakkinda" and go to the msi-ec github, then find the support guide in readme and follow it. you can contact me here or on msi-ec issues if you have opened a support issue.

your laptop is only partially supported, i can't guarantee that new functions will be unlocked, but its important to add support for your device in the driver and install the latest version.

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

@mutchiko
I am kinda new to this, can you give me a little more explanation, so I guess my msi-ec drivers are kinda old and doesn't support everything fully, even tho I update my drivers you think there is a fair change that not everything will work nice and clear, I don't understand the whole add support for your device in the driver consept.

I guess I understand what you want me to do but I don't understand why this is any useful to anyone.

@mutchiko
Copy link
Contributor Author

mutchiko commented Jan 12, 2025

@CemCanplt msi-ec driver cant support every msi laptop, because each model is different, there is no way to support models without extracting specific information about the features on each model, the only way to do that is for someone with that laptop to follow the guide and give us the addresses for the features, and we handle the rest.

MConctrolCenter relies on that driver to make changes on your system, what you did now is just build the graphical part of the app, the driver is different.

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

So you are saying that If giveaway my laptops some sort of driver information to you by following the steps, in time you can build a way to support my laptop in the future, this would also help other who has the same laptop too, right? @mutchiko

That way I would be helping the Msi Linux Driver Compability Thingy I assume, this is cool.

@CemCanplt
Copy link

It's like how github works I guess

@mutchiko
Copy link
Contributor Author

@CemCanplt this is exactly how it goes, and all models on the supported devices list are people who discovered how to add support without the guide, i wrote that guide myself after i added support for my laptop and helped other people who have the same model gain performance that was lost before you can change the performance mode

@CemCanplt
Copy link

CemCanplt commented Jan 12, 2025

@mutchiko
I am using Linux Mint and Windows with dual boot, so I believe this should be fairly easy for me, My MSI Center on Windows working fully functional (yay). But Windows's asking me to disable "memory integrity" and warned me that this driver that I am trying to install might be dangerous. I assume this happens because the program is trying to get well hidden core information from my laptop?

@mutchiko
Copy link
Contributor Author

@CemCanplt what driver are you trying to install? official msi driver?

@CemCanplt
Copy link

@mutchiko No Msi Drivers are running with no issue.

RwPortableX64V1.7 - The app that from "device_support_guide.md", when I've tried run it Windows warned me that this thing might be dangerous and if I still want to run it I must disable the "memory integrity" from Windows Defender.

@mutchiko
Copy link
Contributor Author

@CemCanplt it seems like you're on win11, unfortunately the app hasn't been updated for win11, because new windows versions add new security measures that you need to follow.

the app is 100% safe, win10 doesn't show this error (not for me at least), and you can't harm your laptop if you follow the guide.

@CemCanplt
Copy link

Ekran görüntüsü 2025-01-12 212811
Okay so, even with memory integrity disabled, I get this error, when I try to run the program. Does it make a diffirence if I use a non portable version? @mutchiko

@mutchiko
Copy link
Contributor Author

@CemCanplt we are getting out of context here, please open a new issue on msi-ec (title: add support for + put the model) so we can get more people to help you

@CemCanplt
Copy link

Okay @mutchiko

@CemCanplt
Copy link

@mutchiko Sorry, I was hasty. I opened the topic as a bug. Hope you don't mind. I apologize.

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

Successfully merging this pull request may close these issues.

3 participants